Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Top Selling Product Each Month

For each month return the product with the largest total quantity sold (month as 'YYYY-MM', product, total quantity). Order by month.

Table schema

Sales(sale_date DATE, product VARCHAR(20), qty INT)

Sample data

sale_date | product | qty
2026-01-05 | Pen | 5
2026-01-10 | Book | 7
2026-02-03 | Pen | 3
2026-02-20 | Bag | 6

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.