Skip to content

Commit

Permalink
Time: 458 ms (91.23%), Space: 0B (100.00%) - LeetHub
Browse files Browse the repository at this point in the history
  • Loading branch information
joseantoniochacon committed Sep 26, 2024
1 parent 62d0bc9 commit 8e64bd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 0180-consecutive-numbers/0180-consecutive-numbers.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Write your MySQL query statement below
SELECT DISTINCT number AS ConsecutiveNums FROM (SELECT num AS number, LEAD(num, 1) over (ORDER BY id) AS next_number, LAG(num, 1) over (ORDER BY id) AS previous_number FROM Logs) numbers WHERE number = next_number AND number = previous_number;

0 comments on commit 8e64bd5

Please sign in to comment.