Use stats from different tables in a costum report

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

Use stats from different tables in a costum report

Postby DeepMig » Sat Dec 17, 2011 6:29 pm

Hello,

When i create a custom report i have to choose the section and i believe each section corresponds to a different table in the database.
I would like to know if i can use stats from different tables in the same report.
For example, i want to include a stat from table 'holdem_hand_summary' in a report with stats from section 'holdem cash hand'.

Thanks.
DeepMig
 
Posts: 39
Joined: Tue Mar 16, 2010 8:39 am

Re: Use stats from different tables in a costum report

Postby WhiteRider » Sun Dec 18, 2011 5:52 am

The sections do not refer to individual database tables, just the type of information. Please see the "Sections" part of the Tutorial: Custom Reports and Statistics for more information.
If you have built (or want to build) a stat to display information from the holdem_cash_hand field in a report in Holdem Cash Hands then that should work fine as it's all information about individual hands.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Use stats from different tables in a costum report

Postby DeepMig » Mon Dec 19, 2011 10:17 am

Ok, so lets say i want to make a report with 3 columns:
column 1 is the hand#
column 2 shows 1 if there was a showdown in the hand and 0 if there was no showdown
column 3 shows the winning hand at showdown

How can i make such a report?
I noticed the winning hand is stored in 'holdem_hand_summary' table, but it's not available for reports in section 'holdem cash hand'.
As for the existence of a showdown, is this information stored in the database? I found column flg_showdown, but this is for individual players, what i would like to know is if a showdown happened in the hand or not.

Thanks.
DeepMig
 
Posts: 39
Joined: Tue Mar 16, 2010 8:39 am

Re: Use stats from different tables in a costum report

Postby kraada » Mon Dec 19, 2011 11:43 am

id_win_hand is only populated when a winning hand is known - if you filter for times that value is positive you'll only see hands that reached showdown.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 1 guest