stat formulation

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

stat formulation

Postby raph156 » Sun Oct 02, 2011 4:44 pm

i had to change the tab selection befor the loading to escape the lag, so now i can configure the wrong stat;

face bet and no fold for any street and a particular amount, whats wrong?
sum( if[(holdem_hand_player_detail.amt_f_bet_facing BETWEEN ( 11*holdem_limit.amt_bb) AND ( 25*holdem_limit.amt_bb) AND NOT substring(lookup_actions_f.action from 1 for 1)='X' OR holdem_hand_player_detail.amt_t_bet_facing BETWEEN ( 11*holdem_limit.amt_bb) AND ( 25*holdem_limit.amt_bb) AND NOT substring(lookup_actions_t.action from 1 for 1)='X' OR holdem_hand_player_detail.amt_r_bet_facing BETWEEN ( 11*holdem_limit.amt_bb) AND ( 25*holdem_limit.amt_bb) AND NOT substring(lookup_actions_r.action from 1 for 1)='X'),1 ,0])

Thanks for help
raph156
 
Posts: 159
Joined: Tue Feb 09, 2010 3:22 pm

Re: stat formulation

Postby WhiteRider » Mon Oct 03, 2011 3:29 am

You will need to put brackets in your expressions to specify the order of the operations.

a AND NOT b OR c AND d

..is open to misinterpretation.
You will need to write it like:

(a AND (NOT b)) OR (c AND d)

..for instance.

Also, if you're looking for not folding you need to check for 'F', not 'X'.
Furthermore, if you fold to a bet your actions string could be either 'XF' or 'F', so you may want to use:

holdem_hand_player_detail.amt_f_bet_facing SIMILAR TO '(F|XF)'
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 0 guests