File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
solution/0600-0699/0601.Human Traffic of Stadium Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -114,20 +114,23 @@ ORDER BY 1;
114114
115115``` sql
116116# Write your MySQL query statement below
117- WITH Consecutive AS (
118- SELECT
119- * ,
120- id - ROW_NUMBER() OVER() AS id_diff
121- FROM Stadium
122- WHERE people >= 100
123- )
117+ WITH
118+ Consecutive AS (
119+ SELECT
120+ * ,
121+ id - ROW_NUMBER() OVER () AS id_diff
122+ FROM Stadium
123+ WHERE people >= 100
124+ )
124125SELECT id, visit_date, people
125126FROM Consecutive
126- WHERE id_diff IN (
127- SELECT id_diff
128- FROM Consecutive
129- GROUP BY id_diff HAVING COUNT (* ) > 2
130- )
127+ WHERE
128+ id_diff IN (
129+ SELECT id_diff
130+ FROM Consecutive
131+ GROUP BY id_diff
132+ HAVING COUNT (* ) > 2
133+ )
131134ORDER BY visit_date;
132135```
133136
You can’t perform that action at this time.
0 commit comments