编写一个 SQL 查询,查找所有至少连续出现三次的数字。
# Write your MySQL query statement below
SELECT distinct a1.Num as ConsecutiveNums
from Logs a1,logs b1, logs c1
where a1.Id = b1.Id-1
and c1.Id = b1.Id+1
and a1.Num = b1.Num
and b1.Num = c1.Num
编写一个 SQL 查询,查找所有至少连续出现三次的数字。
# Write your MySQL query statement below
SELECT distinct a1.Num as ConsecutiveNums
from Logs a1,logs b1, logs c1
where a1.Id = b1.Id-1
and c1.Id = b1.Id+1
and a1.Num = b1.Num
and b1.Num = c1.Num