I'm new to MySQL. I don't quite understand why below query gives run time error?
select L1.Num as ConsecutiveNums from Logs L1, Logs L2, Logs L3
Where L1.Id=L2.Id-1 and L2.Id=L3.Id-1
and L1.Num=L2.Num and L2.Num=L3.Num
I,m also confuse this problem, the most star answer,if i copy his answer ,the judging is wrong,this makes me confuse