Custom column - not valid SQL. Help!

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Custom column - not valid SQL. Help!

Postby benharvey » Fri Jun 22, 2012 10:21 pm

Hey guys I am trying to create a custom column for a stat that varies by preflop effective stack size. This is my column for cnt_f_raise_0_to_8bb (based on cnt_f_raise). I can't save it as PT4 says that it isn't valid SQL. What am I missing???

I have other stats that have similar queries in them for effective stack size and they work fine.

sum(if[tourney_hand_player_statistics.cnt_f_raise AND (tourney_hand_summary.amt_p_effective_stack / tourney_blinds.amt_bb) < 8, 1, 0])

Thanks
benharvey
 
Posts: 35
Joined: Sun Apr 29, 2012 2:08 am

Re: Custom column - not valid SQL. Help!

Postby benharvey » Fri Jun 22, 2012 11:27 pm

ok so this works but I'm not sure why as I'm new to this stuff, I though the first if statement would need the ", 1, 0"

sum(if[if[tourney_hand_player_statistics.cnt_f_raise > 0] AND (tourney_hand_summary.amt_p_effective_stack / tourney_blinds.amt_bb) < 8, 1, 0])

This is for a flop raise when effective stacks are <8bb (I know this won't happen often in reality but it's the stat I'm more interested in)
benharvey
 
Posts: 35
Joined: Sun Apr 29, 2012 2:08 am

Re: Custom column - not valid SQL. Help!

Postby WhiteRider » Sat Jun 23, 2012 4:55 am

You're nearly there, but you don't need to nest IF statements in this case, you can just use:

sum(if[tourney_hand_player_statistics.cnt_f_raise > 0 AND (tourney_hand_summary.amt_p_effective_stack / tourney_blinds.amt_bb) < 8, 1, 0])

(You do mean effective stacks preflop, don't you, since you're using "amt_p_effective_stack"?)
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Custom column - not valid SQL. Help!

Postby benharvey » Sat Jun 23, 2012 6:03 am

ah ok thanks.

Yes I do mean preflop :)
benharvey
 
Posts: 35
Joined: Sun Apr 29, 2012 2:08 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 38 guests

cron
highfalutin