forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#63368 from Blargian/document_anyXYZ
[Docs] add `anyXYZ` functions
- Loading branch information
Showing
5 changed files
with
156 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
docs/en/sql-reference/aggregate-functions/reference/any_respect_nulls.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
slug: /en/sql-reference/aggregate-functions/reference/any_respect_nulls | ||
sidebar_position: 103 | ||
--- | ||
|
||
# any_respect_nulls | ||
|
||
Selects the first encountered value of a column, irregardless of whether it is a `NULL` value or not. | ||
|
||
Alias: `any_value_respect_nulls`, `first_value_repect_nulls`. | ||
|
||
**Syntax** | ||
|
||
```sql | ||
any_respect_nulls(column) | ||
``` | ||
|
||
**Parameters** | ||
- `column`: The column name. | ||
|
||
**Returned value** | ||
|
||
- The last value encountered, irregardless of whether it is a `NULL` value or not. | ||
|
||
**Example** | ||
|
||
Query: | ||
|
||
```sql | ||
CREATE TABLE any_nulls (city Nullable(String)) ENGINE=Log; | ||
|
||
INSERT INTO any_nulls (city) VALUES (NULL), ('Amsterdam'), ('New York'), ('Tokyo'), ('Valencia'), (NULL); | ||
|
||
SELECT any(city), any_respect_nulls(city) FROM any_nulls; | ||
``` | ||
|
||
```response | ||
┌─any(city)─┬─any_respect_nulls(city)─┐ | ||
│ Amsterdam │ ᴺᵁᴸᴸ │ | ||
└───────────┴─────────────────────────┘ | ||
``` | ||
|
||
**See Also** | ||
- [any](../reference/any.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
docs/en/sql-reference/aggregate-functions/reference/anylast_respect_nulls.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
slug: /en/sql-reference/aggregate-functions/reference/anylast_respect_nulls | ||
sidebar_position: 104 | ||
--- | ||
|
||
# anyLast_respect_nulls | ||
|
||
Selects the last value encountered, irregardless of whether it is `NULL` or not. | ||
|
||
**Syntax** | ||
|
||
```sql | ||
anyLast_respect_nulls(column) | ||
``` | ||
|
||
**Parameters** | ||
- `column`: The column name. | ||
|
||
**Returned value** | ||
|
||
- The last value encountered, irregardless of whether it is `NULL` or not. | ||
|
||
**Example** | ||
|
||
Query: | ||
|
||
```sql | ||
CREATE TABLE any_last_nulls (city Nullable(String)) ENGINE=Log; | ||
|
||
INSERT INTO any_last_nulls (city) VALUES ('Amsterdam'),(NULL),('New York'),('Tokyo'),('Valencia'),(NULL); | ||
|
||
SELECT anyLast(city), anyLast_respect_nulls(city) FROM any_last_nulls; | ||
``` | ||
|
||
```response | ||
┌─anyLast(city)─┬─anyLast_respect_nulls(city)─┐ | ||
│ Valencia │ ᴺᵁᴸᴸ │ | ||
└───────────────┴─────────────────────────────┘ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters