Error with my stat - W$WRT

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

Error with my stat - W$WRT

Postby Ricks » Tue Jul 14, 2009 12:46 pm

I made a stat to see how often a player wins the hand after raising the turn, regardless of the hand being shown down. I have found an error in the results but do not now how to fix it. The error apparently results from a raise and a 4-bet on the turn by the same player each being counted. For instance, if the player had only one instance of ever raising the turn, he won but raised and re-raised, the stat would read that he W$WRT 50% of the time. He raised twice but won once.

Value Expression:
(cnt_t_raise_won_hand / cnt_t_raise)*100

Expression for Column
sum(if[holdem_hand_player_statistics.cnt_t_raise > 0 AND holdem_hand_player_statistics.flg_won_hand, 1, 0])

Thanks for any help.
Ricks
 
Posts: 8
Joined: Thu Jan 24, 2008 8:53 pm

Re: Error with my stat - W$WRT

Postby WhiteRider » Tue Jul 14, 2009 4:14 pm

The column cnt_t_raise counts all turn raises, not the number of hands where the player raised the turn (so if you raise and 4-bet it will count two raises).
You'll need to build another column using the "holdem_hand_player_statistics.cnt_t_raise > 0" expression you have in your new column.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Error with my stat - W$WRT

Postby Ricks » Tue Jul 14, 2009 6:31 pm

Thank you. I'll work on it.
Ricks
 
Posts: 8
Joined: Thu Jan 24, 2008 8:53 pm


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

Who is online

Users browsing this forum: No registered users and 0 guests