Having Clause

The HAVING clause is identifical to the WHERE clause, and is applied after the GROUP BY clause.

Recall that:

  • Boolean predicates follow SQL’s 3-valued logic.

  • PartiQL has two kinds of absent values: NULL and MISSING — as far as IS NULL is concerned, a NULL input and a MISSING input behave identically.

  • Alike SQL, when the expression of the HAVING clause predicate evaluates to an absent value or a value that is not a Boolean, PartiQL eliminates the corresponding binding.