mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Update group-by.md
removed obsolete info about groupby
This commit is contained in:
parent
20937c71a9
commit
badb7b1ba5
@ -88,8 +88,6 @@ SELECT
|
|||||||
FROM hits
|
FROM hits
|
||||||
```
|
```
|
||||||
|
|
||||||
However, in contrast to standard SQL, if the table doesn’t have any rows (either there aren’t any at all, or there aren’t any after using WHERE to filter), an empty result is returned, and not the result from one of the rows containing the initial values of aggregate functions.
|
|
||||||
|
|
||||||
As opposed to MySQL (and conforming to standard SQL), you can’t get some value of some column that is not in a key or aggregate function (except constant expressions). To work around this, you can use the ‘any’ aggregate function (get the first encountered value) or ‘min/max’.
|
As opposed to MySQL (and conforming to standard SQL), you can’t get some value of some column that is not in a key or aggregate function (except constant expressions). To work around this, you can use the ‘any’ aggregate function (get the first encountered value) or ‘min/max’.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -105,10 +103,6 @@ GROUP BY domain
|
|||||||
|
|
||||||
For every different key value encountered, `GROUP BY` calculates a set of aggregate function values.
|
For every different key value encountered, `GROUP BY` calculates a set of aggregate function values.
|
||||||
|
|
||||||
`GROUP BY` is not supported for array columns.
|
|
||||||
|
|
||||||
A constant can’t be specified as arguments for aggregate functions. Example: `sum(1)`. Instead of this, you can get rid of the constant. Example: `count()`.
|
|
||||||
|
|
||||||
## Implementation Details {#implementation-details}
|
## Implementation Details {#implementation-details}
|
||||||
|
|
||||||
Aggregation is one of the most important features of a column-oriented DBMS, and thus it’s implementation is one of the most heavily optimized parts of ClickHouse. By default, aggregation is done in memory using a hash-table. It has 40+ specializations that are chosen automatically depending on “grouping key” data types.
|
Aggregation is one of the most important features of a column-oriented DBMS, and thus it’s implementation is one of the most heavily optimized parts of ClickHouse. By default, aggregation is done in memory using a hash-table. It has 40+ specializations that are chosen automatically depending on “grouping key” data types.
|
||||||
|
Loading…
Reference in New Issue
Block a user