creating list of villains with notes

General discussion of PokerTracker 3.

Moderator: Moderators

Re: creating list of villains with notes

Postby kraada » Thu Sep 23, 2010 9:27 am

That you can certainly do; what would you want as the results of the query? I think you only want player notes, you probably also want the player's name with them, anything else?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: creating list of villains with notes

Postby woopwoop » Thu Sep 23, 2010 9:40 am

I was thinking about name, vpip, pfr, af, 3bet pf, fold to 3bet pf and then wtsd, w$sd.
I guess i could find the name of extra stats in the database itself when needed afterwards.
woopwoop
 
Posts: 50
Joined: Tue Oct 13, 2009 3:28 pm

Re: creating list of villains with notes

Postby kraada » Thu Sep 23, 2010 10:52 am

The following query will get you player name, notes, VP$IP and PFR - you can add more stats if you'd like but it's a bit longwinded and you'll see why in a moment. In PGAdmin III, run the following query, saving the output to a file. You'll get one line per note, which means you'll get the same name/vp$ip/pfr several times. But they'll be sorted so it should make sense.

SELECT p.player_name as "Name", n.notes as "Notes", (sum(h.cnt_vpip)::numeric(11,2) / sum(h.cnt_hands)::numeric(11,2)) * 100 as "VP$IP", (sum(h.cnt_pfr)::numeric(11,2) / sum(h.cnt_hands)::numeric(11,2)) * 100 as "PFR" FROM player p, notes n, holdem_cache h WHERE p.id_player = n.id_x and n.enum_type = 'P' and p.id_player = h.id_player group by p.player_name, n.notes order by p.player_name asc;

To add more stats, put it in before the "FROM", offset from "PFR" by a comma. The basic structure here (using cache data) is: sum(h.column_name)::numeric(11,2) - that gets you data from any given column. You can then put them together to build whatever stats you would like - naming them (as "StatName") changes the header so it's easier to remember what you're seeing as the result.

I did check and this query does work, but remember you get one line per note so you'll end up with a lot of lines in the report.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: creating list of villains with notes

Postby woopwoop » Thu Sep 23, 2010 11:07 am

Ok, thanks.
I'll try it later when i'm at my computer and i'll post some feedback
woopwoop
 
Posts: 50
Joined: Tue Oct 13, 2009 3:28 pm

Re: creating list of villains with notes

Postby majonyjony » Sun Feb 26, 2012 12:47 pm

Hi, i look for a query :
Player----player note

THIS:
SELECT p.player_name as "Name", n.notes as "Notes", (sum(h.cnt_vpip)::numeric(11,2) / sum(h.cnt_hands)::numeric(11,2)) * 100 as "VP$IP", (sum(h.cnt_pfr)::numeric(11,2) / sum(h.cnt_hands)::numeric(11,2)) * 100 as "PFR" FROM player p, notes n, holdem_cache h WHERE p.id_player = n.id_x and n.enum_type = 'P' and p.id_player = h.id_player group by p.player_name, n.notes order by p.player_name asc;


ERROR: relation "holdem_cache" does not exist

Please, if is possible a query for Player----player note?

TY and sorry about my english
majonyjony
 
Posts: 109
Joined: Wed Oct 08, 2008 4:01 am

Re: creating list of villains with notes

Postby WhiteRider » Sun Feb 26, 2012 4:25 pm

Has the cache ever been built in this database? If it's a new database then the cache may not exist - try running Database > Housekeeping and see if the query works then?
Otherwise kraada will be able to help you more when he comes on again.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Previous

Return to General [Read Only]

Who is online

Users browsing this forum: No registered users and 27 guests

cron