SELECT [orderDate]
,sum([DailyRevenue]) as DailyRevenue
,count([TotalOrders]) as TotalOrders
,[ShowId]
,[Title]
FROM (
SELECT
dbo.DateOnly(dbo.v_SalesPerEvent.orderDate) AS orderDate,
SUM(dbo.v_SalesPerEvent.PricePaid) AS DailyRevenue,
COUNT(dbo.v_SalesPerEvent.OrderNumber) AS TotalOrders,
dbo.v_SalesPerEvent.ShowId, dbo.tb_Show.Title
FROM dbo.v_SalesPerEvent INNER JOIN
dbo.tb_Show ON dbo.v_SalesPerEvent.ShowId = dbo.tb_Show.showId
GROUP BY dbo.v_SalesPerEvent.ShowId, dbo.v_SalesPerEvent.orderDate, dbo.tb_Show.Title
)
group by [orderDate],[ShowId],[Title]
order by [orderDate]
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.