Stuck in stat making process

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

Re: Stuck in stat making process

Postby Gster » Fri Apr 22, 2011 7:28 pm

Ah, ok thanks, Can you check this stat for me as well?

Does the below match the following description: The amount of times player has called at least once post-flop over the amount of times player has been post-flop.

(cnt_postf_call / cnt_postf_saw) * 100

I have 2 custom columns
1)cnt_postf_call

sum(if[(holdem_hand_player_statistics.cnt_f_call)+(holdem_hand_player_statistics.cnt_t_call)+(holdem_hand_player_statistics.cnt_r_call)>=1,1,0])

2)cnt_postf_saw

sum(if[holdem_hand_player_statistics.flg_f_saw OR holdem_hand_player_statistics.flg_t_saw OR holdem_hand_player_statistics.flg_r_saw, 1, 0])
Gster
 
Posts: 33
Joined: Mon Aug 04, 2008 1:50 pm

Re: Stuck in stat making process

Postby WhiteRider » Sat Apr 23, 2011 3:55 am

That's fine, but in the opportunities column you only need to check for seeing the flop - if you see the turn you had to see the flop. There is a built-in column for this called "cnt_f_saw".

In the actions column I would tend to do the brackets like this for clarity, but it shouldn't make any difference in this case:

sum(if[ (holdem_hand_player_statistics.cnt_f_call+holdem_hand_player_statistics.cnt_t_call+holdem_hand_player_statistics.cnt_r_call) >= 1, 1, 0 ])
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Stuck in stat making process

Postby Gster » Sat Apr 23, 2011 10:51 pm

Oh! Of course! ... and good tips ty!

I have another stat.

Does the below match the following description: The amount of times the player has folded post-flop to a bet over
the amount of times the player has had the opportunity to fold post-flop to a bet.

( cnt_postf_fold_face_bet / cnt_postf_fold_face_bet_opp )

I have 2 custom columns

1)cnt_postf_fold_face_bet

sum(if[ (holdem_hand_player_statistics.flg_f_fold AND holdem_hand_player_detail.amt_f_bet_facing > 0) OR
(holdem_hand_player_statistics.flg_t_fold AND holdem_hand_player_detail.amt_t_bet_facing > 0) OR
(holdem_hand_player_statistics.flg_r_fold AND holdem_hand_player_detail.amt_r_bet_facing > 0), 1, 0])

2)cnt_postf_fold_face_bet_opp

sum(if[ (holdem_hand_player_statistics.flg_f_saw AND holdem_hand_player_detail.amt_f_bet_facing > 0) OR
(holdem_hand_player_statistics.flg_t_saw AND holdem_hand_player_detail.amt_t_bet_facing > 0) OR
(holdem_hand_player_statistics.flg_r_saw AND holdem_hand_player_detail.amt_r_bet_facing > 0), 1, 0])
Gster
 
Posts: 33
Joined: Mon Aug 04, 2008 1:50 pm

Re: Stuck in stat making process

Postby kraada » Sun Apr 24, 2011 8:40 am

(2) is fine, but in (1) you are missing one option - you could raise the bet, face a re-raise then fold on the same street. That would satisfy your conditional (for say the flop) as you would both fold and have faced a bet - but you didn't fold to the bet. Instead of holdem_hand_player_statistics.flg_f_fold you should instead use lookup_actions_f.action SIMILAR TO ('F|XF'). For turn and river use lookup_actions_t and lookup_actions_r - but the conditions are the same. Now we're checking for either your first non-checking action to be fold - and if you faced a bet and folded the first chance you got, you must have folded to the bet itself.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Stuck in stat making process

Postby Gster » Sun Apr 24, 2011 7:42 pm

Perfect, I think I get it.

I just to make sure I understand how the ("F|XF") part works.

The way I understand it is: lookup_actions_f.action SIMILAR TO ('F|XF') is set to "true" if either

1) the player folded straight up when he could've checked or
2) the player check folded (this also applies in multiway pots)

Did I understand this properly?
Gster
 
Posts: 33
Joined: Mon Aug 04, 2008 1:50 pm

Re: Stuck in stat making process

Postby kraada » Mon Apr 25, 2011 8:14 am

The implication in the F portion is that someone made a bet before you acted - then you folded to it. If you open folded it would count too, I suppose, but I didn't think most sites still allowed that sort of silliness given that checking completely dominates folding as a strategy for all people in all situations.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Stuck in stat making process

Postby Gster » Mon Apr 25, 2011 4:26 pm

No, you're right, most sites don't. It's just when I saw this part ('F|XF') the way I made sense of it was.

1) the player folded straight up when he could've checked ( 'F | XF' ) or
2) the player check folded (this also applies in multiway pots) ( 'F | XF' )

I assumed the "|" (vertlcal separator) was a another way of saying "or". ('F|XF') = ('Fold or check fold')

I'm thinking the part "lookup_actions_f.action" is the part that makes sure that someone made a bet before you acted.

I'm trying to understand every aspect of the expression, is this how everything works?
Gster
 
Posts: 33
Joined: Mon Aug 04, 2008 1:50 pm

Re: Stuck in stat making process

Postby kraada » Mon Apr 25, 2011 4:57 pm

You're correct that | is or. lookup_actions_f.action is the string of your actions on the flop. So if you checked, then called, then raised, then folded, lookup_actions_f.action for that hand for you would be XCRF.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Stuck in stat making process

Postby Gster » Mon Apr 25, 2011 8:59 pm

Ah alright

I made the change you suggested, is it ok now?

Does the below match the following description: The amount of times the player has folded post-flop to a bet over
the amount of times the player has had the opportunity to fold post-flop to a bet.

( cnt_postf_fold_face_bet / cnt_postf_fold_face_bet_opp )

I have 2 custom columns

1)cnt_postf_fold_face_bet

sum(if[ (lookup_actions_f.action SIMILAR TO ('F|XF') AND holdem_hand_player_detail.amt_f_bet_facing > 0) OR
(lookup_actions_t.action SIMILAR TO ('F|XF') AND holdem_hand_player_detail.amt_t_bet_facing > 0) OR
(lookup_actions_r.action SIMILAR TO ('F|XF') AND holdem_hand_player_detail.amt_r_bet_facing > 0), 1, 0])

2)cnt_postf_fold_face_bet_opp

sum(if[ (holdem_hand_player_statistics.flg_f_saw AND holdem_hand_player_detail.amt_f_bet_facing > 0) OR
(holdem_hand_player_statistics.flg_t_saw AND holdem_hand_player_detail.amt_t_bet_facing > 0) OR
(holdem_hand_player_statistics.flg_r_saw AND holdem_hand_player_detail.amt_r_bet_facing > 0), 1, 0])
Gster
 
Posts: 33
Joined: Mon Aug 04, 2008 1:50 pm

Re: Stuck in stat making process

Postby kraada » Tue Apr 26, 2011 8:36 am

That looks good.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

PreviousNext

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

Who is online

Users browsing this forum: No registered users and 13 guests

cron