Write an SQL query to find the top 3 products by sales in each month.
Use the provided product and sales data. Sales are calculated as quantity multiplied by unit price. Return exactly three products per month when at least three products have sales.
sales_month, product_id, product_name, total_sales, and sales_rank| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique product identifier |
| product_name | VARCHAR(100) | Product display name |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| product_id | INT | Product associated with the sale |
| sale_date | DATE | Date on which the sale occurred |
| quantity | INT | Number of units sold |
| unit_price | DECIMAL(10,2) | Price per unit at the time of sale |