Pushing post with nothing

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

Pushing post with nothing

Postby preparac » Sat Jan 22, 2011 2:01 pm

Kraada or witherider

I'm building a stat that shows me when sombedy ist pushing post with nothing (i.e. highcard). Could you have a look at this column, to see if I made a major mistake or so ...? I would aprecaiate it much

(((lookup_actions_f.action = 'B' OR lookup_actions_f.action = '%R') AND (tourney_holdem_hand_player_statistics.enum_allin = 'F') AND ((tourney_holdem_hand_player_combinations.flg_f_highcard) OR
(tourney_holdem_hand_player_combinations.flg_f_1pair AND tourney_holdem_hand_player_combinations.id_f_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_f_threeoak AND tourney_holdem_hand_player_combinations.id_f_hand_strength = 0))) OR

((lookup_actions_t.action = 'B' OR lookup_actions_t.action = '%R') AND (tourney_holdem_hand_player_statistics.enum_allin = 'T') AND ((tourney_holdem_hand_player_combinations.flg_t_highcard) OR
(tourney_holdem_hand_player_combinations.flg_t_1pair AND tourney_holdem_hand_player_combinations.id_t_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_t_2pair AND tourney_holdem_hand_player_combinations.id_t_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_t_threeoak AND tourney_holdem_hand_player_combinations.id_t_hand_strength = 0))) OR

((lookup_actions_r.action = 'B' OR lookup_actions_r.action = '%R') AND (tourney_holdem_hand_player_statistics.enum_allin = 'R') AND ((tourney_holdem_hand_player_combinations.flg_r_highcard) OR
(tourney_holdem_hand_player_combinations.flg_r_1pair AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_r_2pair AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_r_threeoak AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_r_straight AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_r_flush AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_r_fullhouse AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_r_fouroak AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0) OR (tourney_holdem_hand_player_combinations.flg_r_strflush AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0))))
preparac
 
Posts: 323
Joined: Thu May 15, 2008 6:23 am

Re: Pushing post with nothing

Postby WhiteRider » Sat Jan 22, 2011 4:51 pm

I don't see any obvious errors in your logic, but you are checking for a lot more than having 1 pair - is that what you intend?
For the river you are checking every possible hand combination?
What are you trying to do with "tourney_holdem_hand_player_combinations.flg_r_fouroak AND tourney_holdem_hand_player_combinations.id_r_hand_strength = 0" for instance? That says that you have 4 of a kind - the "strength" is only the strength within 4 of a kind hands.
If you only want to check for 1 pair hands or worse just use "tourney_holdem_hand_player_combinations.flg_f_highcard OR tourney_holdem_hand_player_combinations.flg_f_1pair".

Bear in mind that the "combinations" fields in the database can cause stats to take a lot longer to retrieve - Kraada has built a few of these kind of stats but I don't think he uses them in his HUD. He should be back on tomorrow and I'm sure he'll comment.

Ah, sorry - I did spot a mistake!

lookup_actions_f.action = '%R'

..will not work. When using wildcards you need to use LIKE. If you use = it compares that exact string.
This will work:

lookup_actions_f.action LIKE '%R'
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Pushing post with nothing

Postby preparac » Sat Jan 22, 2011 8:09 pm

Whiterider

Thanks for the hint. Strangely enough i don't get any error message with the = '%R' string .... I changed the stat though and PTR gives now different numbers back ... so I guess due to this typo it just didn't count the raise-allin cases ...?

I included handstrenght "0" from other groups like straights , fullhouses etc. on the board because obviously people sometimes also bluff at theese made boards with nothing ... I might leave out the 4oak board though ...

And yes theese stats are slowing down the cache update considerably (and popup stats also need more time until they are ready, but it's still on a tolerable level...)

For the denominator I want to exclude hands where somebody else went allin (because bluffs would be pointless in most of theese situation obviously) ... I do this like this:

AND NOT(tourney_holdem_hand_player_statistics.enum_face_allin = 'F' OR tourney_holdem_hand_player_statistics.enum_face_allin = 'T' OR tourney_holdem_hand_player_statistics.enum_face_allin = 'R')

... or you ghave a better idea?
preparac
 
Posts: 323
Joined: Thu May 15, 2008 6:23 am

Re: Pushing post with nothing

Postby WhiteRider » Sun Jan 23, 2011 5:55 am

= '%R' is valid, but it won't work as you expect. It checks for the actions being exactly %R, which they will never be of course (because % isn't an action). LIKE interprets the % as any zero or more characters, but = just checks for the % character.

I see what you mean, and your method for excluding all-ins looks OK. You might want to include that in your numerator too, though, otherwise you could count some hands where you faced an all-in and pushed yourself in the numerator but not the denominator.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Pushing post with nothing

Postby preparac » Sun Jan 23, 2011 10:38 am

WhiteRider wrote:I see what you mean, and your method for excluding all-ins looks OK. You might want to include that in your numerator too, though, otherwise you could count some hands where you faced an all-in and pushed yourself in the numerator but not the denominator.


You are right there of course and indeed without inculding it I have a few 200% results or so in my DB ...
thanx again
preparac
 
Posts: 323
Joined: Thu May 15, 2008 6:23 am

Re: Pushing post with nothing

Postby sethseth » Sat Feb 12, 2011 5:02 am

could draws be added to this?
sethseth
 
Posts: 16
Joined: Mon Apr 21, 2008 5:31 am

Re: Pushing post with nothing

Postby kraada » Sat Feb 12, 2011 9:57 am

Yes, there are various draws in the player_combinations table - for the details on those draws, see the Database Schema, which is on our documentation page.
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