Rakeback by site

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 by site

Postby ebrenton » Wed Feb 08, 2012 10:37 am

I know this has been asked before, but the examples are just not working for me.
I am a noob to custom stats, so please bare with me.

First question. Let's keep it simple to start. Why is this not valid...

sum( if[id_site = 1200,(amt_rake * 0.33),0])

...or even just...
if[id_site = 1200,(amt_rake * 0.33),0]

It would seem to me that id_site and amt_rake are existing columns, so why can I not use them here.
I am trying to add this as a new column, under Holdem Cash Player Statistics.

Thank you.
ebrenton
 
Posts: 5
Joined: Wed Dec 07, 2011 4:16 pm

Re: Rakeback by site

Postby kraada » Wed Feb 08, 2012 10:58 am

You can't use columns in other column definitions if the columns you want to use have sum() in them - the nesting a sum() inside a sum() is not valid.

However regardless what kind of rake calculation your site uses is important - if you want weighted contributed, for example, that value is not the same as amt_rake.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Rakeback by site

Postby ebrenton » Wed Feb 08, 2012 12:04 pm

So why would this not be valid...

if[id_site = 1200,(amt_rake * 0.33),0]

It's basically an alteration of the standard amt_rbStat I downloaded...(amt_rake * 0.27)
ebrenton
 
Posts: 5
Joined: Wed Dec 07, 2011 4:16 pm

Re: Rakeback by site

Postby ebrenton » Wed Feb 08, 2012 12:37 pm

ok, I got this working by Duping the built-in amt_rake column and editing...

sum( if[holdem_hand_player_statistics.flg_won_hand AND holdem_hand_summary.amt_rake>.001,
(holdem_hand_summary.amt_rake * ( (holdem_hand_player_statistics.amt_won + holdem_hand_player_detail.amt_bet_ttl) /
(holdem_hand_summary.amt_pot - holdem_hand_summary.amt_rake)) * if[holdem_hand_summary.id_site = 1200,.33, if[holdem_hand_summary.id_site = 2300,.40,0]] ),
0])
ebrenton
 
Posts: 5
Joined: Wed Dec 07, 2011 4:16 pm

Re: Rakeback by site

Postby kraada » Wed Feb 08, 2012 2:44 pm

Right but what I was trying to say what that that rake value may or may not be the value that your site is using to calculate rakeback. We should confirm that you're using the right value first - otherwise the numbers won't line up.
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 2 guests