mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Added docs
This commit is contained in:
parent
c91fff60f4
commit
0ad8c6ef78
@ -21,6 +21,8 @@ SELECT [DISTINCT [ON (column1, column2, ...)]] expr_list
|
||||
[WHERE expr]
|
||||
[GROUP BY expr_list] [WITH ROLLUP|WITH CUBE] [WITH TOTALS]
|
||||
[HAVING expr]
|
||||
[WINDOW window_expr_list]
|
||||
[QUALIFY expr]
|
||||
[ORDER BY expr_list] [WITH FILL] [FROM expr] [TO expr] [STEP expr] [INTERPOLATE [(expr_list)]]
|
||||
[LIMIT [offset_value, ]n BY columns]
|
||||
[LIMIT [n, ]m] [WITH TIES]
|
||||
@ -45,6 +47,7 @@ Specifics of each optional clause are covered in separate sections, which are li
|
||||
- [GROUP BY clause](../../../sql-reference/statements/select/group-by.md)
|
||||
- [LIMIT BY clause](../../../sql-reference/statements/select/limit-by.md)
|
||||
- [HAVING clause](../../../sql-reference/statements/select/having.md)
|
||||
- [QUALIFY clause](../../../sql-reference/statements/select/qualify.md)
|
||||
- [LIMIT clause](../../../sql-reference/statements/select/limit.md)
|
||||
- [OFFSET clause](../../../sql-reference/statements/select/offset.md)
|
||||
- [UNION clause](../../../sql-reference/statements/select/union.md)
|
||||
|
14
docs/en/sql-reference/statements/select/qualify.md
Normal file
14
docs/en/sql-reference/statements/select/qualify.md
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
slug: /en/sql-reference/statements/select/qualify
|
||||
sidebar_label: QUALIFY
|
||||
---
|
||||
|
||||
# QUALIFY Clause
|
||||
|
||||
Allows filtering window functions results. It is similar to the [WHERE](../../../sql-reference/statements/select/where.md) clause, but the difference is that `WHERE` is performed before window functions evaluation, while `QUALIFY` is performed after it.
|
||||
|
||||
It is possible to reference window functions results from `SELECT` clause in `QUALIFY` clause by their alias. Alternatively, `QUALIFY` clause can filter on results of additional window functions that are not returned in query results.
|
||||
|
||||
## Limitations
|
||||
|
||||
`QUALIFY` can’t be used if there are no window functions to evaluate. Use `WHERE` instead.
|
Loading…
Reference in New Issue
Block a user