Few questions about making custom stats

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

Few questions about making custom stats

Postby Bimbyris » Sun Jan 11, 2009 6:38 am

1. I'm trying to make a stat showing how often a player makes the first raise when he has an opportunity.

Value Expression would be (cnt_p_first_raise / cnt_p_first_raise_oop)*100 .

cnt_p_first_raise : SUM(if[holdem_hand_player_statistics.flg_p_first_raise,1,0])
This one should be fine i think.

However i'm struggling to make the opportunity column. At first i thought this expression will work :

SUM(if[holdem_hand_player_statistics.flg_p_face_raise = false AND holdem_hand_player_statistics.flg_blind_b = false ,1,0])

But when i realised that it will exclude all hands there i got re-raised. Soon after i figured out that i can use cnt_limp_opp from the repository limp stats, because it's the same thing to have oop to limp or to raise first :

sum( if[ (NOT(holdem_hand_player_statistics.flg_p_face_raise) OR (holdem_hand_player_statistics.flg_p_limp) OR (holdem_hand_player_statistics.flg_p_first_raise)) AND NOT(holdem_hand_player_statistics.flg_blind_b), 1 , 0 ] )

I just wanna ask if the first condition 'do not face a raise' will ignore those hands where it's true but already counted in other 2 conditions 'limp' and 'first raise' ? Because otherwise it would count some hands twice, making too much opportunities.

2. Another stat is the original Call PFR which i want to ask about.

It looks like this (cnt_p_pfr_call / cnt_p_pfr_call_opp) * 100

There is nothing to be said about he opp column, just about cnt_p_pfr_call which is :

sum(if[holdem_hand_player_statistics.flg_p_face_raise AND holdem_hand_player_statistics.flg_p_fold = false AND holdem_hand_player_statistics.cnt_p_raise=0, 1, 0])

So, wouldn't it exclude those hands there a player called PFR, but when folded to a squeeze ? (because of flg_p_fold = false)

And maybe cnt_p_call>0 would work instead of flg_p_fold = false ?
Bimbyris
 
Posts: 19
Joined: Thu Jan 31, 2008 2:36 pm

Re: Few questions about making custom stats

Postby WhiteRider » Sun Jan 11, 2009 6:46 am

1. I built that 'cnt_limp_opp' column, and I'm pretty well 100% sure it's right because I spent plenty of time on it and tested it thoroughly. The way the NOTs, ANDs and ORs are used within the brackets mean the cases are combined correctly.

However, you're making it more complicated than it needs to be.
There is already a 'Raise First In' stat (called "RFI"), but for your information, there is also a database field:
holdem_hand_player_statistics.flg_p_open_opp


2. Hmm - you're right about that one..
I'll have to check, but I think the intention is that it counts the number of hands where you called any preflop raise.
The column you mention isn't doing that, currently, it is only counting hands where you ONLY call raises preflop.
I will point this out to the development team and get it clarified.
Thanks for pointing this out.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 6 guests