- ignore hands where we dont know every holecard
- updated postgresl jdbc driver
download:
http://depositfiles.com/files/24wixa5lb
current SQL:
- Code: Select all
SELECT summary.date_played,
sites.site_abbrev AS site,
limits.limit_name AS limit,
hhh.id_hand,
hero_d.holecard_1 AS hero_hc1,
hero_d.holecard_2 AS hero_hc2,
hero_d.amt_before AS hero_amt_before,
hero_d.amt_bet_ttl AS hero_amt_bet_ttl,
villain_d.holecard_1 AS villain_hc1,
villain_d.holecard_2 AS villain_hc2,
villain_d.amt_before AS villain_amt_before,
villain_d.amt_bet_ttl AS villain_amt_bet_ttl,
(CASE
WHEN hero_s.enum_allin = 'N' THEN villain_s.enum_allin
ELSE hero_s.enum_allin
END) AS allin_street,
history,
card_1 AS flop1,
card_2 AS flop2,
card_3 AS flop3,
card_4 AS turn,
card_5 AS river,
(amt_pot - amt_rake) AS potsize,
hero_s.flg_won_hand AS hero_won,
villain_s.flg_won_hand AS villain_won
FROM player p,
holdem_hand_player_detail hero_d,
holdem_hand_player_detail villain_d,
holdem_hand_player_statistics hero_s,
holdem_hand_player_statistics villain_s,
holdem_hand_summary summary,
holdem_limit limits,
lookup_sites sites,
holdem_hand_histories hhh
WHERE p.player_name = 'advis0r'
AND hero_d.id_player = p.id_player
AND hero_s.id_player = p.id_player
AND villain_d.id_player != p.id_player
AND villain_s.id_player != p.id_player
AND summary.id_site != 0
AND hhh.id_hand = hero_d.id_hand
AND hhh.id_hand = hero_s.id_hand
AND hhh.id_hand = villain_d.id_hand
AND hhh.id_hand = villain_s.id_hand
AND hhh.id_hand = summary.id_hand
AND summary.id_limit = limits.id_limit
AND summary.id_site = sites.id_site
AND hero_s.flg_showdown = true
AND villain_s.flg_showdown = true
AND limits.flg_nlpl = true
AND hero_d.holecard_1 != 0
AND hero_d.holecard_2 != 0
AND villain_d.holecard_1 != 0
AND villain_d.holecard_2 != 0
AND ((hero_d.amt_bet_p + hero_d.amt_bet_f + hero_d.amt_bet_t >= villain_d.amt_before)
OR (villain_d.amt_bet_p + villain_d.amt_bet_f + villain_d.amt_bet_t >= hero_d.amt_before))
AND ((SELECT COUNT(1)
FROM holdem_hand_player_statistics foo
WHERE foo.id_hand = hhh.id_hand
AND foo.flg_showdown) = 2)
AND summary.date_played >= '2002-01-01'
ORDER BY summary.date_played