Pokertracker stats

What was your best day at the poker table? What is your average win and loss per day?

This howto is tested for pokertracker omaha version 1 and pokertracker holdem version 2 and is for cashgames only!

These questions are not answered by pokertracker directly but you can get the answers if you directly question the pokertracker database with Structured Query Language (SQL).

This is how to do it

  • I assume that you use a postgres database server instead of MsAccess!
  • I assume that you filled your screen name in the “preferences tab” in pokertracker. If this is not the case then the SQL statement below will not work!
  • The SQL statement will return the values for the player you used in the “preferences tab” AND all the aliases which are connected to it in the “general info tab”.
  • I advise you to run this query when you are not playing! Although I think it is unlikely that any problems will occur, even when you have a lot of hands in your database, why take the risk? 


Open the start menu -> postgres -> pgAdminIII

  • Double click on the database server where your database is stored. By default there is only one server available.
  • Enter your postgres password if asked for it.
  • Double click on the pokertracker database you want to use.
  • Then click on the SQL button in the toolbar at the top of the screen.
  • Copy paste the bold text below into the SQL screen and then push the button with the green triangle on it. At the bottom of the screen you have to see the text “query running” or if you database is very small you might see an “instant” result”

Clear the edit screen and copy paste the bold text below and run it! You have to run this SQL statement if you want to run any of the othere SQL statements!


CREATE VIEW V_WINLOSEDAY AS
SELECT  DATE(date_played), SUM(total_won - total_bet) AS RESULT
FROM    "players" P JOIN "game_players" GP ON
              P.player_id = GP.player_id 
             JOIN "game" G ON GP.game_id = G.game_id
WHERE  P.player_id IN (SELECT pref_value
                                   FROM "prefs"
                                   WHERE pref_key = 'RP')
                                   OR
                                   alias_id IN (SELECT pref_value
                                   FROM "prefs"
                                   WHERE pref_key = 'RP')
GROUP BY 1;

Biggest win:

SELECT *
FROM V_WINLOSEDAY
WHERE result = (SELECT MAX(result)
FROM V_WINLOSEDAY);

The value you get is your best day!


Biggest loss:

Clear the edit screen and copy paste the bold text below and run it!

SELECT *
FROM V_WINLOSEDAY
WHERE result = (SELECT MIN(result) FROM V_WINLOSEDAY);

The value you get is your worst day!


Average day:

Clear the edit screen and copy paste the bold text below and run it!

SELECT AVG(result)
FROM V_WINLOSEDAY

The value you get is your average win/lose per day that you played!


Average winning day:

Clear the edit screen and copy paste the bold text below and run it!

SELECT AVG(result)
FROM V_WINLOSEDAY
WHERE result > 0

The value you get is your average win per day that you played and had a positive result!


Average losing day:

Clear the edit screen and copy paste the bold text below and run it!

SELECT AVG(result)
FROM V_WINLOSEDAY
WHERE result < 0

The value you get is your average loss per day that you played and had a negative result!