Combining Aggregates with Conditional Logic: GROUP BY, HAVING, and CASE WHEN in Practice | Wicked Smart Data