@rick_b wrote: Thank you for your suggestions. It is difficult to find a subsample that better illustrates the nuances than the one I provided. I included bet and event days in an attempt to make the visual logic more understandable. The last issue you ask me to clarify is the one that I really need help solving - identifying the last completed 'block' of bets. Games last three hours and begin only on certain days/times, but betting is continuous, so I need to identify a way to efficiently establish the last completed round of bet-on games prior to each bet. I've tried establishing bet and event blocks but keep encountering problems when trying to properly sum just the most recent set of bet outcomes. Here is my current approach (which is incomplete but may help stimulate new ideas). I will amend with another gamblers' bets in a moment... if event_dayofweek='Monday' and event_hour=13 then event_block=1; if event_dayofweek='Monday' and event_hour=16 then event_block=2; if event_dayofweek='Monday' and event_hour=20 then event_block=3; if event_dayofweek='Tuesday' then event_block=4;*week 15 2021; if event_dayofweek='Thursday' and event_hour=12 then event_block=5; if event_dayofweek='Thursday' and event_hour=16 then event_block=6; if event_dayofweek='Thursday' and event_hour=20 then event_block=7; if event_dayofweek='Friday' then event_block=8; if event_dayofweek='Saturday' and event_hour=13 then event_block=9; if event_dayofweek='Saturday' and event_hour=16 then event_block=10; if event_dayofweek='Saturday' and event_hour=20 then event_block=11; if event_dayofweek='Sunday' and event_hour=9 then event_block=12; if event_dayofweek='Sunday' and event_hour=13 then event_block=13; if event_dayofweek='Sunday' and event_hour=16 then event_block=14; if event_dayofweek='Sunday' and event_hour=19 then event_block=15; if event_dayofweek='Sunday' and event_hour=20 then event_block=15; *; if bet_dayofweek='Monday' and bet_hour<16 then last_event_block_completed=15; I think we need to use a sliding window calculation method, where each new result is added to the total of the previous ones until the event is completed. It's funny, I couldn't even imagine that behind the beautiful picture in games there could be such complex databases and calculations. When I started working with this, I hadproblems with banuses. I mean, those that can be obtained, for example, in gamblizard and elsewhere. For us, this is routine work. For ordinary people who play, this is just entertainment. I often think about this. if bet_dayofweek='Monday' and bet_hour ge 16 and bet_hour<20 then last_event_block_completed=1; if bet_dayofweek='Monday' and bet_hour ge 20 and bet_hour<23 then last_event_block_completed=2; if bet_dayofweek='Monday' and bet_hour ge 23 then last_event_block_completed=3; if bet_dayofweek='Tuesday' then last_event_block_completed=3; if bet_dayofweek='Wednesday' then last_event_block_completed=3; if bet_dayofweek='Thursday' and bet_hour<16 then last_event_block_completed=4; if bet_dayofweek='Thursday' and bet_hour ge 16 and bet_hour<20 then last_event_block_completed=5; if bet_dayofweek='Thursday' and bet_hour ge 20 and bet_hour le 23 then last_event_block_completed=6; if bet_dayofweek='Thursday' and bet_hour ge 23 then last_event_block_completed=7; if bet_dayofweek='Friday' then last_event_block_completed=7; if bet_dayofweek='Saturday' and bet_hour<16 then last_event_block_completed=8; if bet_dayofweek='Saturday' and bet_hour ge 16 and bet_hour<20 then last_event_block_completed=9; if bet_dayofweek='Saturday' and bet_hour ge 20 and bet_hour<23 then last_event_block_completed=10; if bet_dayofweek='Saturday' and bet_hour ge 23 then last_event_block_completed=11; if bet_dayofweek='Sunday' and bet_hour<13 then last_event_block_completed=11; if bet_dayofweek='Sunday' and bet_hour ge 13 and bet_hour<16 then last_event_block_completed=12; if bet_dayofweek='Sunday' and bet_hour ge 16 and bet_hour<20 then last_event_block_completed=13; if bet_dayofweek='Sunday' and bet_hour ge 20 and bet_hour<23 then last_event_block_completed=14; if bet_dayofweek='Sunday' and bet_hour ge 23 then last_event_block_completed=15; You need to calculate the running profit/loss for each player, starting from the last completed event.
... View more