Quote:
Originally Posted by madramor
Program runs and I can manually enter transactions but it doesn't seem to be reading my HEM db. DB name and login info looks ok to me on trackers screen. Using v0.5 on Win XP
Are you playing cash or tourneys or both?
Here's the query I run for cash games:
Code:
SELECT
date_trunc('day', handtimestamp) AS date,
cast(cast(sum(netamountwon) AS NUMERIC(11,2)) / 100 as numeric(11,2)) as profit,
count(pokerhand_id) AS hands
FROM playerhandscashkeycolumns
WHERE TRUE
AND player_id in (SELECT player_id FROM aliases WHERE aliasplayer_id = (SELECT player_id FROM selectedplayer ORDER BY selectiondate DESC LIMIT 1))
GROUP BY date_trunc('day', handtimestamp)
ORDER BY date_trunc('day', handtimestamp)
And here's the one for tourneys:
Code:
SELECT
date_trunc('day', t.firsthandtimestamp AT TIME ZONE 'GMT') AS date,
cast(cast(sum(winnings - buyin - rake - rebuyamount) AS numeric(13,0)) / 100 as numeric(11,2)) AS profit,
0 AS hands
FROM tourneydata AS t
JOIN tourneyplayerdata AS p ON p.tourneynumber = t.tourneynumber
WHERE TRUE
AND p.player_id in (SELECT player_id FROM aliases WHERE aliasplayer_id = (SELECT player_id FROM selectedplayer ORDER BY selectiondate DESC LIMIT 1))
GROUP BY
date_trunc('day', t.firsthandtimestamp AT TIME ZONE 'GMT')
ORDER BY
date_trunc('day', t.firsthandtimestamp AT TIME ZONE 'GMT')
Try running these in pgAdmin directly against the database and see what you get.
Also, try running this:
Code:
select * from players where player_id in (SELECT player_id FROM aliases WHERE aliasplayer_id = (SELECT player_id FROM selectedplayer ORDER BY selectiondate DESC LIMIT 1))
This last SQL should return all the aliases configured in HEM.
Let me know what they return. PM me your email and we can carry on via email.