SQL query - export all 4b hands of alias in postgres
Join Date: Feb 2005
Posts: 28
Hi,
I would like to run a query that exports all hands where a player in a predefined alias has 4b, this is since I want to study this specific situation but loading the alias (huge) makes my computer extremely slow so I figured I could export them and import them in a separate DB to study the population tendencies.
I could do this as a filter in HM, and then mark all hands and export but it would be cooler if you could do it directly in pgadmin.
So something like:
Select * from handhistories
where player_id = player_id in aliasplayer_id = 43050
where compiledplayerresults.raisedthreebetpreflop = true.
Basically, export all hands from aliasplayers where they have raised a preflop threebet.
I have not studied SQL/the inner workings of the HM database enough to work this out so any help would be greatly appreciated!
Cheers.
Join Date: Feb 2005
Posts: 28
So I figured I would post things as I dig into this to help people who also are learning SQL and the HM database.
I figured out how to export a single handhistory given its game id:
select handhistory from handhistories
where gamenumber = 11111111111
where gamenumber is hand# in a pokerstars HH for example.
But I have not been able to find a table where the gamenumber that each player has played is stored or similar information.
Join Date: Feb 2005
Posts: 28
So I found out which tables contain the column player_id by using the following:
select * from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME like 'player_id'
order by TABLE_NAME
Unfortunately that seems like a dead end.
Join Date: Feb 2005
Posts: 28
So it seems HM2 stores a ton of data in a non quearyable database and the solution might be to use HMQL instead.
Over and out.