some aggregate function

Returns true if at least one value of expr in a group is true.

Syntax

some(expr) [FILTER ( WHERE cond ) ]

Arguments

  • expr: A BOOLEAN expression.

  • cond: An optional boolean expression filtering the rows used for aggregation.

Returns

A BOOLEAN.

Examples

> SELECT some(col) FROM VALUES (true), (false), (false) AS tab(col);
 true
> SELECT some(col) FROM VALUES (NULL), (true), (false) AS tab(col);
 true
> SELECT some(col) FROM VALUES (false), (false), (NULL) AS tab(col);
 false