I have looked at both the stack size stat and the thread you linked too. I copied the preflop stack size stat as a template for my custom stat, however, I get the error "The statement is not valid SQL".
COLUMNS TABStat name = val_street_hand_ends
Expression =
- Code: Select all
if[ NOT(cash_hand_player_statistics.flg_f_saw), 1, if[ (cash_hand_player_statistics.flg_f_saw and not cash_hand_player_statistics.flg_t_saw), 2, if[ (cash_hand_player_statistics.flg_t_saw and not cash_hand_player_statistics.flg_r_saw), 3, if[ (cash_hand_player_statistics.flg_r_saw and not cash_hand_player_statistics.flg_showdown), 4, if[ cash_hand_player_statistics.flg_showdown, 5]]]]]
^^"The statement is not valid SQL"^^Description = Groups hands by the street players hands end. Values are: 1 - Preflop. 2 - Flop. 3 - Turn. 4 - River. 5 - Showdown.
I'm confused why this is not valid? It follows the same format as "val_p_stack_size".
If the above was to be valid, I would then create:
STATS TABStat name = Street Hand Ends
Format type = Expression
- Code: Select all
if(this = 1, format('Preflop'), if(this = 2, format('Flop'), if(this = 3, format('Turn'), if(this = 4, format('River'), if(this = 5, format('Showdown'), format('Error'))))))
Summary type = Expression
- Code: Select all
format('{1} Street(s)', this)
This stats would be templated from "Preflop Stack Size"