Custom Stat - Tourney All In

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

Custom Stat - Tourney All In

Postby hotdiggy1121 » Fri Aug 06, 2010 1:55 am

Hey Guys,

Little help please. I posted this in the General forum(http://www.pokertracker.com/forums/viewtopic.php?f=15&t=30003) and Kraada let me now I needed to build a custom stat. I've gone through the custom stat thing for hours - I'm just not getting it.

1)First, I'd like to get a % of the times an opponent faced a preflop all in and called. I started by trying to create a stat to count the # of times they face a preflop all in but it said it's invalid: cnt_p_allin_def_opp. Then I'm thinking I need another stat that looks something like this: cnt_p_allin_def_opp_call. So then I can create a stat: (cnt_p_allin_def_opp/cnt_p_allin_def_opp_call) * 100

I'd really appreciate it if someone can point me in the right direction.

2) My ultimate goal is to have a pop that lists ranges for calling preflop all ins, as well as, RFI and going all in preflop. Kraada said it's be pretty intense. I'm hoping that if someone can help me wih the first part I'll start to understand enough to do the rest.

Thanks In Advance.
hotdiggy1121
 
Posts: 8
Joined: Fri Aug 07, 2009 10:00 pm

Re: Custom Stat - Tourney All In

Postby kraada » Fri Aug 06, 2010 9:12 am

(1) You have the right general plan, though you actually want (cnt_p_allin_def_opp_call/cnt_p_allin_def_opp) * 100. When building a percentage you want the number of times the thing happened on top of the fraction and the opportunities on the bottom. But you need to build these columns on the Columns tab.

The definitions for these should be as follows:

cnt_p_allin_def_opp_call: sum(if[tourney_holdem_hand_player_statistics.enum_face_allin = 'P' and (tourney_holdem_hand_player_statistics.enum_face_allin_action = 'C' OR tourney_holdem_hand_player_statistics.enum_face_allin_action = 'R'), 1, 0])

cnt_p_allin_def_opp: sum(if[tourney_holdem_hand_player_statistics.enum_face_allin = 'P', 1, 0])

Note that I added the OR action = 'R' meaning the player's raises of the all-in are counted as well. You can remove that bit if you'd prefer. Also this is four tourneys, to make the cash games version remove "tourney_" everywhere you see it (and put it in the right Section).

(2) To check for specific hole cards you want to add "AND tourney_holdem_player_statistics.id_holecard = X" where X is some number between 1 and 169. For the list of which matches to which, see here. For each card pair you want you have to create a new column and then a new stat. Hence it getting tedious very quickly.
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