Skip to content

Commit e801132

Browse files
authored
Merge pull request #212 from GreatAlgorithm-Study/dahye
rename: sql 파일명 수정
2 parents dfc2b58 + 445227c commit e801132

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
WITH CTE AS (
3+
SELECT id
4+
, visit_date
5+
, (id - ROW_NUMBER() OVER()) `group_id`
6+
, people
7+
FROM STADIUM
8+
WHERE PEOPLE >= 100
9+
)
10+
11+
SELECT id, visit_date, people
12+
FROM cte
13+
WHERE group_id in (
14+
SELECT group_id
15+
FROM cte
16+
GROUP BY(group_id)
17+
HAVING COUNT(group_id) >= 3
18+
)
File renamed without changes.

0 commit comments

Comments
 (0)