PostgreSQL - Aggregate Functions and GROUP BY
Find the problem in this query:
SELECT department, product, SUM(sales) FROM sales_data GROUP BY GROUPING SETS ((department, product), (department));
