fold turn probe to raise

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

fold turn probe to raise

Postby xnnhep » Fri Mar 11, 2011 7:02 pm

creating a custom stat that calculates how often the following happens:

A raises preflop, B calls OOP
Flop action: check, check
Turn action: A bets, B raises, A folds

(cnt_t_probe_face_raise_fold_srp / cnt_t_probe_face_raise_opp_srp) * 100

cnt_t_probe_face_raise_fold_srp =
sum(if[lookup_actions_t.action LIKE 'BF' and lookup_actions_f.action LIKE 'X' and
lookup_actions_p.action NOT LIKE '%R' and
not(holdem_hand_player_statistics.flg_p_3bet OR holdem_hand_player_statistics.flg_p_4bet) and holdem_hand_player_statistics.flg_p_face_raise and
not(holdem_hand_player_detail.flg_t_has_position), 1, 0])

cnt_t_probe_face_raise_opp_srp =
sum(if[lookup_actions_t.action LIKE 'B' and lookup_actions_f.action LIKE 'X' and
lookup_actions_p.action NOT LIKE '%R' and
not(holdem_hand_player_statistics.flg_p_3bet OR holdem_hand_player_statistics.flg_p_4bet) and holdem_hand_player_statistics.flg_p_face_raise and
not(holdem_hand_player_detail.flg_t_has_position) and
holdem_hand_player_statistics.flg_t_3bet_opp, 1, 0])

when i test this stat my hud tracks the numerator but not the denominator (N/A 1/0). what am i doing wrong?
xnnhep
 
Posts: 15
Joined: Wed Feb 23, 2011 2:27 am

Re: fold turn probe to raise

Postby WhiteRider » Sat Mar 12, 2011 6:03 am

lookup_actions_t.action LIKE 'B'
..will only be true when the actions string is EXACTLY 'B'.
In this case you need to check for it starting with B and then including at least one more character.
To do that you need to use wildcards, like this:

lookup_actions_t.action LIKE 'B_%'

The underscore _ means any single character, and the percent % means any zero or more characters.
See the Tutorial: Custom Reports and Statistics for more information on using LIKE for pattern matching.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: fold turn probe to raise

Postby xnnhep » Sat Mar 12, 2011 6:01 pm

perfect, this solved the problem. thanks as always.
xnnhep
 
Posts: 15
Joined: Wed Feb 23, 2011 2:27 am


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests