In SQL, id is the primary key for this table. id is an autoincrement column. Find all numbers that appear at least three times consecutively. Return the result table in any order. The result format is ...
LAG(num, 1) OVER (ORDER BY id) AS prev1, LAG(num, 2) OVER (ORDER BY id) AS prev2 JOIN Logs l2 ON l1.id = l2.id - 1 JOIN Logs l3 ON l2.id = l3.id - 1 ...