ClickHouse/docs/es/query_language/agg_functions/index.md
Ivan Blinkov f315e5079b
More complete "es" translation (#9791)
* replace exit with assert in test_single_page

* improve save_raw_single_page docs option

* More grammar fixes

* "Built from" link in new tab

* fix mistype

* Example of include in docs

* add anchor to meeting form

* Draft of translation helper

* WIP on translation helper

* Replace some fa docs content with machine translation

* add normalize-en-markdown.sh

* normalize some en markdown

* normalize some en markdown

* admonition support

* normalize

* normalize

* normalize

* support wide tables

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* lightly edited machine translation of introdpection.md

* lightly edited machhine translation of lazy.md

* WIP on translation utils

* Normalize ru docs

* Normalize other languages

* some fixes

* WIP on normalize/translate tools

* add requirements.txt

* [experimental] add es docs language as machine translated draft

* remove duplicate script

* Back to wider tab-stop (narrow renders not so well)

* Links to nowhere check at least for English

* use f string

* More complete es translation
2020-03-21 12:17:06 +03:00

55 lines
1.6 KiB
Markdown

# Funciones agregadas {#aggregate-functions}
Las funciones agregadas funcionan en el [normal](http://www.sql-tutorial.com/sql-aggregate-functions-sql-tutorial) forma esperada por los expertos en bases de datos.
ClickHouse también es compatible:
- [Funciones agregadas paramétricas](parametric_functions.md#aggregate_functions_parametric) que aceptan otros parámetros además de las columnas.
- [Combinadores](combinators.md#aggregate_functions_combinators), que cambian el comportamiento de las funciones agregadas.
## Procesamiento NULL {#null-processing}
Durante la agregación, todos `NULL`s se omiten.
**Ejemplos:**
Considere esta tabla:
``` text
┌─x─┬────y─┐
│ 1 │ 2 │
│ 2 │ ᴺᵁᴸᴸ │
│ 3 │ 2 │
│ 3 │ 3 │
│ 3 │ ᴺᵁᴸᴸ │
└───┴──────┘
```
Supongamos que necesita sumar los valores en el `y` columna:
``` sql
SELECT sum(y) FROM t_null_big
```
Método de codificación de datos:
│ 7 │
¿Qué puedes encontrar en Neodigit
El `sum` función interpreta `NULL` como `0`. En particular, esto significa que si la función recibe la entrada de una selección donde todos los valores son `NULL`, entonces el resultado será `0`Nuestra `NULL`.
Ahora puedes usar el `groupArray` función para crear una matriz a partir de la `y` columna:
``` sql
SELECT groupArray(y) FROM t_null_big
```
``` text
┌─groupArray(y)─┐
│ [2,2,3] │
└───────────────┘
```
`groupArray` no incluye `NULL` en la matriz resultante.
[Artículo Original](https://clickhouse.tech/docs/es/query_language/agg_functions/) <!--hide-->