PDA

View Full Version : How to retrieve player data from HM database?



Cervus
11-17-2009, 08:52 PM
I'm browsing my HM database using pgAdmin III and can't understand if there's a way of retrieving statistics on a particular player (e.g. the number of recorder hands, VPIP, PFR, etc.)

Has anyone been successful in retrieving such data (without, of course, running HM itself)?

Any advice will be truly appreciated.

fozzy71
11-17-2009, 09:15 PM
You would need to use various SQL Queries, depending on what you are looking for. I personally have no SQL Query experience, so if you have some specific questions I would be glad to forward them to the developer.

Cervus
11-17-2009, 09:28 PM
I'm looking for a way to retrieve the following stats, given the player's name:
- Number of hands
These - from a particular position:
- VP$IP
- Call Open
- PFR
- 3-Bet
Also:
- Fold to 3B
- Vs Steal (% of Fold/Call/3Bet from SB/BB)

If there's any sort of a guide to SQL queries for the above and/or other stats, I'd really appreciate access to it. I'd hate to bother the developer too much :-)

Rvg72
11-17-2009, 10:29 PM
There is a flag in the holdemmanager.config file named LogDatabaseCommands - set this to True. Then all queries will be saved to a dbtrace.log file in your logs folder.

So after setting this, launch HM and go to the Players Tab and run the
default report and you will see the query that is used to grab all of the
default report data.

You can trim down the where clause to remove fields that you do not need and then add a "where player_ID = (select player_Id from players where playername = 'ABCDEF')"

Roy

Cervus
11-17-2009, 11:20 PM
Thanks a lot, Roy!

powerflash
11-24-2009, 05:00 PM
Hi,

I use this query for get data from all player in my db:



SELECT
playername, SUM(totalhands) AS HANDS,
100.0*SUM(vpiphands)/SUM(totalhands) AS VPIP,
100.0*SUM(pfrhands)/SUM(totalhands) AS PFR
FROM
compiledplayerresults_month
JOIN compiledresults_month
ON compiledplayerresults_month.compiledplayerresults_ id = compiledresults_month.compiledplayerresults_id
JOIN players
ON compiledresults_month.player_id = players.player_id AND players.site_id=1
WHERE compiledresults_month.totalplayedhands >= 1
GROUP BY playername ;


but I want get "steal" value for every player I can get this value?

powerflash
12-08-2009, 10:33 AM
up

netsrak
12-09-2009, 03:34 AM
I move your thread to the custom stats, you hopefully get an answer there.