Human Traffic of Stadium
Hard
Interview Classics
Return the rows of days with at least 100 people that belong to a run of three or more consecutive ids that all have at least 100 people. Order by visit_date.
Table schema
Stadium(id INT PRIMARY KEY, visit_date DATE, people INT)Sample data
id | visit_date | people
1 | 2017-01-01 | 10
2 | 2017-01-02 | 109
3 | 2017-01-03 | 150
4 | 2017-01-04 | 99
5 | 2017-01-05 | 145
6 | 2017-01-06 | 1455
7 | 2017-01-07 | 199
8 | 2017-01-09 | 188
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.