Below is my code and I think it should be working fine. Any idea how to improve it? Thanks!
select b.Num Num2 FROM log as a left join log b on a.Num = b.Num and b.Id = a.Id + 1 having count(Num2) > 2;
You should join three table, not just 2
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.