RWPC per postion

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

RWPC per postion

Postby shaiheart » Tue Jan 26, 2010 3:03 pm

Hello,

I've been trying to see how to separate between the CO&BU position and also the SB&BB. because in the ptracker its divided to LP and Blinds, under the hud section.
Since I'm trying to study how to work with the SQL, it would be great if anyone who understands could write how the "cnt_p_facing_limper" and "cnt_p_raise_limpers" should look like for the CO and BU.
And then the filtering for the postion will be built in, regardless to what i'll choose in the hud section.

Thanks in advance,

Shai.
shaiheart
 
Posts: 27
Joined: Sun Sep 06, 2009 12:27 pm

Re: RWPC per postion

Postby kraada » Tue Jan 26, 2010 3:25 pm

cnt_p_raise_limpers_btn:
sum( if[ holdem_hand_player_statistics.flg_p_first_raise AND NOT holdem_hand_player_statistics.flg_p_open_opp and holdem_hand_player_statistics.position = 0, 1 , 0 ] )

That's for just button. Position = 1 is the cutoff. For any stat just add the bolded bit to make it just button (and change the column name of course). You do need to update your cache to use stats that use new columns though.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: RWPC per postion

Postby shaiheart » Tue Jan 26, 2010 3:40 pm

so no need to change anything in the facing_limper?

dont i need to count those incidents out of those incidents that a player is calling instead of raising from a that exact postion? meaning the cnt_p_facing_limper?
shaiheart
 
Posts: 27
Joined: Sun Sep 06, 2009 12:27 pm

Re: RWPC per postion

Postby kraada » Tue Jan 26, 2010 4:04 pm

Yes, you'd need to add that into cnt_p_facing_limper as well. You can't take into account the position of the limper at this point, only the position of the player doing the raising with limpers in front.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: RWPC per postion

Postby shaiheart » Tue Jan 26, 2010 4:08 pm

why can't I choose where the player has limped instead of raised?

wont it ruin the whole point?

here's two versions of that, which would be the right one ? (cnt_p_facing_limper_BU)

this:
sum( if[ ((NOT holdem_hand_player_statistics.flg_p_face_raise) OR holdem_hand_player_statistics.flg_p_limp OR holdem_hand_player_statistics.flg_p_first_raise) AND NOT holdem_hand_player_statistics.flg_p_open_opp AND lookup_actions_p.action <> '0', 1 , 0 ] )

or this:
sum( if[ ((NOT holdem_hand_player_statistics.flg_p_face_raise) OR holdem_hand_player_statistics.flg_p_limp OR holdem_hand_player_statistics.flg_p_first_raise) AND NOT holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position = 0, 1, 0])
shaiheart
 
Posts: 27
Joined: Sun Sep 06, 2009 12:27 pm

Re: RWPC per postion

Postby kraada » Tue Jan 26, 2010 5:34 pm

The stat I showed you how to build earlier you run on a player to see how often they raise with previous callers. From that player's perspective, with the way the database and custom stat engine is currently built, it is not possible to see how often that player raises a limper who limped in MP. That's what you can't do.

Your second option is closer to what you want for cnt_p_facing_limpers_btn - you still want to keep lookup_actions_p.action <> '' in the equation though.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: RWPC per postion

Postby shaiheart » Fri Jan 29, 2010 4:07 pm

what will the lookup_p_action add to the story?
shaiheart
 
Posts: 27
Joined: Sun Sep 06, 2009 12:27 pm

Re: RWPC per postion

Postby kraada » Fri Jan 29, 2010 5:11 pm

They make sure you made some action - you want to avoid times where it's just folded to you in the BB.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: RWPC per postion

Postby shaiheart » Sat Jan 30, 2010 6:30 am

for some reason it wont let me add the lookup_actions_p.action <> '' to the statement, stating its not a valid SQL statement.
the expression without the lookup looks like this:

cnt_p_facing_limpers_CO:

sum( if[ ((NOT holdem_hand_player_statistics.flg_p_face_raise) OR holdem_hand_player_statistics.flg_p_limp OR holdem_hand_player_statistics.flg_p_first_raise) AND NOT holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position = 1, 1, 0])

how do i add it?
shaiheart
 
Posts: 27
Joined: Sun Sep 06, 2009 12:27 pm

Re: RWPC per postion

Postby WhiteRider » Sat Jan 30, 2010 6:57 am

Just copy & paste:
AND lookup_actions_p.action <> ''
..into your expression - note that it is two single quote, not one double quote.

This validates:
sum( if[ ((NOT holdem_hand_player_statistics.flg_p_face_raise) OR holdem_hand_player_statistics.flg_p_limp OR holdem_hand_player_statistics.flg_p_first_raise) AND NOT holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position = 1 AND lookup_actions_p.action <> '', 1, 0])
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

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

Who is online

Users browsing this forum: No registered users and 12 guests