Writing Efficient SQL Aggregations: GROUP BY, HAVING, and Grouping Sets Explained | Wicked Smart Data