Would be cool if you could help me with my problem. I have a table where you can see events from a game. Every player has some amount of gold which you can see in a Value
column after Log in
. I need to find out with how much gold people start playing their FIRST game after Log in
. Before players start the game they can Buy gold
or Get bonus
which will raise their amount of gold by Value
**Player ID Timestamp Action Value**
1111 09:11 Log in 500
1111 09:25 Buy gold 100
1111 09:28 Get bonus 50
1111 09:30 Start game
2222 11:14 Log in 800
3333 12:01 Log in 700
3333 12:04 Get bonus 50
3333 12:08 Start game
3333 12:15 Buy gold 100
3333 12:18 Start game
1111 14:40 Log in 300
1111 14:42 Buy gold 100
1111 14:50 Start game
2222 15:22 Log in 600
2222 15:25 Buy gold 100
2222 16:25 Log in 400
2222 16:30 Get bonus 50
2222 16:35 Start game
Te result I am looking for is something like that. It is basically a SUM of Values between Start game
and the most recent Log in
of a player.
**Match number Player ID Value**
1 1111 650
2 3333 750
3 1111 400
4 2222 450
Thank you!