Hi,
Im wondering if I can create a hand report for players that I have a certain number of hands on. For example, can I create a report with players that have >1k hands in my database?
Thanks
Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators
cash_hand_player_statistics.id_hand in (select chps.id_hand from cash_hand_player_statistics chps, cash_cache cc where chps.id_player = cc.id_player group by chps.id_hand, chps.id_player having ((((sum(cc.cnt_hands))) between X and Y)))
Executing SQL (Thread): 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", (player.player_name) as "str_player", (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_player_statistics.id_limit) as "id_limit", ((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", ((case when(cash_hand_player_statistics.flg_f_saw and cash_hand_summary.cnt_players_f = 2) then (select chps.holecard_1 from cash_hand_player_statistics chps where chps.id_hand = cash_hand_player_statistics.id_hand and chps.id_limit = cash_hand_player_statistics.id_limit and chps.position != cash_hand_player_statistics.position and chps.flg_f_saw) else 0 end)) as "villain_id_holecard1", ((case when(cash_hand_player_statistics.flg_f_saw and cash_hand_summary.cnt_players_f = 2) then (select chps.holecard_2 from cash_hand_player_statistics chps where chps.id_hand = cash_hand_player_statistics.id_hand and chps.id_limit = cash_hand_player_statistics.id_limit and chps.position != cash_hand_player_statistics.position and chps.flg_f_saw) else 0 end)) as "villain_id_holecard2", ((case when(cash_hand_player_statistics.flg_f_saw and cash_hand_summary.cnt_players_f = 2) then (select chps.holecard_3 from cash_hand_player_statistics chps where chps.id_hand = cash_hand_player_statistics.id_hand and chps.id_limit = cash_hand_player_statistics.id_limit and chps.position != cash_hand_player_statistics.position and chps.flg_f_saw) else 0 end)) as "villain_id_holecard3", ((case when(cash_hand_player_statistics.flg_f_saw and cash_hand_summary.cnt_players_f = 2) then (select chps.holecard_4 from cash_hand_player_statistics chps where chps.id_hand = cash_hand_player_statistics.id_hand and chps.id_limit = cash_hand_player_statistics.id_limit and chps.position != cash_hand_player_statistics.position and chps.flg_f_saw) else 0 end)) as "villain_id_holecard4", (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.limit_currency) as "limit_currency", (cash_hand_summary.amt_rake) as "amt_rake" FROM cash_hand_player_statistics , cash_hand_summary, player, cash_limit, 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 (player.id_player = cash_hand_player_statistics.id_player) AND (cash_limit.id_limit = cash_hand_player_statistics.id_limit) 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 (((1=1))AND (cash_hand_player_statistics.id_gametype = 1)AND (cash_hand_player_statistics.id_gametype<>1 OR (cash_hand_player_statistics.id_gametype=1 AND (cash_hand_player_statistics.id_limit in (SELECT hlrl.id_limit FROM cash_limit hlrl WHERE (hlrl.flg_nlpl=false and (CASE WHEN hlrl.limit_currency='SEK' THEN (hlrl.amt_bb*0.15) ELSE (CASE WHEN hlrl.limit_currency='INR' THEN (hlrl.amt_bb*0.020) ELSE (CASE WHEN hlrl.limit_currency='XSC' THEN 0.0 ELSE (CASE WHEN hlrl.limit_currency='PLY' THEN 0.0 ELSE hlrl.amt_bb END) END) END) END)<=1.01) or (hlrl.flg_nlpl=true and (CASE WHEN hlrl.limit_currency='SEK' THEN (hlrl.amt_bb*0.15) ELSE (CASE WHEN hlrl.limit_currency='INR' THEN (hlrl.amt_bb*0.020) ELSE (CASE WHEN hlrl.limit_currency='XSC' THEN 0.0 ELSE (CASE WHEN hlrl.limit_currency='PLY' THEN 0.0 ELSE hlrl.amt_bb END) END) END) END)<=0.51)))))) group by chps.id_hand, chps.id_player having ((((sum(cc.cnt_hands))) > 1000))))) ORDER BY (timezone('UTC', cash_hand_player_statistics.date_played + INTERVAL '0 HOURS')) desc LIMIT 1000
Error: Unable to execute query: Fatal Error; Reason: Error: (ERROR: syntax error at or near ")" LINE 1: ....id_player having ((((sum(cc.cnt_hands))) > 1000))))) ORDER... ^ )
cash_hand_player_statistics.date_played >= (select (date_trunc('day', chs.date_played)) from cash_hand_summary chs order by chs.date_played desc limit 1) and cash_hand_player_statistics.date_played <= (select (date_trunc('day', chs.date_played) + time '23:59:59') from cash_hand_summary chs order by chs.date_played desc limit 1) and cash_hand_player_statistics.position = 0 and cash_hand_summary.id_hand in (select chs.id_hand from cash_hand_summary chs where chs.date_played >= (select (date_trunc('day', chs.date_played)) from cash_hand_summary chs order by chs.date_played desc limit 1) and chs.date_played <= (select (date_trunc('day', chs.date_played) + time '23:59:59') from cash_hand_summary chs order by chs.date_played desc limit 1) and chs.id_hand in (select chps.id_hand from cash_hand_player_statistics chps where chps.id_hand = chs.id_hand and chps.id_limit = chs.id_limit and chps.position = 0 and chps.flg_f_saw and chs.cnt_players_f = 2 and chps.id_player in (select cc.id_player from cash_cache cc where cc.id_player = chps.id_player and cc.cnt_players >= 3 group by cc.id_player having sum(cc.cnt_hands) > 1000)) order by chs.date_played desc limit 1000)
if[cash_hand_player_statistics.flg_f_saw and cash_hand_summary.cnt_players_f = 2, (select chps.holecard_1 from cash_hand_player_statistics chps where chps.id_hand = cash_hand_player_statistics.id_hand and chps.id_limit = cash_hand_player_statistics.id_limit and chps.position != cash_hand_player_statistics.position and chps.flg_f_saw), 0]
Return to Custom Stats, Reports and HUD Profiles
Users browsing this forum: No registered users and 14 guests