Earned ongame points in sessions

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

Re: Earned ongame points in sessions

Postby WhiteRider » Sun Aug 17, 2008 3:29 pm

Hmm - I get the same problem.
I haven't made any Holdem Cash Session stats so I'm not sure what the problem is.
Try creating the same stat in Holdem Cash Player Statistics and see if it works there, and I'll try to work out what the problem is.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Earned ongame points in sessions

Postby WhiteRider » Sun Aug 17, 2008 3:42 pm

Actually, thinking about it, I'm pretty sure you won't be able to build stats based on individual hands in the 'sessions' section.
For now you will need to use the 'player statistics' session as I suggested.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Earned ongame points in sessions

Postby lmx2k5 » Mon Aug 18, 2008 3:30 am

well, there is a report for summary player points in repository, but I made SQL query for my purposes, which can be executed in pgAdmin application. Here is SQL if someone else needs it, you just need to replace hts.id_player with you player id from "players" table

Code: Select all
SELECT  ht.table_name  ,
        hts.date_start ,
        hts.date_end   ,
        hts.cnt_minutes,
        hts.amt_won    ,
        hts.cnt_hands  ,
        hts.amt_rake,
        (SUM ((
                        CASE
                                WHEN
                                        (
                                                hhs.id_site != 600
                                        )
                                THEN 0
                                ELSE (
                                                CASE
                                                        WHEN
                                                                (
                                                                        hpd.amt_bet_p + hpd.amt_bet_f + hpd.amt_bet_t + hpd.amt_bet_r = 0
                                                                )
                                                        THEN 0
                                                        ELSE (
                                                                        CASE
                                                                                WHEN
                                                                                        (
                                                                                                hhs.amt_rake < 0.1
                                                                                        )
                                                                                THEN 0
                                                                                ELSE (
                                                                                                CASE
                                                                                                        WHEN
                                                                                                                (
                                                                                                                        hhs.amt_rake > 3.0
                                                                                                                )
                                                                                                        THEN 3.0
                                       ELSE trunc(hhs.amt_rake*10)/100
                                                                                                END)
                                                                        END)
                                                END)
                        END) ))
FROM    holdem_table ht                 ,
        holdem_table_session_summary hts,
        holdem_hand_summary hhs         ,
        holdem_hand_player_detail hpd
WHERE   hts.id_site  = 600
    AND hts.id_player=41
    AND ht.id_table  = hts.id_table
    AND hhs.id_table = ht.id_table
    AND hhs.id_hand  = hpd.id_hand
GROUP BY ht.table_name ,
        hts.date_start ,
        hts.date_end   ,
        hts.cnt_minutes,
        hts.amt_won    ,
        hts.cnt_hands,
        hts.amt_rake
ORDER BY date_end DESC;
lmx2k5
 
Posts: 25
Joined: Tue Mar 25, 2008 10:31 am

Previous

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

Who is online

Users browsing this forum: No registered users and 0 guests