All Downloads are FREE. Search and download functionalities are using the official Maven repository.

g0101_0200.s0180_consecutive_numbers.script.sql Maven / Gradle / Ivy

There is a newer version: 1.37
Show newest version
# Write your MySQL query statement below
# #Medium #Database
select distinct num as ConsecutiveNums from
(select num, lag(num,1) over(order by id) as l1, lag(num,2) over(order by id) as l2
from Logs) con_thr
where num = l1 and num = l2




© 2015 - 2024 Weber Informatics LLC | Privacy Policy