Filtering hands based on stack size

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Filtering hands based on stack size

Postby Pete » Fri Jan 02, 2009 2:28 am

I saw that there was Report in Repository which groups stats based on stack size.. It was interesting, but now I would like to filter all hands from DB which was played with stack size 50-100BB for example.. Is that possible?? I tried to find a way but didn't succeed :(

Thanks
-Pete
Pete
 
Posts: 17
Joined: Sun Feb 03, 2008 4:35 am

Re: Filtering hands based on stack size

Postby kraada » Fri Jan 02, 2009 12:26 pm

You can do it for Hero's stack size, though you'll need to create a custom stat to do it (holdem_hand_player_detail.amt_before is your starting stack for the hand). For effective stack there are database fields (holdem_hand_summary.amt_x_effective_stack where x is either p for preflop, f for flop, t for turn or r for river) but if you are multi-way they won't work quite right (they'll report the smallest possible effective stack size, which may or may not be what you want).

If you're just looking for big pots though and you're using the most recent beta if you go to the Filters and click on the Misc tab, there's a Pot Size tab there you can use to filter things, or a Won/Loss amount you can filter by on the Results tab.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filtering hands based on stack size

Postby Pete » Sat Jan 03, 2009 8:36 am

Thanks for the replay.. I was able to create the stats what I need but I'm little bit lost here now... How can I use my new stat as a filter?? I have created a following stat: (holdem_hand_player_detail.amt_before/holdem_limit.amt_bb)>50 AND (holdem_hand_player_detail.amt_before/holdem_limit.amt_bb)<=100

And I would like to show only those hands which match this criteria, but I can't find a way to add it as a filter??

-Pete
Pete
 
Posts: 17
Joined: Sun Feb 03, 2008 4:35 am

Re: Filtering hands based on stack size

Postby kraada » Sat Jan 03, 2009 10:49 am

You'd need to display that stat to have a certain value in that spot.

You'd want to put the stat in the Holdem Cash Hand section, change it to something like:
if[(holdem_hand_player_detail.amt_before/holdem_limit.amt_bb)>50 AND (holdem_hand_player_detail.amt_before/holdem_limit.amt_bb)<=100, 1, 0] then the stat will have a value of 1 if the hand in question has the person in question with a 50 - 100 BB stack.

Then create a custom report via the reports tab, and use the Filters button on the left to filter for only times when your stat is equal to 1. Uncheck Filter on Active Player if you want to see hands from all players, and add the Hand No stat if you want to be able to replay the hands.

Then just add anything else you want to see about each hand and run the report.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filtering hands based on stack size

Postby WhiteRider » Sun Jan 04, 2009 3:20 pm

Actually, I think that having the stat defined as you already have it will work for filtering because it will be either true or false so you can just filter for the stat name with no 'equals'.
Alternatively, create a stat which shows the stack size and then filter for #Stack# > 50 AND #Stack# <=100
This allows for flexibility for filtering on different ranges.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 1 guest