I've tried things along the lines of the following column expression which is meant to count hands where a villain on the button has at least 10 bb, although I haven't been able to produce valid SQL.
- Code: Select all
sum(if[(select amt_p_effective_stack from cash_hand_player_statistics as button
where (cash_hand_player_statistics.id_hand = button.id_hand
and cash_hand_player_statistics.id_player <> button.id_player
and button.cnt_players_lookup_position = 0)
/ cash_limit.amt_bb) >= 10, 1, 0])
It seems that the table I've selected and named "button" needs to include all columns rather than just amt_p_effective_stack so that the subsequent comparisons can be made, but I'm not sure how to do that (can you use "*" to indicate all columns?) while also grabbing the effective stack amount itself. Thanks for any direction you can provide.