文章目录 一、code1.1 题目描述1.2 题解 二、总结 一、code 1.1 题目描述 Leetcode地址 1.2 题解 select distinct # 去重 l1.num as ConsecutiveNums from Logs l1, Logs l2, Logs l3 where l1.id + 1 = l2.id # 连续三个 and l2.id = l3.id - 1 and l1.num = l2.num # 值相同 and l2.num = l3.num ; 二、总结