A filter to filter out high vp persons

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

A filter to filter out high vp persons

Postby Tuxadel » Fri Jun 10, 2011 6:23 pm

Im interessed in seing all the pots I have been in where it has been a raise preflop, and the person im playing against has more than 35vp. Is this possible to do? I have searched the filters, and I have also looked for a topic about it on this forum but I cant seem to find any. I also have 400k hands, so I guess there will be tons of pots, but im interessed in analyzing them :)

Thanks.
Tuxadel
 
Posts: 1
Joined: Fri Jun 10, 2011 6:14 pm

Re: A filter to filter out high vp persons

Postby kraada » Fri Jun 10, 2011 6:54 pm

If you add the following in the blue Filters link of a custom report it will filter only for hands that included someone who has a VP$IP between X and Y who put money in the pot:


player.id_player in (SELECT player.id_player from player, holdem_hand_player_statistics where player.id_player = holdem_hand_player_statistics.id_player and holdem_hand_player_statistics.flg_vpip GROUP BY player.id_player HAVING (((( (CASE WHEN ( (sum((case when(holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) <> 0 THEN (((sum((case when(holdem_hand_player_statistics.flg_vpip) then 1 else 0 end))) * 1.0 )/( (sum((case when(holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ) * 100) BETWEEN X AND Y)))

Replace X and Y with 35 and 100, then use the simple filters to filter for times you made the raise or otherwise did whatever you want to do and away you go :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: A filter to filter out high vp persons

Postby eroock » Sat Jun 11, 2011 9:24 pm

Doesn't seem to work for me. No results shown. It's Holdem Cash Hand right?
eroock
 
Posts: 147
Joined: Sun Jun 20, 2010 8:50 pm

Re: A filter to filter out high vp persons

Postby WhiteRider » Sun Jun 12, 2011 5:04 am

It's showing all hands for me. I'm not sure what's wrong with the query, though - as far as I know kraada will be on later so we'll see if he can see the problem.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: A filter to filter out high vp persons

Postby kraada » Sun Jun 12, 2011 10:14 am

I'm definitely getting results - what did you put in for X and Y and how big is your database?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: A filter to filter out high vp persons

Postby WhiteRider » Sun Jun 12, 2011 10:21 am

I get results, but the problem is I get all hands, and I tried quite restrictive values - e.g. 70 - 100.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: A filter to filter out high vp persons

Postby kraada » Sun Jun 12, 2011 10:48 am

Oh, Holdem Cash Hand - I was looking in Player Statistics.

In HCH you need to swap it around to filter on hands not players :oops:

This should do it:

holdem_hand_player_statistics.id_hand in (SELECT holdem_hand_player_statistics.id_hand from player, holdem_hand_player_statistics where player.id_player = holdem_hand_player_statistics.id_player and holdem_hand_player_statistics.flg_vpip GROUP BY holdem_hand_player_statistics.id_hand, player.id_player HAVING (((( (CASE WHEN ( (sum((case when(holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) <> 0 THEN (((sum((case when(holdem_hand_player_statistics.flg_vpip) then 1 else 0 end))) * 1.0 )/( (sum((case when(holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ) * 100) BETWEEN X AND Y)))
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 19 guests