I have a table with the following values:
Value
0
1.2
1.3
1.4
0
1.2
1.3
1.4
From the above data, I need to sum the 2 highest number after the set is reset to 0, thus coming to the total of 2.8.
If I could get row_number() to restart every time there is a 0, that would be perfect, however it doesn’t offer such functionality.
Thanks.
1 Answer