Expression filters

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Expression filters

Postby z1nodiess » Wed Jul 31, 2024 9:22 am

Which expression filter should i use to filter hands only against recreational players? I guess it must be something like <= 50 hands
z1nodiess
 
Posts: 1
Joined: Tue Sep 23, 2014 12:47 pm

Re: Expression filters

Postby Flag_Hippo » Wed Jul 31, 2024 12:38 pm

If you want to filter for hands played with players who have less than 50 hands in your database then you can use this expression filter (assuming cash games):

Code: Select all
cash_hand_player_statistics.id_hand in (select chps.id_hand from cash_hand_player_statistics chps, cash_cache cc where chps.id_player = cc.id_player group by chps.id_hand, chps.id_player having (sum(cc.cnt_hands) > 50 and not chps.flg_hero))

Note that this will only be filtering to hands where players like this were dealt in at the table - not that they played in a pot against you but you can edit this code to be more specific with regards to the actions they take by adding other queries. Also if you use a custom hand report and the filter returns an error then change the hands dropdown to 'Max Hands' but bear in mind that filters like this can generate a lot of PostgreSQL processing so can take a while to complete if you have a large database. If you need it see this guide for the basics on custom statistics creation, this guide for a deeper walkthrough and for more on how SELECT works see here.
Flag_Hippo
Moderator
 
Posts: 15189
Joined: Tue Jan 31, 2012 7:50 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 27 guests

cron
highfalutin