Skip to content

Commit bc3d8d1

Browse files
committed
added group by count in class subj taken
1 parent b1d1f12 commit bc3d8d1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ADVANCED SELECT AND JOINS/180. Consecutive Numbers.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ SELECT DISTINCT l1.num as ConsecutiveNums
33
FROM Logs l1
44
JOIN Logs l2 ON l1.num = l2.num and l1.id = l2.id + 1
55
JOIN Logs l3 ON l2.num = l3.num and l2.id = l3.id + 1;
6+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Write your MySQL query statement below
2+
SELECT class FROM Courses
3+
GROUP BY class HAVING COUNT(class) >= 5;

0 commit comments

Comments
 (0)