add remove language chart show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id userid first amount
1 1 0 5
2 1 10 10
3 1 10 5
4 1 15 10
5 2 0 10
6 2 0 5
7 2 10 5
id userid first amount last prevlast
1 1 0 5 5 null
2 1 10 10 20 5
3 1 10 5 15 5
4 1 15 10 25 20
5 2 0 10 10 null
6 2 0 5 5 null
7 2 10 5 15 10
userid prevlast minfirst maxlast gaplen
1 null 0 5 0
1 5 10 20 -5
1 20 15 25 0
2 null 0 10 0
2 10 10 15 0
userid total
1 20
2 15
userid min(first) last
1 0 5
1 10 25
2 0 15
userid total
1 20
2 15