get best streak with all details of each row
- by Pritesh Gupta
ID user_id win
1 1 1
2 1 1
3 1 0
4 1 1
5 2 1
6 2 0
7 2 0
8 2 1
9 1 0
10 1 1
11 1 1
12 1 1
13 1 1
14 3 1
I needs to get the complete row for the best streak. I am able to get best streak no. for each user using this post.
get consecutive records in mysql
Now, I needs to get each rows data for that are involved in the best streak. i.e. for user=1,
I need the complete row data for id=10,11,12,13. i.e. user_id,win and id value for these best streak row using mysql.
Kindly help me on this.