Given a Bookings table, what is the total number of customers for each month, product and booking type?
Asked in the technical phone screen stage. Candidate was provided two tables, including a Bookings table, to perform data analysis. Write a SQL query using the provided tables.
month, product, booking_type, and total_customers.Unknown, and order by month, product, and booking type.| Column | Type | Description |
|---|---|---|
| booking_idPK | INT | Unique booking identifier |
| customer_id | INT | Customer associated with the booking |
| booking_date | DATE | Date on which the booking was made |
| product_id | INT | Referenced product identifier |
| booking_type | VARCHAR(30) | Booking classification |
| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique product identifier |
| product_name | VARCHAR(100) | Product name |