Simplifying a query builder expression.