anter
07-30-2010, 04:44 PM
I've figured out how to calculate VPIP/PFR stats for in SQL (see below). I'd like to be able to calculate VPIP/PFR when 7-10 players are playing, when 4-6 players are playing and when 2-3 players are playing. Is this possible to do?
SELECT playername, sum(totalhands), sum(vpiphands), sum(pfrhands)
FROM compiledplayerresults_month
JOIN compiledresults_month
ON compiledplayerresults_month.compiledplayerresults_ id = compiledresults_month.compiledplayerresults_id
JOIN players
ON compiledresults_month.player_id = players.player_id
GROUP BY playername
SELECT playername, sum(totalhands), sum(vpiphands), sum(pfrhands)
FROM compiledplayerresults_month
JOIN compiledresults_month
ON compiledplayerresults_month.compiledplayerresults_ id = compiledresults_month.compiledplayerresults_id
JOIN players
ON compiledresults_month.player_id = players.player_id
GROUP BY playername