Skip to content
RED SAGSkills
medium10 pts · first answer countswindow-functionssqlranking

Window function after GROUP BY

This query errors. What is wrong?

SELECT region, SUM(amount) AS total,
       RANK() OVER (ORDER BY amount DESC) AS rnk
FROM sales
GROUP BY region;
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions