title: Possible to check WHERE on an AS statement variable? MySQL
body: <p>Would someone explain why I can't seem to use a WHERE clause on my AS variable (not sure what those are actually called.</p>
  
  <p>if i do something like <code>WHERE a.n = gameone</code> in the same exact place it works.</p>
  
  <p>Can i not use a WHERE clause on a var thats created like <code>AVG(b.r) AS fra</code> ?</p>
  
  <p>If i can. how can i?</p>
  
  <pre><code>SELECT
    a.id, a.n, a.t, a.d,
    AVG(b.r) AS fra, COUNT(b.id) as tvotes
  FROM `games` a
  LEFT JOIN `games_ratings` b
  ON a.id = b.id
  WHERE fra &gt;= 2
  GROUP BY a.id
  ORDER BY a.ts
  DESC LIMIT 0, 50
  </code></pre>