Hand Groupings

Questions and discussion about PokerTracker 4 for Windows

Moderators: WhiteRider, kraada, Flag_Hippo, morny

Re: Hand Groupings

Postby PJs Ronin » Mon May 06, 2013 7:11 pm

BillGatesIII wrote:
PJs Ronin wrote:@BillGatesIII

Care to share?
...

Next step is to create a custom stat. I'll explain that one tonight after work :)


I see where you're going... nice. Look forward to next instalment which will be the key to getting this into a stat(s). Stab in the dark assessment, but there is some serious upside potential to this methodology.
PJs Ronin
 
Posts: 978
Joined: Fri Dec 25, 2009 11:55 pm

Re: Hand Groupings

Postby BillGatesIII » Tue May 07, 2013 3:07 am

The column for the stat is a single query.
Code: Select all
select group_rank from lookup_starting_hand_ranks lshr where lshr.id_holecard = (tourney_hand_player_statistics.id_holecard)

Clipboard06.png

Make sure to tick the 'Group by' check box.

The stat itself is rather straightforward and can be used in any Hand Report.
Clipboard07.png


Looking at it now, I would prefer to use different names for the tables, columns and stats. Something with holecard and the type of ranking in it to separate it from the built in _hand_rank_group columns.
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: Hand Groupings

Postby PJs Ronin » Tue May 07, 2013 4:27 am

lack of sleep... making stupid mistakes... back in 12 hours.
PJs Ronin
 
Posts: 978
Joined: Fri Dec 25, 2009 11:55 pm

Re: Hand Groupings

Postby PJs Ronin » Tue May 07, 2013 9:15 pm

Ok, after getting postgress sorted out (hard for PT4 to link to a db when postgres isn't running :oops: ), I created a table called 'hand_group' with two columns. First column (primary key) called 'id' which is just a sequential listing from 1 to 169. Second column called 'rank' that identifies which group (1-9) the id falls in to. Time consuming, but easy peasy.

When I try and create the column with:

Code: Select all
select group_rank from lookup_starting_hand_ranks lshr where lshr.id_holecard = (tourney_hand_player_statistics.id_holecard)

I get "The statement is not valid SQL".

Suggestions?
PJs Ronin
 
Posts: 978
Joined: Fri Dec 25, 2009 11:55 pm

Re: Hand Groupings

Postby tarix » Wed May 08, 2013 1:57 am

Code: Select all
SELECT group_rank FROM lookup_starting_hand_ranks AS lshr WHERE lshr.id_holecard = (tourney_hand_player_statistics.id_holecard)


It was missing an "AS".
tarix
Developer
 
Posts: 3759
Joined: Tue May 20, 2008 2:49 pm

Re: Hand Groupings

Postby PJs Ronin » Wed May 08, 2013 3:46 am

tarix wrote:
Code: Select all
SELECT group_rank FROM lookup_starting_hand_ranks AS lshr WHERE lshr.id_holecard = (tourney_hand_player_statistics.id_holecard)


It was missing an "AS".

I get the same result, not valid SQL.
PJs Ronin
 
Posts: 978
Joined: Fri Dec 25, 2009 11:55 pm

Re: Hand Groupings

Postby BillGatesIII » Wed May 08, 2013 4:25 am

@tarix: AS is optional in FROM items.

@PJs: Your table is called hand_group (and the columns also have different names) so the SQL should look something like this:

SELECT rank FROM hand_group hg WHERE hg.id = (tourney_hand_player_statistics.id_holecard)

But, rank() is a built in Postgres function so I think it's better to rename that column to something else (and change the SQL accordingly). Also, renaming the primary column to id_holecard might fix things.

One last thing is to put the SQL in one line, so no carriage-returns, because sometimes the PT4 parser will not accept this.
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: Hand Groupings

Postby PJs Ronin » Wed May 08, 2013 5:10 am

@ Bill,

Damn you Sir, you a dragging my old brain out of it's peaceful retirement.

I had a feeling the gist of the SQL statement was as you described, but would never have worked out that rank() may throw a shoe. Thanks for your help on this, will be back in 12 hours. (there are some benefits and impediments to living on the opposite side of the world)
PJs Ronin
 
Posts: 978
Joined: Fri Dec 25, 2009 11:55 pm

Re: Hand Groupings

Postby BillGatesIII » Wed May 08, 2013 4:38 pm

Do you live on the opposite or do I live on the opposite side of the world :)
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: Hand Groupings

Postby PJs Ronin » Wed May 08, 2013 8:53 pm

Success !

Thank you :)

Btw, I'm in Perth, West Aust which is about as far from anywhere you can get and still be on the planet.

Regards, I'm off to do some modifying !
PJs Ronin
 
Posts: 978
Joined: Fri Dec 25, 2009 11:55 pm

PreviousNext

Return to PokerTracker 4

Who is online

Users browsing this forum: No registered users and 3 guests

cron
highfalutin