Hands marked for review for other opponents

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

Hands marked for review for other opponents

Postby Ruskie » Sat Sep 18, 2010 1:38 pm

Hello everybody.
I wanted to be able to filter hands displaying only those marked for review. To do this, I used the tutorial listed here viewtopic.php?f=45&t=17489#p82975 and it works... but sometimes I mark for review hands I rail so I wanted to be able to see them in my filters as well; therefore I unchecked the flag "filter on active player". The result is that when I run the report each hands gets reported several times, I think depending on how many players played the hand or something loosely related... however it makes it completely useless.
I would like to have each hand listed only once, with my Hole cards showed, and not those of others (because yes: the same hand shows different hole cards, I think it is because the hand is repeated from the "point of view" of another player)... Something similar to the DISTINCT clause in SQL... is it possible to achieve something like that?
Ruskie
 
Posts: 27
Joined: Sun Jan 04, 2009 5:16 am

Re: Hands marked for review for other opponents

Postby WhiteRider » Sat Sep 18, 2010 5:49 pm

Yes, when you untick Filter on Active Player you see every hand from every player's point of view.
I did have a report which showed each hand just once, but then you can't double click to open it. I can't lay my hands on it just now but I'll leave myself a note to try and find it in the morning.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hands marked for review for other opponents

Postby Ruskie » Sat Sep 18, 2010 6:41 pm

Okay, will wait for your report for learning purposes then. :) I would have preferred clickable hands, but perhaps to achieve something like that the reporting framework would have to be changed, right?
Ruskie
 
Posts: 27
Joined: Sun Jan 04, 2009 5:16 am

Re: Hands marked for review for other opponents

Postby WhiteRider » Sun Sep 19, 2010 10:08 am

I had a brainwave! :geek:

Since we are only interested in knowing which hands have notes, but unticking Filter on Active Player shows those hands for every player in each hand, we need a way to have the hand shown for only one player in each hand.
We don't care who that player is, so the easiest way to get just one player per hand is to add a Simple Filter for "Post Big Blind" ("Actions" tab on the Filter window).
This will show all hands with notes, but only once (from the BB's point of view). This means that you can still double-click to open the hand information.

I will add this to the tutorial. :)
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hands marked for review for other opponents

Postby Ruskie » Sun Sep 19, 2010 1:29 pm

WhiteRider wrote:I had a brainwave! :geek:

Since we are only interested in knowing which hands have notes, but unticking Filter on Active Player shows those hands for every player in each hand, we need a way to have the hand shown for only one player in each hand.
We don't care who that player is, so the easiest way to get just one player per hand is to add a Simple Filter for "Post Big Blind" ("Actions" tab on the Filter window).
This will show all hands with notes, but only once (from the BB's point of view). This means that you can still double-click to open the hand information.

I will add this to the tutorial. :)


Great, this sounds good!
Yet it is not perfect though. I will make two filters in this case, because I chose to list pocket cards in the report summary... and if I am in I would like my cards to be showed there...
Surely this is good enough, filtering for active players in one report, not filtering for active player but for post BB for others, but I wonder if there is a way to "code" a complex filter that says "If active players is in, filter for "player=hero", else filter for "post BB". Will look into filters to see if it's possible.
For now, thanks. :)
Ruskie
 
Posts: 27
Joined: Sun Jan 04, 2009 5:16 am

Re: Hands marked for review for other opponents

Postby WhiteRider » Sun Sep 19, 2010 4:27 pm

Yes, something like that may be possible. If anything comes to mind I'll let you know - Kraada may have some ideas too.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hands marked for review for other opponents

Postby kraada » Mon Sep 20, 2010 8:37 am

Try this filter:
(holdem_hand_player_statistics.id_player = (SELECT setting_value::int from settings where setting_name = 'my_player_id') AND NOT (holdem_hand_player_statistics.flg_blind_b)) OR (NOT(holdem_hand_player_statistics.id_player = (SELECT setting_value::int from settings where setting_name = 'my_player_id')) AND holdem_hand_player_statistics.flg_blind_b)

That may do it for you.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Hands marked for review for other opponents

Postby WhiteRider » Mon Sep 20, 2010 8:52 am

That won't show hands where hero is in the BB, though?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hands marked for review for other opponents

Postby kraada » Mon Sep 20, 2010 10:19 am

Yes it will, as it shows all hands from the big blind for anyone.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Hands marked for review for other opponents

Postby WhiteRider » Mon Sep 20, 2010 10:46 am

Maybe I'm misreading a bracket somewhere, but to me it looks like:

(me AND NOT big blind) OR (NOT me AND big blind)
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

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

Who is online

Users browsing this forum: No registered users and 0 guests