A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clickhouse.com/docs/sql-reference/aggregate-functions/reference/first_value below:

first_value | ClickHouse Docs

first_value

It is an alias for any but it was introduced for compatibility with Window Functions, where sometimes it's necessary to process NULL values (by default all ClickHouse aggregate functions ignore NULL values).

It supports declaring a modifier to respect nulls (RESPECT NULLS), both under Window Functions and in normal aggregations.

As with any, without Window Functions the result will be random if the source stream is not ordered and the return type matches the input type (Null is only returned if the input is Nullable or -OrNull combinator is added).

examples Example 1

By default, the NULL value is ignored.

Example 2

The NULL value is ignored.

Example 3

The NULL value is accepted.

Example 4

Stabilized result using the sub-query with ORDER BY.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4