Pareto Cumulative Share
Medium
Statistics in SQL
Rank products by revenue (highest first) and return each product's revenue and its cumulative share of total revenue as a percentage rounded to two decimals.
Table schema
Sales(product VARCHAR(20) PRIMARY KEY, revenue INT)Sample data
product | revenue
A | 50
B | 30
C | 20
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.