Filter hands based on number of fish

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Filter hands based on number of fish

Postby bel42 » Thu Jul 28, 2022 10:23 pm

Let's say I have a definition of fish, say VPIP > 40.

I want to filter those hands which contain exactly 1 fish (or 2 fish, or 3 fish etc.).

Can I do this?
bel42
 
Posts: 6
Joined: Tue Oct 01, 2019 10:09 am

Re: Filter hands based on number of fish

Postby Flag_Hippo » Fri Jul 29, 2022 5:36 am

To view hands where at least one player at the table had a VPIP greater than 40 go to 'My Reports', create a 'Hand Report' and use this expression filter:

Code: Select all
cash_hand_player_statistics.id_hand in (select chps.id_hand from cash_hand_player_statistics chps where chps.id_player in (select cc.id_player from cash_cache cc where true group by cc.id_player having ((sum(cc.cnt_vpip) * 1.0) / (sum(cc.cnt_hands) * 1.0) - sum(cc.cnt_walks) * 1.0) > .5))

You can use this expression filter by clicking on the 'Filters' link and selecting 'Add New Expression Filters'. If this filter generates an error then you will need to change the number of hands in the report to 'Max Hands' via the dropdown in the top right. Filters like this can generate a lot of PostgreSQL processing so can take a while to complete if you have a large database but you can experiment with the filter in a smaller database to make sure it works as you expect. If you want to filter for a specific number of players with a VPIP greater than 40 then you would need to build a filter that tests the VPIP of each player at the table and compares them to each other which adds significant complexity.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: Filter hands based on number of fish

Postby bel42 » Fri Jul 29, 2022 8:43 am

That filter is not very helpful for me, because I rarely play on tables without at least one "fish".

Here's another approach. Maybe it's easier if I use a different definition of "fish", based on color tags?

Suppose I've tagged all "fish" with the color bright green. Can I now filter hands based on number of fishes in the hand (exactly 1 fish, 2 fish etc.)?

I looked at this thread, but I couldn't figure out how to change the expression for my purposes.
bel42
 
Posts: 6
Joined: Tue Oct 01, 2019 10:09 am

Re: Filter hands based on number of fish

Postby Flag_Hippo » Fri Jul 29, 2022 12:58 pm

Unfortunately that doesn't make things any easier as the expression filter basically works in the same way. Using this expression:

Code: Select all
cash_hand_player_statistics.id_hand in (SELECT chps.id_hand from cash_hand_player_statistics chps, player p, notes n where p.id_player = chps.id_player  and n.id_x = p.id_player and n.enum_type = 'P' and n.id_color = 2)

will return hands where at least one player has a green label so it's not still not going to be suitable if you only want hands with a specific number of green labelled players and again building a filter for that adds significant complexity.
Flag_Hippo
Moderator
 
Posts: 14441
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 26 guests

cron
highfalutin