[문제]
[MySQL]
SELECT DISTINCT num AS ConsecutiveNums
FROM (
SELECT num
, LEAD(num, 1) OVER (ORDER BY id) AS num_1_after
, LEAD(num, 2) OVER (ORDER BY id) AS num_2_after
FROM Logs) AS nums_list
WHERE num = num_1_after
AND num_1_after = num_2_after
'SQL > LeetCode' 카테고리의 다른 글
| [LeetCode] 182. Duplicate Emails (0) | 2025.02.17 |
|---|---|
| [LeetCode] 181. Employees Earning More Than Their Managers (0) | 2025.02.17 |
| [LeetCode] 178. Rank Scores (0) | 2025.02.17 |
| [LeetCode] 176. Second Highest Salary (0) | 2025.02.17 |
| [LeetCode] 175. Combine Two Tables (0) | 2025.02.17 |
