easy5 pts · first answer countswindow-functionssql
Window function vs GROUP BY
A table has 1,000 order rows across 20 cities. How many rows does this query return?
SELECT order_id, city,
SUM(amount) OVER (PARTITION BY city) AS city_total
FROM orders;Discussion 0
Join free to post in the discussion.