PDA

View Full Version : Converting PT2 queries



weaktight
10-05-2008, 01:41 AM
I'm looking to convert some PT2 queries and make them work for HEM. There doesn't seem to be a table similar to PT2's session table.

How do I list all the players who played and their winnings at a table over a certain time (ie when I played):

SELECT DISTINCT screen_name, session_id, p.player_id, game_level_desc, amount_won FROM session s
inner join game_players gp using (session_id)
inner join game_level using(game_level_id)
inner join players p on gp.player_id=p.player_id
WHERE table_name='{table}' and session_end> TIMESTAMP'{start}' and session_start< TIMESTAMP'{end}'
ORDER BY amount_won DESC
limit 60

weaktight
10-06-2008, 02:37 AM
I'm using the pokerhandscashkeycolumns table for this... I guess the concept of "session" is quite different. I'd like to be able to filter these stats by session. Right now I'm just filtering them based on the handtimestamp field. Any suggestions for working in the table's table?