Subtotal levels without mixing meanings
Show multiple summary levels in one result. Run a real SQLite equivalent and learn what SQL Server ROLLUP, CUBE and GROUPING SETS describe.
Customer and grand totals are levels of the same orders, not additional orders. Label every UNION ALL branch. SQLite runs these branches; GROUPING SETS, ROLLUP and CUBE are T-SQL reference syntax here.
- Subtotal levels without mixing meanings
- Customer and grand totals are levels of the same orders, not additional orders. Label every UNION ALL branch. SQLite runs these branches; GROUPING SETS, ROLLUP and CUBE are T-SQL reference syntax here.