Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select Service, Sum(Qty_Sold) as Total
- From Services
- Where Service in ('1','2','3','4')
- Group By Service
- Service Total
- 1 8
- 2 9
- 3 22
- 4 11
- Service Total
- 1 8
- 2 9
- 3 22
- 4 11
- 7 1
- Service Total
- 1 8
- 2 9
- 3 22
- 4 12
- Select * from
- (
- Select Case When Service = '7' then '4' Else Service, Sum(Qty_Sold) as Total
- From Services
- Where Service in ('1','2','3','4')
- Group By Service)
- Group By Services, Total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement