Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 100 shops and whole month + 24 hour sale

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-08-26 : 03:44:04
Anyone can help give a idea in writing query in this requirement. Basic on one sales table and using last month to review all shops with each hour the sales qty and amt and top 5 by amount ?

output like this.
Shop1 shop2 >>> shop 100
July 1
Time 08:00-09:00 qty 20 30 40
amt $300 $500 1000

Time 13:00-14:00 qty 14 10 24
amt $212 $333 $100

Time 23:00-15:00 qty 22 24 38

July 2 Time - ditto above
   

- Advertisement -