Hello,
I have a view which is similar to this :
ID Rank Flag
1 12 1
2 25 1
3 42 0
4 32 1
5 33 0
6 21 0
7 18 1
And here's the result of the querry I want to do
ID Rank Flag
1 12 1
2 67 1
4 86 1
7 18 1
Basicaly, I have to show rows where Flag = 1 and add the Rank(s) to the row above if Flag=0. I tried with the LAG fonction but can't find a way to manage the multiple Flag=0.
This table has more than 850e6 rows, I can't do it manualy.
To anyone who can help me, thanks.