SELECT c1, c2, aggregate_function(c3) FROM table_name GROUP BY c1, c2 WITH ROLLUP;