Show each product's % share of the total
Marketing wants to see each product's share of total revenue — as a percentage. For every product compute its total revenue and the percentage it makes up of the grand total across all products, rounded to two decimal places. Sort by share descending.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.
| product | pct_2024_01 | pct_2024_02 | pct_2024_03 |
|---|---|---|---|
| A | 27.0 | 40.5 | 32.4 |
| B | 28.6 | 32.1 | 39.3 |
| C | 27.9 | 32.6 | 39.5 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in