I have an SQL query that returns the following table about a single team:
date gameid pointsfor pointsagainst
2011-03-20 15 1 10
2011-03-27 17 7 3
2011-04-03 23 6 5
2011-04-10 30 5 4
2011-04-17 35 4 8
2011-05-01 38 8 1
2011-05-08 43 3 7
2011-05-15 48 6 2
2011-05-22 56 10 2
2011-05-29 59 4 5
2011-06-05 65 2 3
2011-06-19 71 5 6
2011-06-19 74 12 2
2011-06-19 77 5 2
2011-06-19 80 5 4
From this table, could anybody please help me calculate what the longest winning and losing streaks are?
I've had a look at a few other examples on here but have struggled to follow them as they are not quite the same as mine. Any help would be greatly appreciated. Thanks!