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 branch 'master' into keeper-disk-move-fix
- Loading branch information
Showing
75 changed files
with
937 additions
and
1,034 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
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
50 changes: 50 additions & 0 deletions
50
docs/en/sql-reference/aggregate-functions/reference/grouparrayintersect.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,50 @@ | ||
--- | ||
slug: /en/sql-reference/aggregate-functions/reference/grouparrayintersect | ||
sidebar_position: 115 | ||
--- | ||
|
||
# groupArrayIntersect | ||
|
||
Return an intersection of given arrays (Return all items of arrays, that are in all given arrays). | ||
|
||
**Syntax** | ||
|
||
``` sql | ||
groupArrayIntersect(x) | ||
``` | ||
|
||
**Arguments** | ||
|
||
- `x` — Argument (column name or expression). | ||
|
||
**Returned values** | ||
|
||
- Array that contains elements that are in all arrays. | ||
|
||
Type: [Array](../../data-types/array.md). | ||
|
||
**Examples** | ||
|
||
Consider table `numbers`: | ||
|
||
``` text | ||
┌─a──────────────┐ | ||
│ [1,2,4] │ | ||
│ [1,5,2,8,-1,0] │ | ||
│ [1,5,7,5,8,2] │ | ||
└────────────────┘ | ||
``` | ||
|
||
Query with column name as argument: | ||
|
||
``` sql | ||
SELECT groupArrayIntersect(a) as intersection FROM numbers; | ||
``` | ||
|
||
Result: | ||
|
||
```text | ||
┌─intersection──────┐ | ||
│ [1, 2] │ | ||
└───────────────────┘ | ||
``` |
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
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
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
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
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
Oops, something went wrong.