Page 1 of 1

FPP - Fold Preflop SQL

PostPosted: Fri Feb 25, 2011 7:00 am
by warrior04
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 = '*****'

Re: FPP - Fold Preflop SQL

PostPosted: Fri Feb 25, 2011 9:58 am
by kraada
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).

Re: FPP - Fold Preflop SQL

PostPosted: Fri Feb 25, 2011 2:36 pm
by warrior04
thanks a lot for the clarification...

will need to deiced which one to prefer... but this is a good problem :)