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;Discussion 0
Join free to post in the discussion.