Now on Omarchy: read the manual without leaving your desktop
Your code PostgreSQL
-- This throws - fix it. It should return each region and its total amount sold.
SELECT region, rep, SUM(amount) AS total FROM sales GROUP BY region;