by kraada » Wed Dec 26, 2012 11:22 am
You can add more things into the HAVING clause. To see the columns you need to reference, look in the Configure -> Statistics window at the Value Expression for your stats, you just need to prefix them with tc. in this case because of the way the query is constructed.
For example, this gives you VPIP of 15 to 25 and PFR of 20 to 40:
tourney_hand_player_statistics.id_hand in (SELECT thps.id_hand from tourney_hand_player_statistics thps, tourney_cache tc where thps.id_player = tc.id_player group by thps.id_hand, thps.id_player HAVING ((((sum(tc.cnt_vpip) / (sum(tc.cnt_hands) - sum(tc.cnt_walks)))) BETWEEN 15 and 25 AND (sum(tc.cnt_pfr) / (sum(tc.cnt_pfr_opp)))) BETWEEN 20 and 40)))