180. Consecutive Numbers

Select DISTINCT l1.Num from Logs l1, Logs l2, Logs l3 
where l1.Id=l2.Id-1 and l2.Id=l3.Id-1 
and l1.Num=l2.Num and l2.Num=l3.Num

  

posted @ 2017-10-25 04:39  Weiyu Wang  阅读(107)  评论(0编辑  收藏  举报