🎙 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 5 of 9

What does SUM(SUM(amount)) OVER () give in a query grouped by city?

What does SUM(SUM(amount)) OVER () give in a query grouped by city?

  1. A.The grand total across all cities, on every row
  2. B.The city's total, squared
  3. C.A running total by city
  4. D.An error, because SUM cannot be nested
Answer & explanation

Correct answer: The grand total across all cities, on every row

The inner SUM is per group; the window SUM over an empty OVER () adds all groups.

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 →