Sum on the truncated name of the table_name?

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

Sum on the truncated name of the table_name?

Postby WestEarn » Sun Jul 15, 2012 1:22 pm

Hello,

I'm trying to make a custom report for grouping my amount 'amount_won' through the first 5 characters of the table_name field.

I've made this stats: substring(holdem_table.table_name from 1 for 5)

The reason why is that the room I'm playing on proposes 2 type of games for cash game: turbo or not turbo. The room uses city names with a numeric suffix.

Example:
Turbo tables are named cityX1, cityX2, citX03, cityX4, etc.
Non Turbo tables are named townX1, townX2, townX3, townX4, etc.

So, if I want to know my results by table type, turbo or not, I have to sum on the truncated name of the table, as 'cityX' or 'townX'

The problem is when I launch the report, it says that amount_won must be in the group by clause. I don't understand what I have to do.

2nd problem : I don't understand in which sections I have to work, I'm not sure. Holdem Cash Hand, Holdem Cash Player, Cash Session, or Cash SessionS ?

Thanks for your help.
WestEarn
 
Posts: 94
Joined: Mon Mar 19, 2012 10:08 am

Re: Sum on the truncated name of the table_name?

Postby WhiteRider » Mon Jul 16, 2012 3:48 am

For your first issue you need to tick the "Group By" option in your new column - this allows the stat which uses it to group a report.

Which section you use depends on what type of data you want to see - do you want player stats (like VP$IP, PFR, etc) or overall session results like amount won and number of tables played?
Check out the 'Sections' part of the Tutorial: Custom Reports and Statistics which explains how the different sections work.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Sum on the truncated name of the table_name?

Postby WestEarn » Mon Jul 16, 2012 7:39 am

Thanks for your answer. I've ticked the "group by" option in the new column, as sum, but it does not work. The report always talk about a group by problem. If I test the report by adding only my new column truncated table name, it works. As soon as I add a 2nd colum like bb/100 or amount_won, it fails. I've tested in the Holdem Cash Hand.
WestEarn
 
Posts: 94
Joined: Mon Mar 19, 2012 10:08 am

Re: Sum on the truncated name of the table_name?

Postby kraada » Mon Jul 16, 2012 8:59 am

You want to be doing it in Holdem Cash Player Statistics - that goes by groups of hands, and you want to see all data from those kinds of tables in one row. Build your stat in HCPS and it should work properly for you.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Sum on the truncated name of the table_name?

Postby WestEarn » Mon Jul 16, 2012 3:21 pm

Thanks for your help.

What do you mean by HCPS : Holdem Cash Player Session ?

I do not have this section. I have Holdem Cash Hand, Holdem Cash Player, Cash Session, or Cash SessionS...

I ask for some precisions because I'm French and I'm not sure to always understand. :-)
WestEarn
 
Posts: 94
Joined: Mon Mar 19, 2012 10:08 am

Re: Sum on the truncated name of the table_name?

Postby kraada » Mon Jul 16, 2012 4:52 pm

Yes, that's what I meant - Holdem Cash Player Statistics - or Holdem Cash Player if you prefer to leave off the "Statistics" part - that's the section you want to create the stat in.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Sum on the truncated name of the table_name?

Postby WestEarn » Mon Jul 16, 2012 5:58 pm

kraada wrote:Yes, that's what I meant - Holdem Cash Player Statistics - or Holdem Cash Player if you prefer to leave off the "Statistics" part - that's the section you want to create the stat in.


Sorry, maybe a problem with my english.

I do not have a section named Holdem Cash Player

PT3 proposes me:
-Holdem Cash Hand
-Holdem Cash Player Statistics
-Holdem Cash Session
-Holdem Cash SessionS (with a S)

I have to work with which one?

Thanks.
WestEarn
 
Posts: 94
Joined: Mon Mar 19, 2012 10:08 am

Re: Sum on the truncated name of the table_name?

Postby kraada » Mon Jul 16, 2012 6:29 pm

Use Holdem Cash Player Statistics as I said originally - the one in bold from your message below.

WestEarn wrote:Sorry, maybe a problem with my english.

PT3 proposes me:
-Holdem Cash Hand
-Holdem Cash Player Statistics
-Holdem Cash Session
-Holdem Cash SessionS (with a S)

I have to work with which one?

Thanks.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Sum on the truncated name of the table_name?

Postby WestEarn » Mon Jul 16, 2012 7:29 pm

Thanks for your attention.

Well it works.

I've tried on all sections. Conclusion below :

-Holdem Cash Hand: It lists all the tables of all the rooms and ignores the limite, date or room set in the filter. Failed.
-Holdem Cash Player Statistics: It lists all the tables of all the rooms and ignores the limite, date or room set in the filter. Failed.
-Holdem Cash Session: Group by error
-Holdem Cash SessionS (with a S): cool, it does what i want.

Problem solved.

SIncerely.
WestEarn
 
Posts: 94
Joined: Mon Mar 19, 2012 10:08 am


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

Who is online

Users browsing this forum: No registered users and 3 guests