OpenTable wants a category-level report of diners who were seated recently. Write a SQL query to calculate the total number of seated diners for each restaurant category during the inclusive 30-day period ending on September 15, 2026.
restaurant_category and total_seated_diners columns.seated and reservation dates from August 16, 2026 through September 15, 2026, inclusive.party_size values. Treat categories with no qualifying diners as having a total of zero.restaurant_category.| Column | Type | Description |
|---|---|---|
| category_idPK | INT | Unique restaurant category identifier |
| category_name | VARCHAR(100) | Restaurant category name |
| Column | Type | Description |
|---|---|---|
| restaurant_idPK | INT | Unique restaurant identifier |
| restaurant_name | VARCHAR(150) | OpenTable restaurant name |
| category_id | INT | Restaurant category identifier |
| Column | Type | Description |
|---|---|---|
| reservation_idPK | INT | Unique reservation identifier |
| restaurant_id | INT | Reserved restaurant identifier |
| reservation_date | DATE | Date of the reservation |
| status | VARCHAR(30) | Reservation outcome or current status |
| party_size | INT | Number of diners in the reservation |