Check-call ratio

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

Check-call ratio

Postby BoFo » Tue Oct 07, 2008 7:30 am

Hi!

I try and I try...Programming does not come easy to me.

My last try was to build a stat to show me their check-call ratio.

I thought I’d need a column to show the numbers for having checked and called, multiply by 100 and divide by the number for having checked (cnt_f_check).

To keep it simple I looked into the existing columns and found:
Cnt_f_check_raise_opp:
sum(if[holdem_hand_player_statistics.flg_f_check AND (holdem_hand_player_statistics.cnt_f_raise > 0 OR holdem_hand_player_statistics.cnt_f_ call > 0 OR holdem_hand_player_statistics.cnt_f_ fold), 1, 0])

I thought: If this works, it must be possible to reduce it to something that also works. So I cut out: (the OR raise, the OR fold) - parts:

sum(if[holdem_hand_player_statistics.flg_f_check AND holdem_hand_player_statistics.cnt_f_call > 0, 1, 0])
Tried validate, OK. Grouped by: sum, named it: cnt_f_check_call


Made a stat:
(cnt_f_check_call / cnt_f_check) * 100, Format: /%.2f. Validation OK.

Applied it to the “Player stats” – HUD.

Opened a game, but now the HUD wont show. Even though the “Table” – HUD works.

??? – Bo.
BoFo
 
Posts: 31
Joined: Thu Aug 14, 2008 10:46 am

Re: Check-call ratio

Postby WhiteRider » Tue Oct 07, 2008 9:11 am

OK, well that stat looks reasonable.
If you remove it from the HUD again, does the HUD work again?
Try adding your stat to a report, like the Known Hands report; see if that works.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Check-call ratio

Postby BoFo » Tue Oct 07, 2008 10:16 am

Yes, if I remove it, the HUD's OK. I'll try to make a report, never done that before. - Bo
BoFo
 
Posts: 31
Joined: Thu Aug 14, 2008 10:46 am

Re: Check-call ratio

Postby WhiteRider » Tue Oct 07, 2008 11:41 am

You don't need to make a new Report, just click the little spanner/wrench icon to the right of the known starting hands report.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Check-call ratio

Postby BoFo » Tue Oct 07, 2008 12:50 pm

It says:

ERROR: aggregates not allowed in GROUP BY clause.

I checked the group by sum, because I had trouble last week because I didn't.
BoFo
 
Posts: 31
Joined: Thu Aug 14, 2008 10:46 am

Re: Check-call ratio

Postby BoFo » Tue Oct 07, 2008 1:12 pm

Up and running! Thanks ever so much!!
BoFo
 
Posts: 31
Joined: Thu Aug 14, 2008 10:46 am

Re: Check-call ratio

Postby WhiteRider » Tue Oct 07, 2008 5:57 pm

Great! Is it working on the HUD now too?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Check-call ratio

Postby BoFo » Tue Oct 07, 2008 7:03 pm

Yep! Unchecked the GROUP BY!
BoFo
 
Posts: 31
Joined: Thu Aug 14, 2008 10:46 am


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

Who is online

Users browsing this forum: No registered users and 2 guests