Hello all,
I'm a little bit rusty when it comes to SQL stuff but I started building couple stats on PT4, however I'm now trying to get a "harder" one, and failing :/
So any help would be appreciated.
I'd like to get the player stack size on the first hand of HU during a tournament (if heads up happen).
So far I'm with query :
SELECT s.amt_before
FROM (
SELECT thps.amt_before, ths.id_hand, min(ths.id_hand) over (partition by ths.id_tourney) first_hu_hand
FROM tourney_hand_summary ths INNER JOIN tourney_hand_player_statistics thps ON (ths.id_hand = thps.id_hand)
WHERE ths.cnt_players = 2
) as s
WHERE s.id_hand = s.first_hu_hand
which kind of works within the PostgreSQL query interface (except it's returning the value for both HU players instead of just Hero, but I believe this will automagically get sorted out when applied within a Hero custom report).
However query is completely rejected by PT4.
Anyone knows what I'm doing wrong ?
Thanks alot !