FPP - Fold Preflop SQL

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

FPP - Fold Preflop SQL

Postby warrior04 » Fri Feb 25, 2011 7:00 am

I have a little problem with FPP as it shows in PT.
I'm building some simple Query in SQL....

i wanna see the the fold in preflop % (in this example also checking a player in button position)
result2 => total number of hands
result*100 => should give FPP%

i'm comparing my results with PT...
result2 is fine..
result*100 give a different number in PT (although close... depend on "WHERE" scenario)

probably missing something small... :roll:

Code: Select all
SELECT (case when (count(PS.id_hand) != 0)
         then (cast(sum(case when flg_p_fold then 1 else 0 end) as real)
          / count(PS.id_hand))
         else (-1)
         end) as result,
         count(PS.id_hand) as result2
FROM holdem_hand_player_statistics as PS  , player as P  , holdem_limit L
WHERE PS.id_player = P.id_player  AND PS.id_limit = L.id_limit
 AND PS.position = 0
 AND P.player_name = '*****'
warrior04
 
Posts: 39
Joined: Wed Jul 21, 2010 11:44 am

Re: FPP - Fold Preflop SQL

Postby kraada » Fri Feb 25, 2011 9:58 am

The Fold Preflop stat divides the number of total folds made (which you selected fine) by the number of total preflop actions a player has had - you are dividing by the number of hands they've played. Obviously these two numbers will not be the same (sometimes you get a walk and no actions, sometimes you get raised and get two actions etc).
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: FPP - Fold Preflop SQL

Postby warrior04 » Fri Feb 25, 2011 2:36 pm

thanks a lot for the clarification...

will need to deiced which one to prefer... but this is a good problem :)
warrior04
 
Posts: 39
Joined: Wed Jul 21, 2010 11:44 am


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

Who is online

Users browsing this forum: No registered users and 0 guests