Opponent hand for Cbet

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

Opponent hand for Cbet

Postby TROM » Wed Feb 16, 2011 10:01 am

Try to create queries for detect with what hands opponent make cbet flop
But have little error and dont understand where

I have 5 queries
1)Cbet flop when opponent dont have any hand cb_f_nohand
2)Cbet flop when opponent have weak draw cb_f_weak_draw
3)Cbet flop when opponent have strong draw cb_f_strong_draw
4)Cbet flop when opponent have top pair cb_f_top_pair
5)Cbet flop when opponent have monstr cb_f_monstr

6) and have query for all opportunity when opponents made cbet and id_holecard > 0 cb_f_holecard_opp

And all time sum first 5 queries bigger then cb_f_holecard_opp
I dont understand why
Where is error ?

Code: Select all
/*cb_f_nohand*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and id_f_hand_strength=0 and flg_f_gutshot_draw = false \
and flg_f_straight_draw=false and flg_f_2gutshot_draw=false and flg_f_flush_draw=false and id_holecard > 0 \
then 1 else 0 end) as real) \
) \
else (-1) \
end) as result \

/*cb_f_weak_draw*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and flg_f_gutshot_draw and id_f_hand_strength=0 or \
flg_f_cbet and flg_f_highcard and id_f_hand_strength>0 \
then 1 else 0 end) as real) \

/* cb_f_strong_draw*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and id_f_hand_strength=0 and flg_f_flush_draw or \
flg_f_cbet and id_f_hand_strength=0 and flg_f_straight_draw or \
flg_f_cbet and id_f_hand_strength=0 and flg_f_2gutshot_draw \
then 1 else 0 end) as real) \
) \

/* cb_f_midle_pair*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when \
flg_f_cbet and flg_f_1pair and id_f_hand_strength>0 and id_f_hand_strength<3 or \
flg_f_cbet and flg_f_1pair and id_f_hand_strength>3 and id_f_hand_strength<6 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength>0 and id_f_hand_strength<3 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength>3 and id_f_hand_strength<6 \
then 1 else 0 end) as real) \

/*cb_f_top_pair*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when \
flg_f_cbet and flg_f_1pair and id_f_hand_strength=3 or \
flg_f_cbet and flg_f_1pair and id_f_hand_strength=6 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength=3 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength=6 or \
flg_f_cbet and flg_f_threeoak \
then 1 else 0 end) as real) \

/*  cb_f_monstr*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when \
flg_f_cbet and flg_f_2pair and id_f_hand_strength>6 or \
flg_f_cbet and flg_f_threeoak and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_straight and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_flush and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_fullhouse and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_fouroak and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_strflush and id_f_hand_strength>0 \
then 1 else 0 end) as real) \

/* cb_f_holecard_opp*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and id_holecard > 0 then 1 else 0 end) as real)) \
TROM
 
Posts: 57
Joined: Mon Jun 16, 2008 6:56 pm

Re: Opponent hand for Cbet

Postby kraada » Wed Feb 16, 2011 11:02 am

I think the problem is your lack of parentheses around ORed statements.

(A and B) or C != A and (B or C)

and I think some of the setups you have PostgreSQL is not interpreting the way you want them to be interpreted.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Opponent hand for Cbet

Postby TROM » Thu Feb 17, 2011 5:03 pm

I find the problem this a bag of pokertracker database

In PT3 now
When opponent on flop have Royal Flush (maybe in streatflush too and maybe this bug on turn and river too i dont test this)
flg_f_strflush=true
id_f_hand_strength=0
flg_f_straight_draw=true

but must be
flg_f_strflush=true
id_f_hand_strength=2
flg_f_straight_draw=false

i dont know exactly what doest it mean id_f_hand_strength for strflush but if it have values 0,1,2 with Royal flush on flop it must be 2
TROM
 
Posts: 57
Joined: Mon Jun 16, 2008 6:56 pm

Re: Opponent hand for Cbet

Postby kraada » Thu Feb 17, 2011 5:41 pm

Could you please attach that hand to a support ticket so that we can investigate and get this fixed?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Opponent hand for Cbet

Postby TROM » Thu Feb 17, 2011 6:49 pm

TROM
 
Posts: 57
Joined: Mon Jun 16, 2008 6:56 pm

Re: Opponent hand for Cbet

Postby TROM » Thu Feb 17, 2011 6:50 pm

but i think all hands with strflush on flop have this bug
TROM
 
Posts: 57
Joined: Mon Jun 16, 2008 6:56 pm

Re: Opponent hand for Cbet

Postby kraada » Thu Feb 17, 2011 7:24 pm

That's entirely possible - either way we will investigate now and if we release a fix for this issue you will be notified automatically via our support system.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Opponent hand for Cbet

Postby TROM » Thu Feb 17, 2011 7:34 pm

kraada
thanks I will be waiting
this is no very serious bug but maybe you find something more important
TROM
 
Posts: 57
Joined: Mon Jun 16, 2008 6:56 pm


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

Who is online

Users browsing this forum: No registered users and 0 guests