Page 1 of 1

holdem_cache.cnt_hands?

PostPosted: Sun Dec 28, 2008 10:50 am
by banshee
hi,

I created this SQL query:

Code: Select all
select
      D.id_hand,
      L.amt_bb,
      C.id_holecard,
      c.hole_cards,
      sum(CC.cnt_vpip * 100) / sum(CC.cnt_hands) as vpip,
      sum(CC.cnt_pfr * 100) / sum(CC.cnt_hands) as pfr
      sum(CC.cnt_hands) as hands
from
      holdem_hand_player_detail D
      join holdem_hand_player_statistics S on D.id_hand = S.id_hand and D.id_player = S.id_player
      join lookup_hole_cards C on C.id_holecard = S.id_holecard
      join holdem_limit L on S.id_limit = L.id_limit
      join holdem_cache CC on CC.id_player = D.id_player
where
      <filter-expression>
group by
      D.id_hand,
      L.amt_bb,
      C.hole_cards,
      C.id_holecard
order by   C.id_holecard


But in most rows the hands-value is the max value of bigint (sth above 21k). What does that mean?

Re: holdem_cache.cnt_hands?

PostPosted: Sun Dec 28, 2008 4:29 pm
by kraada
I just ran the simpler query select cnt_hands from holdem_cache; on a ~250k hands database and the values looked reasonable.

Trying to run your query I get an error: ERROR: syntax error at or near "sum"
LINE 8: sum(CC.cnt_hands) as hands

I'm not quite sure why, unfortunately . . .