Check % from BB

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

Check % from BB

Postby merkur33 » Fri Feb 06, 2009 6:25 am

I made a stat which shows the percentage of checks from the big blind. Its

(cnt_p_bb_check / cnt_p_bb_check_opp) * 100, where is

cnt_p_bb_check: sum( if[tourney_holdem_hand_player_statistics.flg_blind_b AND tourney_holdem_hand_player_statistics.flg_p_face_raise = false AND tourney_holdem_hand_player_statistics.cnt_p_raise = 0 AND tourney_holdem_hand_player_statistics.flg_f_saw, 1, 0] ) and

cnt_bb_check_opp: sum( if[tourney_holdem_hand_player_statistics.flg_blind_b AND tourney_holdem_hand_player_statistics.flg_p_face_raise = false AND tourney_holdem_hand_player_statistics.flg_f_saw, 1, 0] ).

The Problem is: It doesn't work as it should; and i cant think of my mistake... :( Thanks in advance...
merkur33
 
Posts: 126
Joined: Tue Nov 25, 2008 11:57 am

Re: Check % from BB

Postby kraada » Fri Feb 06, 2009 10:57 am

Your opportunity column won't actually show opportunities you had to check, just the times you saw the flop without facing a preflop raise. This means that if it's limped to you in the big blind, and you raise, and everyone folds it wouldn't show as a check opportunity with your setup.

There's actually a much easier way to define cnt_p_bb_check though:

sum(if[substring(lookup_actions_p.action from 1 for 1) = 'X', 1, 0])

That's all of the times preflop your action specifically was checking. See this post for a bit more explanation on this function.

For check opportunities you want:

sum(if[(substring(lookup_actions_p.action from 1 for 1) = 'X') OR (tourney_holdem_hand_player_statistics.flg_blind_b AND tourney_holdem_hand_player_statistics.flg_p_first_raise), 1, 0])

This way you either checked, or you're in the big blind and made the first raise of the hand (which means you had a chance to check, but raised). Since those are your only two options when it's limped to you in the BB, this will give you check opportunities.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Check % from BB

Postby merkur33 » Fri Feb 06, 2009 2:02 pm

Thanks a lot; i will have to look into this lookup-action-stuff, looks very interesting.

The idea for the check for saw flop was to sort out the cases where even the small blind folded and i got the pot without flop. I overslept the possibility that everyone folds preflop to my raise, of course... (maybe because it happenes so rarely... :lol: ). And also other weird stuff like limped to, raised, got a 3bet and folded wouldn't work...
merkur33
 
Posts: 126
Joined: Tue Nov 25, 2008 11:57 am

Re: Check % from BB

Postby kraada » Fri Feb 06, 2009 2:31 pm

Yeah that wasn't supposed to be the only case that didn't work, just the first one that came to mind :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 0 guests