below is the query I am writing, but for some reason it gives me a syntax error right after the word 'ROLLUP' the little red squiggle line is under the ' ( ' after rollup.
SELECT building, room_number, time_slot_id, COUNT(*)
FROM class1
GROUP BY ROLLUP (building, room_number, time_slot_id)
You need to use
With Rollup
ingroup by
. Try this syntaxfor more info check here