🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: SQL for Data Analysis: all 9 questions

Quiz: SQL for Data Analysis · Question 9 of 9

Which is a portable way to add a grand total row in any database?

Which is a portable way to add a grand total row in any database?

  1. A.UNION ALL the grouped rows with a query that sums everything
  2. B.ORDER BY total
  3. C.GROUP BY with HAVING
  4. D.SELECT DISTINCT
Answer & explanation

Correct answer: UNION ALL the grouped rows with a query that sums everything

ROLLUP is not available everywhere; UNION ALL of a total row works in every database.

Can you get the rest right without peeking?

Take the timed Quiz: SQL for Data Analysis quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →