rakeback 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

rakeback stat

Postby sym25 » Sat Mar 31, 2012 2:32 pm

try to create stat 'rakeback' in PT4
my rakeback differ to different sites.
i try new stat 'my c rakeback' like:
if( id_site = 900, amt_rake_attributed_curr_conv * 0.45, 0 ) Later i can add different sites here.
When i add it to the 'result' tab and group by months, i get many lines for one month for every site i played in this month and it is calculated only for site with id 900 (in example, it's right), but it isn't summed at the bottom of the grid.
How does it make not to get many lines for a month and get to sum at the bottom?
sym25
 
Posts: 208
Joined: Wed Nov 26, 2008 3:38 am

Re: rakeback stat

Postby WhiteRider » Sat Mar 31, 2012 4:44 pm

Because you're checking for site in the stat it breaks the report down further.

You will need to build a new version of the appropriate column and do the id_site check there so that it is done per hand - by the time you're displaying the value in the stat you're looking at a total amount. You need to do the check for each hand, which means doing it inside the SUM in the column.

For future reference, please post PT4 questions in the PT4 section - it's much easier to keep track of things that way. Thanks.
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 10 guests