I have a table that has 2 columns - date, and result. The result column has values of either 'w' or 'l'. I want to be able order the records by date (desc), find out what the value is for result for the most recent date, then count the number of consecutive values that match that value:
for example:
date result
1/19 w
1/18 w
1/17 w
1/16 l
I would like to return "3" as the value.
Thanks for any help on the subject.
Mason