A stadium records attendance once per event day, with ids increasing by 1 in date order. A day is busy when people is at least 100. The operations team wants every busy day that is part of a run of 3 or more busy days with consecutive ids. Write an SQL query that returns id, visit_date and people for those days. Order the results by visit_date ascending.
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.