Leetcode:连续出现的数字

https://leetcode-cn.com/problems/consecutive-numbers/

select distinct 
    t1.Num as ConsecutiveNums 
from 
    Logs t1,Logs t2,Logs t3 
where 
    t1.Id = t2.Id+1 and 
    t2.Id = t3.Id+1 and 
    t1.Num = t2.Num and 
    t2.Num = t3.Num;
发布了360 篇原创文章 · 获赞 73 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_43777983/article/details/105589960
今日推荐