← 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?
- A.UNION ALL the grouped rows with a query that sums everything
- B.ORDER BY total
- C.GROUP BY with HAVING
- 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 →