一、题目 二、代码 # 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 三、运行结果