Skip to content

Commit

Permalink
Create Consecutive-Nums.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
gabedonnan authored Mar 5, 2023
1 parent 90b3808 commit c520a4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SQL/Consecutive-Nums.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Write your MySQL query statement below
SELECT DISTINCT t1.num AS ConsecutiveNums
FROM Logs t1, Logs t2, Logs t3
WHERE t2.id = t1.id + 1 AND t3.id = t2.id + 1 AND t1.num = t2.num AND t2.num = t3.num

0 comments on commit c520a4b

Please sign in to comment.