I currently track the number of items that are bought at a store each day (ItemCount). I also track the date for each (CreatedOn).
I am working to create a dashboard for management to look at to quickly get an idea of how the store is doing at any given time. I currently am showing today's total ItemCount - but would like to provide more meaningful details.
Would it be possible to create a query (or multiple queries) that shows me today's count (Monday's Total Item Count) as well as the average for all Monday's, the daily average, the YTD Daily Average, and the Monday Max Item Count (the highest ItemCount on any Monday)
I haven't been able to figure out any kind of efficient query to do this.
I am using PHP to query a SQL Server 2008 database.
I appreciate any help!