Filtering vs specific player

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

Re: Filtering vs specific player

Postby denutza » Mon Dec 28, 2009 7:59 pm

Is it even possible to use the simple filters on your self (hole cards position, etc),
and use advanced SQL statements on other specific opponents?

They seem to collide.
denutza
 
Posts: 105
Joined: Fri May 23, 2008 2:01 am

Re: Filtering vs specific player

Postby kraada » Tue Dec 29, 2009 3:06 pm

In reverse order:

Right now there's a known bug causing simple filters and SQL queries to conflict. It's in our bug tracker to be fixed, though I don't know at what point this will be working. As such, if you're using SQL queries you need to only use SQL queries.

Filter on Active Player filters to all hands from Hero's perspective as defined in the Settings section. So if you wanted to do a big query on all players you'd want that unchecked. If you want to look at your stats or the stats of players against you, you could leave it checked. As this cuts down on a lot of rows in the database, it will definitely speed things up.

The Player Statistics section is for statistics from all hands. The Hand section is for statistics from specific hands only. So for example, if you wanted to see the VP$IP of all players you'd need the Player Statistics section, as that's a statistic you look at from players over all hands they have played. The Hand section is useful if you want to make reports to pick out specific hands to look at either the actions taken or results or replay specific hands. If you add the Hand # statistic to a report in the Hand section, you can then double click that row in the report and the detail window will pop up that you can launch the replayer from. I hope that helps clarify the difference, but if there's a specific report you're not sure about if you describe it I'll explain where you want to put it.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filtering vs specific player

Postby denutza » Tue Dec 29, 2009 4:22 pm

I did find a way that doesn't seem to be conflicting, however that SQL bug I was talking about where if an opponent has the
same EXACT screenname on PokerStars and Fulltilt, keeps getting in the way more than I thought.

Heres the basic version of the SQL statement:
My Report only contains the 'player' name stat to simplify things.

Code: Select all
    ( 0 < (SELECT count(hhps2.id_hand) FROM omaha_hand_player_statistics hhps2 WHERE hhps2.id_hand = omaha_hand_player_statistics.id_hand AND hhps2.id_player =
(SELECT p.id_player FROM player p WHERE player_name_search='opponent' )) )


Here's the log error:

2009/12/29 12:17:48.390: [00000884][Query] Executing SQL (Thread): SELECT (player.player_name) as "str_player_name" FROM omaha_hand_player_statistics , player WHERE (player.id_player = omaha_hand_player_statistics.id_player) AND (omaha_hand_player_statistics.id_player = 1) AND (( ( 0 < (SELECT count(hhps2.id_hand) FROM omaha_hand_player_statistics hhps2 WHERE hhps2.id_hand = omaha_hand_player_statistics.id_hand AND hhps2.id_player = (SELECT p.id_player FROM player p WHERE player_name_search='opponent' )) ) )) GROUP BY (player.player_name)
2009/12/29 12:17:48.421: [00000884][PostgresConnection (Error)] Unable to execute query: SELECT (player.player_name) as "str_player_name" FROM omaha_hand_player_statistics , player WHERE (player.id_player = omaha_hand_player_statistics.id_player) AND (omaha_hand_player_statistics.id_player = 1) AND (( ( 0 < (SELECT count(hhps2.id_hand) FROM omaha_hand_player_statistics hhps2 WHERE hhps2.id_hand = omaha_hand_player_statistics.id_hand AND hhps2.id_player = (SELECT p.id_player FROM player p WHERE player_name_search='opponent' )) ) )) GROUP BY (player.player_name) ; Reason: Fatal Error (ERROR: more than one row returned by a subquery used as an expression )
denutza
 
Posts: 105
Joined: Fri May 23, 2008 2:01 am

Re: Filtering vs specific player

Postby kraada » Tue Dec 29, 2009 11:16 pm

Try adding "and id_player_alias = 0" and see if that fixes that error.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filtering vs specific player

Postby denutza » Wed Dec 30, 2009 12:13 am

That doesnt work either...I tried many variations of it...It will work on players that have unique screennames on each site.

My guess is that its just a something you guys didnt run into yet, when you wrote the SQL statement for
this thread : http://www.pokertracker.com/forums/viewtopic.php?f=45&t=8028&p=94574#p94574

Could you please play around with this or give me some more ideas to try.

Thanks.
denutza
 
Posts: 105
Joined: Fri May 23, 2008 2:01 am

Re: Filtering vs specific player

Postby denutza » Wed Dec 30, 2009 12:29 am

Also let me add that when I go to purge 'opponent' from database that way if they have same screenname
on both sites, I can wipe out one of their names, heres what happens:

Under Purge/Omaha/Sessions after purge is done, their screenname will not show up anymore in this section.
But when I go back to main screen, and 'FIND' them, they're still there (same site that I purged them from),
and it still shows their hands and everything, even after Housekeeping.
denutza
 
Posts: 105
Joined: Fri May 23, 2008 2:01 am

Re: Filtering vs specific player

Postby WhiteRider » Wed Dec 30, 2009 6:15 am

There is a known bug with aliases which is being worked on now, I understand, and it's possible that this affects identical names, although I don't know for sure.
Please report your purging problem so that we can investigate.

FWIW, that report filter is really intended for you to filter for your own name, then run the report for your specific opponents, so that you don't need to keep editing the report to change the player name.
If you have your own name in the filter query and the 'filter to active player' option set, then it will show the opponent's stats vs you. If you want to see your own stats against a specific opponent, you will need to do it as you are, though.
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Previous

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

Who is online

Users browsing this forum: No registered users and 5 guests

cron