Page 1 of 1

Expression filters

PostPosted: Wed Jul 31, 2024 9:22 am
by z1nodiess
Which expression filter should i use to filter hands only against recreational players? I guess it must be something like <= 50 hands

Re: Expression filters

PostPosted: Wed Jul 31, 2024 12:38 pm
by Flag_Hippo
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.

highfalutin