kraada wrote:I mean that is how "between" works in PostgreSQL.
You have two stats:
sum(if[a between 0 and 1, 1, 0])
and
sum(if[a between 1 and 2, 1, 0])
If we have a hand where a = 1, then this hand gets counted twice. Once because 1 is between 0 and 1 (in PostgreSQL terms) - so it counts for the first row, and once because 1 is between 1 and 2 (in PostgreSQL terms) - so it counts for the second row.
The way to think about it is:
X BETWEEN Y and Z is true if and only if X >= Y and X <= Z.
I don't see why it would count twice since I only have one BETWEEN per query. I'm still not sure how you advice me to structure it, but I tried following instead:
if[tourney_holdem_hand_summary.amt_p_effective_stack >= (tourney_holdem_blinds.amt_bb * 9) AND tourney_holdem_hand_summary.amt_p_effective_stack <= (tourney_holdem_blinds.amt_bb * 11)]This got it "down" to 106% in total.
Close yet far :(