← 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?
- A.The grand total across all cities, on every row
- B.The city's total, squared
- C.A running total by city
- 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 →