Custom stat error - open shove button

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Custom stat error - open shove button

Postby MPGrinder » Thu Feb 07, 2013 10:58 pm

I was playing about trying to make a custom stat for tracker. I wanted to get the percent of times the player has open shoved the button pre-flop.

I have made 2 stats..

cnt_times_player_could_have_shoved_button
Code: Select all
sum( if[ tourney_hand_player_statistics.flg_p_open_opp = '1' AND position = '0', 1, 0] )


cnt_times_player_could_have_shoved_button
Code: Select all
sum( if[ amt_chips - amt_bet_p = '0' AND position = '0', 1, 0] )


Then I made the stat
Open Shoves Button
Code: Select all
(cnt_times_player_open_shove_button / cnt_times_player_could_have_shoved_button) *100


When I try to use the stat I get an error..
Code: Select all
Unable to execute query......... ERROR: coulmn 'tourney_hand_sumary.id_hand" must appear in the GROUP BY clause or be used in an aggregate function.


Anyone have any ideas why this is happening?

Cheers
MPGrinder
 
Posts: 7
Joined: Tue Feb 05, 2013 1:13 pm

Re: Custom stat error - open shove button

Postby kraada » Fri Feb 08, 2013 1:14 pm

You need to use the full table reference in order for your columns to work right, so for your first column you want:

sum( if[ tourney_hand_player_statistics.flg_p_open_opp AND tourney_hand_player_statistics.position = 0, 1, 0] )

I presume your second column was supposed to be times the player did open shove the button? This definition will work better for you:

sum(if[tourney_hand_player_statistics.flg_p_open_opp and tourney_hand_player_statistics.position = 0 and lookup_actions_p.action = 'R' and tourney_hand_player_statistics.amt_p_raise_made = tourney_hand_player_statistics.amt_p_effective_stack, 1, 0])

This says you had a chance to open on the button and you made exactly one action (raise) and the size of your raise was equal to your effective stack size (aka a shove).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Custom stat error - open shove button

Postby MPGrinder » Tue Feb 12, 2013 3:18 pm

kraada wrote:You need to use the full table reference in order for your columns to work right, so for your first column you want:

sum( if[ tourney_hand_player_statistics.flg_p_open_opp AND tourney_hand_player_statistics.position = 0, 1, 0] )

I presume your second column was supposed to be times the player did open shove the button? This definition will work better for you:

sum(if[tourney_hand_player_statistics.flg_p_open_opp and tourney_hand_player_statistics.position = 0 and lookup_actions_p.action = 'R' and tourney_hand_player_statistics.amt_p_raise_made = tourney_hand_player_statistics.amt_p_effective_stack, 1, 0])

This says you had a chance to open on the button and you made exactly one action (raise) and the size of your raise was equal to your effective stack size (aka a shove).


Thanks Kraada. That make sense. I come from c/c++ so haven't done much in SQL.

Unfortunately I'm still getting the same error. Do I have to use the column 'tourney_hand_summary.id_hand' somewhere in my stat as it says it must appear in the GROUP BY clause or an aggregate function?

I get the same error whether or not I use the stat function posted above, or just output either of the columns.

Cheers
MPGrinder
 
Posts: 7
Joined: Tue Feb 05, 2013 1:13 pm

Re: Custom stat error - open shove button

Postby kraada » Tue Feb 12, 2013 4:17 pm

What other stats do you have in this report? The above stats don't have any data from tourney_hand_summary in them . . .
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Custom stat error - open shove button

Postby MPGrinder » Tue Feb 12, 2013 11:34 pm

kraada wrote:What other stats do you have in this report? The above stats don't have any data from tourney_hand_summary in them . . .


Sorry, I had done it as a hand stat not a player stat. All works perfectly. Thanks kraada
MPGrinder
 
Posts: 7
Joined: Tue Feb 05, 2013 1:13 pm


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: wallacedavidl and 40 guests

cron
highfalutin