> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/aggregation/any_value",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for ANY_VALUE

# ANY_VALUE

Returns a single arbitrary value from the specified column.

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
ANY_VALUE(<expression>) [FILTER ([WHERE] <condition>)]
```

## Parameters

| Parameter      | Description                                                       | Supported input types |
| :------------- | :---------------------------------------------------------------- | :-------------------- |
| `<expression>` | Any expression                                                    | Any                   |
| `<condition>`  | An optional boolean expression to filter rows used in aggregation | `BOOL`                |

This function ignores `NULL` inputs. It returns `NULL` only when all inputs are `NULL` or there are no inputs.

## Return Type

Same as input type

## Examples

**Example**

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT
	ANY_VALUE(nickname)
FROM
	UNNEST (ARRAY['kennethpark', NULL, 'sabrina21', 'ruthgill', 'steven70']) AS players(nickname);
```

**Returns**

Any value of the `nickname` column, excluding `NULL`. The first time the query below runs, the nickname `kennethpark` might be returned. The second time the query runs, `sabrina21` or any other value, such as `ruthgill` or `steven70`, might be returned, but `NULL` will never be returned while non-`NULL` options exist.

**Example**

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT ANY_VALUE(data) FROM UNNEST (ARRAY[NULL, NULL, NULL]) arr(data);
SELECT ANY_VALUE(data) FROM UNNEST (ARRAY[1,2,3]) arr(data) WHERE false;
```

**Returns**

`NULL` as no non-`NULL` values are available.
