When building a SelectQuery, why can't I use the alias from addExpression() in a condition()?
The MySQL you're trying to build is invalid - you can't refer to an expression field in a WHERE clause.

You need a HAVING clause for that, which in Drupal-ese is:

$myquery-&gt;havingCondition('sumcalc', 5, '&lt;');