PDA

View Full Version : won three bet overall sql



holymanager
08-08-2009, 02:07 AM
Hi

I am looking for an sql which is giving me the three bet won value of a player.

For my own player it is like this
select
,sum(case when ph.preflopaction_id in (3,4) and ph.firstpreflopactiontype_id = 3 then 1 else 0 end) as didthreebetfromoverall
,sum(case when ph.preflopaction_id in (3,4) and ph.firstpreflopactiontype_id = 3 and ph.preflopplayeractiontype_id = 88 and ph.maxstreetseen = 0 then 1 else 0 end) as wonthreebetfromoverall
from playerhandscashkeycolumns_hero ph
(some where clause...)


for other players I started with:
select
, sum(CPR.DidThreeBet) as DidThreeBet
, 0 as wonthreebetfromoverall --wonthreebet missing
from
CompiledResults_month CR
join CompiledPlayerResults_month CPR on CR.CompiledPlayerResults_ID = CPR.CompiledPlayerResults_ID
where clause to add

but still cannot find the wonthreebet

Thanks for reading and help in advance
hm