Re: Querying a MYSQL database?
Tweak this to get the desired result. This query finds players with 40% or higher flops seen (just because it's easier to find than VPIP) at 2/4 full ring. They must have played at least 100 hands also. You could also add in a condition for game.site_id to restrict it to a particular site.
Give it a while to run if you've got a big database...
<font class="small">Code:</font><hr /><pre>
select p.nickname,
count(distinct g.gameid) as hands,
sum(a.sawflop)/count(distinct g.gameid) * 100 as sawflop,
sum(a.raisedpreflop)/count(distinct g.gameid) * 100 as pfr
from player p, action a, game g
where p.playerid = a.playerid
and a.gameid = g.gameid
and g.nrofplayers between 7 and 10
and g.level = '2/4'
group by p.playerid
having sawflop >= 40 and hands >= 100
order by sawflop desc, pfr;
</pre><hr />
I did attempt to add post-flop aggression into the query, but it gets messy as you have to look at various combinations of fields and I'm still not sure that it works correctly...
|