PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.
Moderator: Moderators
by banshee » Sun Dec 28, 2008 10:50 am
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?
-
banshee
-
- Posts: 53
- Joined: Thu May 08, 2008 6:10 am
by kraada » Sun Dec 28, 2008 4:29 pm
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 . . .
-
kraada
- Moderator
-
- Posts: 54431
- Joined: Wed Mar 05, 2008 2:32 am
- Location: NY
Return to PostgreSQL [Read Only]
Users browsing this forum: No registered users and 29 guests