You can specify a scalar subquery as an operand of a scalar predicate in the HAVING clause of a query.