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
 grouping sets sample with rollup

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-09-04 : 12:29:59
how to writing this query using rollup or grouping sets in two way?
data
shop time date sku discount% sales qty amount
A 13:00pm, 2014-feb-11 apple 30% 5 #20
A 13:00pm, 2014-feb-11 apple 30% 5 #20
A Shop Qty :10 Amt:40
B 23:00pm, 2014-feb-11 apple 30% 5 #20
B 23:00pm, 2014-feb-11 apple 30% 5 #20
B shop Qty :10 Amt $40
Grand total qty:20 , Amt $80

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-09-04 : 14:17:28
Please follow these instructions for posting questions:

http://www.sqlservercentral.com/articles/Best+Practices/61537/
Go to Top of Page
   

- Advertisement -