Fatal DB Error after adding a valid session stat

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

Fatal DB Error after adding a valid session stat

Postby el_hombre » Wed Jul 08, 2009 6:22 pm

Hi,
i created this holdem cash session stat:
A Points : value expression: amt_mgr_ipoker*2
column:
amt_mgr_ipoker : sum(if[holdem_table_session_summary.id_site = '400', holdem_table_session_summary.amt_mgr, 0])

But when adding this stat in the first table in the session tab, i can see the whole query string with this error on the end:
reason: fatal error (ERROR: column "holdem_table_session_summary.id_session" must appear in the GROUP BY clause or the used in an aggregate function)

what can i do?
el_hombre
 
Posts: 107
Joined: Sat May 24, 2008 10:45 am

Re: Fatal DB Error after adding a valid session stat

Postby WhiteRider » Thu Jul 09, 2009 5:08 am

You do not need the SUM() - this is for each individual session so you're not adding up totals across all sessions.
Just:
amt_mgr_ipoker : if[holdem_table_session_summary.id_site = '400', holdem_table_session_summary.amt_mgr, 0]
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 0 guests