SELECT DISTINCT l1.Num AS ConsecutiveNumsFROM Logs l1,Logs l2,Logs l3WHERE l1.Id = l2.Id-1 AND l1.Id = l3.Id-2AND l1.Num =l2.Num AND l1.Num=l3.Num;