Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators
pasita wrote:If I don't add the first "100*" in the value expression, the stat fails. That's because the query generated by PT4 ends in the line
)) )) >= 1))AND ((1=1))) ORDER BY (timezone('UTC', cash_hand_player_statistics.date_played + INTERVAL '0 HOURS')) desc LIMIT 100
SELECT (cash_hand_summary.id_hand) as "id_hand", (cash_hand_summary.id_site) as "id_site", (cash_hand_summary.hand_no) as "hand_no", (cash_hand_summary.id_gametype) as "id_gametype_summary", (cash_hand_summary.flg_note) as "flg_note", (cash_hand_summary.flg_tag) as "flg_tag", (timezone('UTC', cash_hand_player_statistics.date_played + INTERVAL '0 HOURS')) as "date_played", (cash_hand_summary.id_limit) as "id_limit", (cash_hand_player_statistics.amt_won) as "amt_won", (cash_limit.limit_currency) as "limit_currency", ((case when( cash_hand_player_statistics.val_curr_conv != 0) then cash_hand_player_statistics.val_curr_conv*cash_hand_player_statistics.amt_won else 0.0 end)) as "amt_won_curr_conv", (cash_hand_player_statistics.id_final_hand) as "id_final_hand", (cash_hand_player_statistics.flg_showed) as "flg_showed", (cash_hand_player_statistics.enum_folded) as "enum_folded", (cash_hand_player_statistics.holecard_1) as "id_holecard1", (cash_hand_player_statistics.holecard_2) as "id_holecard2", (cash_hand_player_statistics.holecard_3) as "id_holecard3", (cash_hand_player_statistics.holecard_4) as "id_holecard4", (lookup_positions.absolute_position) as "val_position_abs", (lookup_positions.description) as "str_position", ((case when( cash_hand_player_statistics.flg_p_open_opp) then 1 else (case when(cash_hand_player_statistics.cnt_p_face_limpers = 1) then 2 else (case when( cash_hand_player_statistics.cnt_p_face_limpers > 1) then 3 else (case when( cash_hand_player_statistics.flg_p_squeeze_opp) then 5 else (case when( cash_hand_player_statistics.flg_p_3bet_def_opp AND NOT cash_hand_player_statistics.flg_p_3bet_opp) then 6 else (case when( cash_hand_player_statistics.flg_p_4bet_def_opp AND NOT cash_hand_player_statistics.flg_p_3bet_opp) then 7 else (case when(cash_hand_player_statistics.flg_p_face_raise) then 4 else (case when( lookup_actions_p.action = '') then 8 else 0 end) end) end) end) end) end) end) end)) as "val_p_action_facing", (lookup_actions_p.action) as "str_actions_p", (cash_hand_summary.card_1) as "id_flop1", (cash_hand_summary.card_2) as "id_flop2", (cash_hand_summary.card_3) as "id_flop3", (lookup_actions_f.action) as "str_actions_f", (cash_hand_summary.card_4) as "id_turn", (lookup_actions_t.action) as "str_actions_t", (cash_hand_summary.card_5) as "id_river", (lookup_actions_r.action) as "str_actions_r", (player_winner.player_name) as "str_winner", (cash_hand_summary.id_win_hand) as "id_win_hand", (cash_hand_summary.amt_pot) as "amt_pot", (cash_limit.amt_bb) as "amt_bb", (cash_hand_summary.amt_rake) as "amt_rake", (cash_hand_player_statistics.val_equity) as "val_allin_equity", (cash_hand_player_statistics.flg_showdown) as "flg_wtsd", (cash_hand_player_statistics.enum_allin <> 'N' OR cash_hand_player_statistics.enum_face_allin <> 'N') as "flg_allin" FROM cash_hand_player_statistics , cash_hand_summary, cash_limit, lookup_positions, lookup_actions lookup_actions_p, lookup_actions lookup_actions_f, lookup_actions lookup_actions_t, lookup_actions lookup_actions_r, player player_winner WHERE (cash_hand_summary.id_hand = cash_hand_player_statistics.id_hand AND cash_hand_summary.id_limit = cash_hand_player_statistics.id_limit) AND (cash_limit.id_limit = cash_hand_player_statistics.id_limit) AND (lookup_positions."position"=cash_hand_player_statistics."position" AND lookup_positions.cnt_players=cash_hand_player_statistics.cnt_players_lookup_position) AND (lookup_actions_p.id_action=cash_hand_player_statistics.id_action_p) AND (lookup_actions_f.id_action=cash_hand_player_statistics.id_action_f) AND (lookup_actions_t.id_action=cash_hand_player_statistics.id_action_t) AND (lookup_actions_r.id_action=cash_hand_player_statistics.id_action_r) AND (cash_limit.id_limit = cash_hand_summary.id_limit) AND (player_winner.id_player = cash_hand_summary.id_winner) AND (cash_hand_player_statistics.id_player = (SELECT id_player FROM player WHERE player_name_search='MYNICKHERE' AND id_site='1200')) AND ((((cash_hand_player_statistics.id_gametype)=1))AND (((cash_hand_player_statistics.id_holecard)=123))AND ((((100 * ((CAST(((case when(cash_hand_player_statistics.amt_won >= 0) then ( (CASE WHEN ( cash_limit.amt_bb) <> 0 THEN ((cash_hand_player_statistics.amt_won * 1.0 * 1.0 )/( cash_limit.amt_bb)) ELSE 0 END) ) else 0 end)) AS numeric )
)-(CAST(((case when(cash_hand_player_statistics.amt_won < 0) then ( (CASE WHEN ( cash_limit.amt_bb) <> 0 THEN (((-1 *cash_hand_player_statistics.amt_won) * 1.0 * 1.0 )/( cash_limit.amt_bb)) ELSE 0 END) ) else 0 end)) AS numeric )
)) )) >= 1))AND ((1=1))) ORDER BY (timezone('UTC', cash_hand_player_statistics.date_played + INTERVAL '0 HOURS')) desc LIMIT 100
Return to Custom Stats, Reports and HUD Profiles
Users browsing this forum: No registered users and 55 guests