최소 세번 연속적으로 등장하는 숫자를 모두 찾아라.
SELECT DISTINCT l.num AS consecutivenums
FROM (
SELECT NUM
,LEAD(NUM,1) OVER (ORDER BY id) AS next
,LEAD(NUM,2) OVER (ORDER BY id) AS afternext
FROM logs
) l
WHERE l.num=l.next AND l.num =l.afternext