Given a transaction (bookings) table, develop three business metrics in SQL, then parameterize the solution; produce a monthly report of unique users who booked for the first time, including months missing from the fact table.
Asked in the Tech round 2 (SQL) stage. Candidate used a recursive CTE date spine. Reported follow-up: What data quality checks would you apply to this data?
month_start, total_bookings, unique_users, first_time_users.month_start ascending.| Column | Type | Description |
|---|---|---|
| booking_idPK | INT | Unique booking identifier |
| user_id | INT | User who made the booking |
| booked_at | TIMESTAMP | Timestamp when the booking was created |
| status | VARCHAR(20) | Booking status |