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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 100 shops and whole month + 24 hour sale
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

usafelix
Posting Yak Master

Hong Kong
165 Posts

Posted - 08/26/2014 :  03:44:04  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000