We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d796c1e commit e9c31a0Copy full SHA for e9c31a0
1 file changed
MySQL/consecutive-numbers.sql
@@ -29,7 +29,7 @@ FROM (
29
) sq
30
WHERE how_many_cnt_in_a_row >= 3
31
32
-# Solution 1
+# Solution 2
33
SELECT DISTINCT l1.Num as ConsecutiveNums
34
FROM Logs l1, Logs l2, Logs l3
35
WHERE l1.Id + 1 = l2.Id AND l2.Id + 1 = l3.Id AND l1.Num = l2.Num AND l2.Num = l3.Num
0 commit comments