Percentage of Total by Group
Medium
Query Patterns
Return each region's total sales and its percentage of the overall total, rounded to two decimals. Order by region.
Table schema
Sales(id INT PRIMARY KEY, region VARCHAR(10), amount INT)Sample data
id | region | amount
1 | East | 60
2 | East | 40
3 | West | 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.