Help for a new Hand Stat

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

Help for a new Hand Stat

Postby jackh69 » Sun Oct 25, 2009 9:57 am

I try to built a new Hand Stat and for that I need this stat :

1.

For each Starting Hand (but not pocket pair) I want to know % of Pair I get on the Flop (without board pair).
> (I don't know how to exclude board pair)

2.

It's possible to have the report for the 50 last AQ, 50 last AK etc... ?

Thanks :ugeek:
jackh69
 
Posts: 14
Joined: Tue Sep 29, 2009 8:21 pm

Re: Help for a new Hand Stat

Postby WhiteRider » Sun Oct 25, 2009 11:03 am

The easiest way to check to see if you use exactly one of your hole cards would be use the database field "holdem_hand_player_combinations.val_f_hole_cards_used", but that field isn't populated correctly in all cases.

An expression which does seem to work to count one pair hands, using exactly one of your holecards is:

    sum( if[ holdem_hand_player_combinations.flg_f_1pair AND (holdem_hand_player_combinations.id_f_hand_strength=2 OR holdem_hand_player_combinations.id_f_hand_strength=3) AND holdem_hand_player_statistics.flg_f_saw, 1, 0 ] )
This counts only times you actually saw the flop, so to create the stat you'll need to divide by cnt_f_saw.
If you want to see how often you would have flopped a pair regardless of whether you folded preflop then you can remove the check for seeing the flop and divide by cnt_hands instead.

Another alternative would be to check:
(holdem_hand_player_detail.holecard_1 % 13 <> holdem_hand_player_detail.holecard_2 % 13) AND (holdem_hand_summary.card_1 % 13 <> holdem_hand_summary.card_2 % 13) AND (holdem_hand_summary.card_1 % 13 <> holdem_hand_summary.card_3 % 13) AND (holdem_hand_summary.card_2 % 13 <> holdem_hand_summary.card_3 % 13)
..which checks that the hole cards aren't the same rank, and that none of the flop cards are the same rank.
% means modulo (remainder).
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Help for a new Hand Stat

Postby jackh69 » Sun Oct 25, 2009 11:19 am

Thank you, I'll work on it. :ugeek:
jackh69
 
Posts: 14
Joined: Tue Sep 29, 2009 8:21 pm

Re: Help for a new Hand Stat

Postby WhiteRider » Sun Oct 25, 2009 11:42 am

No problem - let us know if you need any further help.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Help for a new Hand Stat

Postby kraada » Wed Oct 28, 2009 10:31 am

Just to add: Don't use this stat in the HUD; it will work, but it will cause significant lag. (It's a known issue with stats using the holdem_hand_player_combinations table.)
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