Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select
- case
- grouping(E.LastName)
- when 0 then E.LastName
- else 'Wszystcy robole'
- end,
- case
- grouping(O.ShipCountry)
- when 0 then O.ShipCountry
- else 'Wszystkie kraje'
- end,
- count(O.OrderID) as 'ile'
- from
- Employees as E join Orders as O on E.EmployeeID = O.EmployeeID
- group by
- grouping sets( (E.LastName), (O.ShipCountry), (E.LastName, O.ShipCountry))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement