Watch out the key word: consecutively!!! Here is my solution.

  • 1
    select distinct a.Num from Logs a 
    inner join Logs b on = 
    inner join Logs c on =
    where a.Num = b.Num and a.Num = c.Num

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.