How to get count of consecutive record which has the same value.
e.g.
select * from temp;
output
---------
Id Grade
1 A
2 D
3 A
4 B
5 A
6 A
7 A
i want the count of A whcih is consecutive nad latest one
my output should be
Grade Count
A 3
e.g.
select * from temp;
output
---------
Id Grade
1 A
2 D
3 A
4 B
5 A
6 A
7 A
i want the count of A whcih is consecutive nad latest one
my output should be
Grade Count
A 3
Comment