id_x_hand_strength

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

Re: id_x_hand_strength

Postby pasita » Thu May 08, 2014 4:23 pm

Document to self (and anyone interested):

cash_hand_player_statistics.holecard_1%13=LEAST(cash_hand_summary.card_1%13,cash_hand_summary.card_2%13,cash_hand_summary.card_3%13,cash_hand_summary.card_4%13,cash_hand_summary.card_5%13)
OR
cash_hand_player_statistics.holecard_2%13=LEAST(cash_hand_summary.card_1%13,cash_hand_summary.card_2%13,cash_hand_summary.card_3%13,cash_hand_summary.card_4%13,cash_hand_summary.card_5%13)

plus the quick filters for one pair.

Somehow I get an offset of a couple of hands when adding that to player report, compared to running the generated query in pgadmin, also player report gives one less hand that hand report... but close enough for cigar, I guess.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: id_x_hand_strength

Postby BillGatesIII » Thu May 08, 2014 7:59 pm

Maybe it's off because card_x % 13 = 0 = Ace.
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: id_x_hand_strength

Postby pasita » Thu May 08, 2014 8:51 pm

I was getting only bottom pairs for my tests, but I had some extra filters involved, i.e. "lower pair" on the quick filters, which removed the Aces... yeah, the code above does give paired Aces only when A is on board. Need to fix that. Still can't figure out why it gives different numbers running the report and then running the generated SQL query from the log. When I run a similar Hand report, the generated query does give the same number of hands when run on pgAdmin.

Need to sleep on this, I guess.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: id_x_hand_strength

Postby kraada » Fri May 09, 2014 7:05 am

To make aces high, use (card_x + 12) % 13.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

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

Who is online

Users browsing this forum: No registered users and 3 guests

cron