Airbnb's quality team tracks each listing's rating month by month. Some reviews were submitted without a star rating, and their stars value is NULL; those reviews must not affect the average, neither as a zero nor in the count. Write an SQL query that returns review_month (formatted as 'YYYY-MM'), listing_id and avg_stars rounded to 2 decimal places, for every month and listing that has at least one review. Order the results by review_month, then listing_id.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.