You're on the right lines, yes.
You need to make a new Column to include the calculation based on the database fields.
What you've done here:
DpR33 wrote:if(holdem_hand_player_statistics.flg_blind_b or holdem_hand_player_statistics.flg_blind_s and holdem_hand_player_statistics.flg_blind_def_opp and holdem_hand_summary.cnt_players_f and
holdem_hand_player_statistics.cnt_f_call and holdem_hand_player_statistics.flg_t_check_raise, 1,0)
Is heading in the right direction, but...
1. If you are testing for a blind steal, you don't need to check that you're in the blinds, so instead of ..
holdem_hand_player_statistics.flg_blind_b or holdem_hand_player_statistics.flg_blind_s and holdem_hand_player_statistics.flg_blind_def_opp
..you could just use..
holdem_hand_player_statistics.flg_blind_def_opp
(
note: I *think* I'm right in saying that - I don't think the button will count as facing a steal raise if the cutoff open-raises, since they haven't got any money invested to be stolen..
If you do need to use all 3, then you would be better with some brackets to make sure the context is correct.
(holdem_hand_player_statistics.flg_blind_b or holdem_hand_player_statistics.flg_blind_s) and holdem_hand_player_statistics.flg_blind_def_opp)
2. You shouldn't just check..
.. AND holdem_hand_summary.cnt_players_f AND ..
You need to check for..
holdem_hand_summary.cnt_players_f = 2 (or whatever).
3. Same with..
holdem_hand_player_statistics.cnt_f_call > 0
4. Then you put your 'if' statement in a 'sum', so the Column Expression looks like this:
sum( if[ <all of the above>, 1, 0] )
If all of the above statements about the hand are true, it will count one, otherwise it will count zero - so after it goes through all your hands, it will have counted how often those criteria (filters) were met.
5. When you create this new 'Column' it doesn't actually create a column anywhere, it just creates a new calculation value as if it was a new column in the database (but it isn't actually).
You then use this new Column in your new Statistic.
Have a look at this great new walkthrough that Kraada wrote:
viewtopic.php?f=18&t=10638#p495046. Of course, the Statistic you build based on that new Column will only count how often it happens - if you want to know how often they check-raise the turn as a percentage of the times they check/call the flop and then check the turn, you will need to create another Column to count the opportunities. See the walkthrough above, or the others in the
Custom Statistics and Reports FAQ.
Have another play with it, and let me know how you get on.
It's bedtime for me now, but if you're still struggling tomorrow I'll help you further. If you can learn how to this stat, though, you'll be able to build more for yourself.
"Teach a man to fish...", and all that.