Leetcode SQL Problem | Consecutive Numbers #sql #interview #joins

preview_player
Показать описание
In this video we will solve a leetcode problem 180 , where we have to find all numbers that appear at least three times consecutively.
Return the result table in any order.

#sql #interview #joins

Connect with me on the below platforms-
Рекомендации по теме
Комментарии
Автор

Tried below query

Select l1.num as final from
Logs l1, logs l2, logs l3
Where l1.id=l2.id+1 and l1.id=l3.id+2
And l1.num=l2.num and l1.num=l3.num

jayakrishna
welcome to shbcf.ru