Hello
I have a Table with two field and one million row.
List of this table has been generated by SQL "Group By" command.
it's looks like below table,
now, I want to select those rows of the table which the difference between the value of each row and previous row in second fields (and same group) are greater than 5.
Input Output ???
------|-------
A 2 A 2
A 3
A 6
A 20 A 20
A 37 A 37
Z 38 Z 38
Z 21
Z 70 Z 70
D 18 D 18
D 19
D 22
D 90 D 90
D 125 D 125
Whould you please help me to find a solution by SQL.
Many thanks
I have a Table with two field and one million row.
List of this table has been generated by SQL "Group By" command.
it's looks like below table,
now, I want to select those rows of the table which the difference between the value of each row and previous row in second fields (and same group) are greater than 5.
Input Output ???
------|-------
A 2 A 2
A 3
A 6
A 20 A 20
A 37 A 37
Z 38 Z 38
Z 21
Z 70 Z 70
D 18 D 18
D 19
D 22
D 90 D 90
D 125 D 125
Whould you please help me to find a solution by SQL.
Many thanks