VeloDB Cloud
SQL Manual
Functions
aggregate-functions
ANY_VALUE

ANY_VALUE

Description

Syntax:

ANY_VALUE(expr)

If there is a non NULL value in expr, this function returns any non NULL value; otherwise, it returns NULL.

Alias function: ANY(expr)

Example

mysql> select id, any_value(name) from cost2 group by id;
+------+-------------------+
| id   | any_value(`name`) |
+------+-------------------+
|    3 | jack              |
|    2 | jack              |
+------+-------------------+

Keywords

ANY_VALUE, ANY