$having parameter allows you to filter your results of an aggregation using boolean operators, similar to the
HAVING clause in SQL. For example, to aggregate our earthquakes and get only the sources with more than 500 quakes:
Multiple boolean operators are available to combine filters:
|The logical and of two expressions.
a AND b will return true ONLY if
b are both true.
|The logical or of two expressions.
a or b will return true if either
b are true.
|The logical not of an expression.
NOT a will return true, ONLY if a is false.
|Whether a value is null or not.
a IS NULL will return true, ONLY if
a is null.
IS NOT NULL
|Whether a values is not null.
a IS NOT NULL will return true, ONLY if
a is not null
( ... )
|Parentheses are used for defining order of operations.
b>3 AND (a=1 OR a=2)