Question about custom 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

Question about custom stat

Postby jaxx » Sat Dec 26, 2009 12:50 pm

Hello,

Is it possible to make a tourney stat 'Average Open raise size (in bb) for the last N blind levels'?

Thanks
jaxx
 
Posts: 87
Joined: Thu Oct 09, 2008 3:37 pm

Re: Question about custom stat

Postby kraada » Sat Dec 26, 2009 1:49 pm

The "last N blind levels" part is the difficult part. If you play all SnGs with a standard structure it's vaguely possible that it'd be doable, but we'd need the complete blind structure for the event and it would still be quite complicated.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Question about custom stat

Postby jaxx » Sun Jan 10, 2010 7:36 am

Ok. What about stat - 'average open raise size in BB' ? (without - last n hands)
jaxx
 
Posts: 87
Joined: Thu Oct 09, 2008 3:37 pm

Re: Question about custom stat

Postby WhiteRider » Sun Jan 10, 2010 10:15 am

Yes, that's pretty easy.
You'll need a new column to add up the total amount bet as open-raises:

amt_p_open_raise_ttl_bb =
sum( if[holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.flg_p_open, (holdem_hand_player_detail.amt_p_raise_made / holdem_limit.amt_bb), 0])

..then we can create a new stat to divide that column by the number of open raises, which is the built-in column cnt_p_raise_first_in, so the stat expression would be:

amt_p_open_raise_ttl_bb / cnt_p_raise_first_in

Tutorial - Custom Reports and Statistics
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Question about custom stat

Postby jaxx » Sun Jan 17, 2010 11:21 am

I need the statistic for tournaments

is this ok:

sum( if[tourney_holdem_hand_player_statistics.flg_p_first_raise AND tourney_holdem_hand_player_statistics.flg_p_open, (tourney_holdem_hand_player_detail.amt_p_raise_made / tourney_holdem_blinds.amt_bb), 0])

is tourney_holdem_blinds what I need instead of holdem_limit?
jaxx
 
Posts: 87
Joined: Thu Oct 09, 2008 3:37 pm

Re: Question about custom stat

Postby kraada » Sun Jan 17, 2010 6:33 pm

Yes, that should work.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Question about custom stat

Postby jaxx » Sat Jan 23, 2010 12:20 pm

Thanks. Another question: Is there a way a given statistic (or all statistics) to use data only from the last X thousand hands for the given player? or only from the last 3 months? or something like this
jaxx
 
Posts: 87
Joined: Thu Oct 09, 2008 3:37 pm

Re: Question about custom stat

Postby kraada » Sat Jan 23, 2010 12:53 pm

Yes. Click Configure --> Configure HUD, go to the Hud Options tab and use the Last X hands option there. Note though that this will slow things down so if you have a large database you may experience nontrivial amounts of lag (queries done in this way take a lot longer to complete).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Question about custom stat

Postby jaxx » Sun Jan 24, 2010 1:34 pm

Thanks
another question:
how can we exclude the all-in bets from the stat above?
jaxx
 
Posts: 87
Joined: Thu Oct 09, 2008 3:37 pm

Re: Question about custom stat

Postby WhiteRider » Sun Jan 24, 2010 2:15 pm

One way to do it would be to check for:
holdem_hand_player_statistics.enum_allin != 'P'
..which says the player didn't go all-in preflop.

However, that would also rule out hands where the player open-raised but not all-in, then re-raised all-in.
To just avoid all-in first raises you could check for:
tourney_holdem_hand_player_detail.amt_before != tourney_holdem_hand_player_detail.amt_p_raise_made
..which says that the amount of chips the player had before the hand does not match the size of their first raise.
WhiteRider
Moderator
 
Posts: 54018
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 5 guests

cron