Hand report against fishes

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Hand report against fishes

Postby Aerith » Sun Apr 16, 2023 11:58 am

How can I create a hand report showing the hands I've played against fishes with a VPIP greater than 40? Thank you
Aerith
 
Posts: 1
Joined: Sun Jan 29, 2023 12:11 pm

Re: Hand report against fishes

Postby Flag_Hippo » Mon Apr 17, 2023 11:02 am

That would require a custom expression filter using a subquery like this:

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_vpip) * 1.0) / (sum(cc.cnt_hands) * 1.0) - sum(cc.cnt_walks) * 1.0) > .40)

You can use this expression filter by clicking on the 'Filters' link in a custom report and selecting 'Add New Expression Filters' and you will need to replace all instances of 'cash' with 'tourney' if you are in a tournament report. If 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. Should you want to be more specific with the query such as specifying a sample size or specific actions for the player you can add to the expression. If you need it see this guide for the basics on custom filter/statistics creation, this guide for a deeper walkthrough and for more on how SELECT works see here.
Flag_Hippo
Moderator
 
Posts: 17126
Joined: Tue Jan 31, 2012 7:50 am

Re: Hand report against fishes

Postby Muikkuz » Mon Oct 26, 2026 5:55 pm

Hello!

What does mean "can take a while to complete"?
I tried the code with changing the end of it to < 0.40) to find out how am I doing with regular players when there are no loose fish on table. It has shown "Loading..." over six hours now.
In Task Manager I can see PostreSQL Server uses one third of my CPU and very little Memory, around 9,5MB. I dont know what those numbers mean. To me it feels like Poker Tracker is trying to divide something by zero.
I have this year poker hand history. Probably less than 100 000 hands. Windows 11 and couple of years old laptop.
Muikkuz
 
Posts: 7
Joined: Sat Mar 02, 2013 5:57 pm

Re: Hand report against fishes

Postby Flag_Hippo » Tue Oct 27, 2026 1:12 pm

The filter has to look at every player in every hand in your database, and it does this again for every hand that player was in, so the amount of work grows quickly with the number of hands. As a comparison, on a test database the filter took a few minutes to display the results, on a database with more than 100,000 hands.

If you are using a date filter in the report (for example 'This Year') or any other built-in filter, please remove it. If you only want hands from this year, add the date to the start of the expression instead.

Also, changing the end to < 0.40 doesn't find hands without loose players. It finds hands where at least one player has a VPIP under 40%, and that probably includes you, so if your own VPIP is under 40% it will return every hand you have played. To find hands where none of the players at the table have a VPIP over 40%, keep the > .40 and change 'in' to 'not in':

Code: Select all
cash_hand_player_statistics.date_played >= '2026/01/01 00:00:00' and cash_hand_player_statistics.id_hand not 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_vpip) * 1.0) / (sum(cc.cnt_hands) * 1.0) - sum(cc.cnt_walks) * 1.0) > .40)
Flag_Hippo
Moderator
 
Posts: 17126
Joined: Tue Jan 31, 2012 7:50 am

Re: Hand report against fishes

Postby Muikkuz » Wed Oct 28, 2026 10:06 pm

Hi! Thanks for answering. Unfortunately it doesnt work.
Here is what I clicked:
My Reports
New Report
Player Report
-Add Commont Stats to Report is marked
Finish

It shows Player name, My currency Won and 87134 hands. Looks nice.
I continue clicking:
Filters
Add New Expression Filters
I copied the code and clicked Validate. "Expression is valid!"
-Filter on Active Player is marked.
Save
"Would you like to save the changes to the current filter?"
Yes
OK
Loading...

After one hour nothing had happened. There are no other filters on.

I am interested to see the hands where there are no VPIP over 50 fishes seating in the table. Is that sort of filter even possible to make?
Muikkuz
 
Posts: 7
Joined: Sat Mar 02, 2013 5:57 pm

Re: Hand report against fishes

Postby Flag_Hippo » Mon Nov 02, 2026 1:02 pm

I was testing a hand report as per the original post but on a 'Player' report with the same filters it just takes a few seconds for the report to load on an 85k hand database. If you want to follow up on this turn on 'Enable Logging' in PokerTracker 4 via 'Configure -> Options' and then restart PokerTracker 4. Next reproduce this problem and then create a support bundle via the 'File -> Create Support Bundle' menu option in PokerTracker 4. When that file has been saved attach your support bundle to a Support Ticket where a technician can review your logs.
Flag_Hippo
Moderator
 
Posts: 17126
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 0 guests