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

Detect Missing Months

Return every month (as 'YYYY-MM') between the first and the last month that has sales in which there were no sales at all. Order by month.

Table schema

Sales(sale_date DATE, amount INT)

Sample data

sale_date | amount
2026-01-10 | 100
2026-02-05 | 50
2026-04-20 | 70

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.