some
aggregate function
Applies to: Databricks SQL Databricks Runtime
Returns true if at least one value of expr
in a group is true
.
Syntax
some(expr) [FILTER ( WHERE cond ) ]
This function can also be invoked as a window function using the OVER
clause.
Arguments
expr
: ABOOLEAN
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
Related
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for