Product Share of Total Sales
Medium
Percent & Share Calculations
Return each product and its percentage of total sales rounded to 2 decimals, ordered by percentage descending.
Table schema
Sales(id INT PRIMARY KEY, product VARCHAR(20), amount INT)Sample data
id | product | amount
1 | Pen | 20
2 | Pen | 30
3 | Book | 150
4 | Bag | 300
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.