-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add set operations.
- Loading branch information
Showing
32 changed files
with
7,266 additions
and
5,773 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
layout: default | ||
title: Set Operators - Reference Manual - csvq | ||
category: reference | ||
--- | ||
|
||
# Set Operators | ||
|
||
| name | description | | ||
| :- | :- | | ||
| [UNION](#union) | Return the union of result sets | | ||
| [EXCEPT](#except) | Return the relative complement of result sets | | ||
| [INTERSECT](#intersect) | Return the intersection of result sets | | ||
|
||
A set operation combines result sets retrieved by select queries into a single result set. | ||
If the ALL keyword is specified, the result is distinguished. | ||
|
||
## UNION | ||
{: #union} | ||
|
||
```sql | ||
select_query UNION [ALL] select_query | ||
``` | ||
|
||
_select_query_ | ||
: [select_entity]({{ '/reference/select-query.html' | relative_url }}) | ||
|
||
Return all records of both result sets. | ||
|
||
## EXCEPT | ||
{: #except} | ||
|
||
```sql | ||
select_query EXCEPT [ALL] select_query | ||
``` | ||
|
||
_select_query_ | ||
: [select_entity]({{ '/reference/select-query.html' | relative_url }}) | ||
|
||
Return records of a first result set that do not appear in a second result set. | ||
|
||
## INTERSECT | ||
{: #intersect} | ||
|
||
```sql | ||
select_query INTERSECT [ALL] select_query | ||
``` | ||
|
||
_select_query_ | ||
: [select_entity]({{ '/reference/select-query.html' | relative_url }}) | ||
|
||
Return only records that appear in both result sets. |
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.