report for a specific winning hand (of villain's) I lost to

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

report for a specific winning hand (of villain's) I lost to

Postby rowhousepd » Sun Mar 21, 2010 10:57 pm

I'm trying to create a report that would show hands in which I wind up losing to a straight that the villain showed down. I can set up a simple filter to designate all the hands that I lost, but I can't figure out howto narrow it down to situations where I lose to a specific hand.

I believe I'd want to add a filter expression in the Edit Report Filter window. What could I write there that would do this? I tried "id_win_hand = straight" but that wasn't a valid expression. Maybe I'm not sure how the syntax works. Thanks.
rowhousepd
 
Posts: 329
Joined: Sun Mar 22, 2009 4:00 am
Location: Philadelphia, PA

Re: report for a specific winning hand (of villain's) I lost to

Postby kraada » Mon Mar 22, 2010 10:25 am

You'd need a slightly more complex filter for this sort of setup - are you going to be choosing villain's hand by strength (straight, flush) or specific hole cards (AA, AKs)?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: report for a specific winning hand (of villain's) I lost to

Postby rowhousepd » Mon Mar 22, 2010 4:50 pm

Just by strength -- specifically I want to see hands when I lose to a villain's straight. I think a leak of mine is not seeing (and when I lose to) possible straights on the board enough when I'm not drawing for one. So I'd like to set it up so that I'm filtering for hands that: I lost, when I'm not drawing, and when the villain shows down his straight. I don't care about his hole cards.
rowhousepd
 
Posts: 329
Joined: Sun Mar 22, 2009 4:00 am
Location: Philadelphia, PA

Re: report for a specific winning hand (of villain's) I lost to

Postby kraada » Mon Mar 22, 2010 6:12 pm

You'll want to be using the holdem_hand_player_combinations flags then.

If you want to search all hands where someone had a straight on the river, for example, you'd want this filter:

holdem_hand_player_statistics.id_hand in (SELECT holdem_hand_player_statistics.id_hand from holdem_hand_player_statistics, holdem_hand_player_combinations where holdem_hand_player_statistics.id_hand = holdem_hand_player_combinations.id_hand and holdem_hand_player_combinations.flg_r_straight)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: report for a specific winning hand (of villain's) I lost to

Postby rowhousepd » Tue Mar 23, 2010 8:07 pm

Works perfectly. Brilliant. Cant say I understand why/how it works, but no matter. :) Thanks!
rowhousepd
 
Posts: 329
Joined: Sun Mar 22, 2009 4:00 am
Location: Philadelphia, PA

Re: report for a specific winning hand (of villain's) I lost to

Postby kraada » Thu Mar 25, 2010 9:43 am

It's because of how the filter works in the actual query generated by PT3. Using VALUE in (QUERY) will limit to only cases where the value is one of the possible results returned by the query.
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 0 guests