美文网首页
SQL——查找连续问题

SQL——查找连续问题

作者: 薛定谔与猫的故事 | 来源:发表于2018-04-24 21:23 被阅读0次
    描述
    # Write your MySQL query statement below
    select distinct a.Num as ConsecutiveNums
    from Logs as a,Logs as b,Logs as c
    where a.id = b.id-1 and b.id = c.id-1 and a.Num = b.Num and b.Num = c.Num;
    

    相关文章

      网友评论

          本文标题:SQL——查找连续问题

          本文链接:https://www.haomeiwen.com/subject/grjslftx.html