SQL
CUBE+GROUP BY for Subtotals
We all have used GROUP BY, but do you know CUBE? For example, if I have a table of user spending, I can get the subtotal of each user AND the total spend of all users combined, all within one table. π Syntax is here. ππ΄π»π΄π²π ππππ_ππ, πππΌ(πππππ) πππ π΅ππΎπΌ πππππ πΆππΎππΏ π±π π²ππ±π΄(ππππ_ππ) This saves you the need to