180. 连续出现的数字 + MySql + 连续出现数字 + 多表联合查询
180. 连续出现的数字
LeetCode_MySql_180
题目描述
代码实现
# Write your MySQL query statement below
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;
Either Excellent or Rusty