Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

consecutive numbers sql

SELECT DISTINCT l1.Num AS ConsecutiveNums FROMLogs AS l1, Logs AS l2, Logs AS l3WHERE l1.Num = l2.Num AND l2.Num = l3.Num ANDl1.Id = l2.Id - 1 AND l2.Id = l3.Id - 1;
Source by nifannn.github.io #
 
PREVIOUS NEXT
Tagged: #consecutive #numbers #sql
ADD COMMENT
Topic
Name
5+6 =