Page 1 of 1

Calcuating FTP Points Problem

PostPosted: Tue Dec 23, 2008 12:36 pm
by oracle3001
Ok, I successfully created a custom stat to calculate the number of FTP's earned. However, the problem I face is this, if I created this particular stat under "Holdem Cash Player Statistics", there is no problem. I can add it to the General->Player Stats and it shows up fine. The SQL query I am using for starters is the following

sum(if[id_site = 300, holdem_hand_summary.amt_rake,0])

As FTP points are awarded to each person at the table equal to the rake taken from the pot (up to a certain maximum, but keeping it simple to start with).

Now, if I try and create the same stat in "Holdem Cash Sessions" (so I can then add it to Player Summary table), again I use the same query and it is returned as valid. However, when I try and add the stat to the table, I get a unable to execute query............

Am I been very thick here, is there some reason why I can't have the stat in the Player Summary Table, as in my opinion that is where it should belong along side rakeback etc (which I already have thanks to repository stats).

Re: Calcuating FTP Points Problem

PostPosted: Tue Dec 23, 2008 12:57 pm
by kraada
holdem_hand_summary gives you the summary for each hand.
holdem_table_session_summary gives you the summary for each session and I think that's the table you want to be using here (it also has an amt_rake field). Since you get 3 points for 3$ rake and that's the max rake, it won't matter that you can't actually select the maximum.

This won't be entirely accurate though as you won't have a way to track happy hour bonus points.

Re: Calcuating FTP Points Problem

PostPosted: Tue Dec 23, 2008 1:56 pm
by oracle3001
Doesn't seem to give the correct answer. It just gives the total rake paid i.e. my stat turns out to equal the Rake column (and this isn't the correct answer as I have checked my player stat FTP calc against records in FTP). I don't want the total rake I paid, but the total amount of rake taken from the table during a session.

Just to check using your suggestion was the following:-

sum(if[id_site = 300, holdem_table_session_summary.amt_rake,0])

Re: Calcuating FTP Points Problem

PostPosted: Tue Dec 23, 2008 2:18 pm
by kraada
That was my suggestion, and you're right that won't work. I don't think you can access the hand tables in the total session summary reports though (for this specific stat it would work well b ut for a lot of stats it would cause problems). A couple of thoughts looking at the holdem_table_session_summary fields: (1) Try using amt_mgr and working backwards to the amount of total rake paid. Since amt_mgr is calculated by rake paid divided by players in the pot, if you're playing at mostly full tables you can get a close number fairly easily. (2) Try working some magic with the amt_pot amount. I'm starting to think this won't work though as this appears to be the total amount of all pots summed up. You could get a maximum number of points pretty easily (take 5% of this number), but if you're hitting the max pot regularly that won't work and for pots that don't reach the flop there's no rake, so I don't think this avenue will end up working very well.

I can't think of any other options off the top of my head, but I think you can get a decent approximation with (1).