SB limp/raise

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

SB limp/raise

Postby swisspoker » Tue Feb 08, 2022 7:51 am

Hey guys

Also tried to create a stat for the number of times SB limp/raises

Column: sum(if[tourney_hand_player_statistics.flg_p_open_opp AND tourney_hand_player_statistics.flg_p_limp AND tourney_hand_player_statistics.position = 9 AND lookup_actions_p.action = 'CR%', 1, 0]) // Name: cnt_p_open_limp_raise_SB

Stat: (cnt_p_open_limp_raise_SB / cnt_p_open_limp_faceraise_SB) * 100

It shows the number 0 for some reason.

Would appreciate if you could help!

Marco
swisspoker
 
Posts: 60
Joined: Mon Jun 27, 2016 1:19 pm

Re: SB limp/raise

Postby swisspoker » Tue Feb 08, 2022 7:53 am

Already found a solution!

sum(if[tourney_hand_player_statistics.flg_p_limp AND tourney_hand_player_statistics.position = 9 AND lookup_actions_p.action LIKE 'CR%', 1, 0])

Seems to work like this.
swisspoker
 
Posts: 60
Joined: Mon Jun 27, 2016 1:19 pm

Re: SB limp/raise

Postby Flag_Hippo » Tue Feb 08, 2022 12:31 pm

swisspoker wrote:It shows the number 0 for some reason.

Rebuild your custom database cache via 'Database -> Database Management -> Rebuild Cache -> Custom Cache Rebuild'. You should always do this after creating new custom statistics. If the issue persists then post your column expression for cnt_p_open_limp_faceraise_SB as you haven't included it in your post.
swisspoker wrote:Already found a solution!

sum(if[tourney_hand_player_statistics.flg_p_limp AND tourney_hand_player_statistics.position = 9 AND lookup_actions_p.action LIKE 'CR%', 1, 0])

Seems to work like this.

That's not a solution. All you've done is remove tourney_hand_player_statistics.flg_p_open_opp and based on your column names which say open_limp you only wanted to count open limps but now your column is counting all limps.
Flag_Hippo
Moderator
 
Posts: 17088
Joined: Tue Jan 31, 2012 7:50 am

Re: SB limp/raise

Postby swisspoker » Tue Feb 08, 2022 1:01 pm

Thanks for the answer!

Have done the cache rebuild and it still shows 0.

cnt_p_open_limp_faceraise_SB: sum(if[tourney_hand_player_statistics.flg_p_open_opp AND tourney_hand_player_statistics.flg_p_limp AND tourney_hand_player_statistics.position = 9 AND tourney_hand_player_statistics.flg_p_face_raise, 1, 0])

cnt_p_open_limp_raise_SB: sum(if[tourney_hand_player_statistics.flg_p_open_opp AND tourney_hand_player_statistics.flg_p_limp AND tourney_hand_player_statistics.position = 9 AND lookup_actions_p.action = 'CR%', 1, 0])

(cnt_p_open_limp_raise_SB / cnt_p_open_limp_faceraise_SB) * 100
swisspoker
 
Posts: 60
Joined: Mon Jun 27, 2016 1:19 pm

Re: SB limp/raise

Postby Flag_Hippo » Tue Feb 08, 2022 1:54 pm

I've just noticed an issue with the first column you posted:

Code: Select all
lookup_actions_p.action = 'CR%'

When using = the % is not a valid action for the player. The use of = means the actions must match exactly and the players action sequence can only contain a B, C, F, R and/or X. If you want to use % to test for any subsequent actions then you need to use LIKE instead of =:

Code: Select all
lookup_actions_p.action LIKE 'CR%'

For more information on pattern matching in PostgreSQL see this guide.
Flag_Hippo
Moderator
 
Posts: 17088
Joined: Tue Jan 31, 2012 7:50 am

Re: SB limp/raise

Postby swisspoker » Tue Feb 08, 2022 2:32 pm

Thanks man!
swisspoker
 
Posts: 60
Joined: Mon Jun 27, 2016 1:19 pm


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 9 guests