Files
doris/docs/documentation/en/sql-reference/sql-functions/aggregate-functions/ndv_EN.md
xy720 7a0c7f45b2 Add English documents for Doris (#1719)
The english documents is translated by machine. So It may has some mistake.
We will fix them later
2019-08-29 13:47:15 +08:00

482 B

'35; NDV Description '35;'35;' 35; Syntax

'NDV (expr)'

Returns an approximate aggregation function similar to the result of COUNT (DISTINCT col).

It combines COUNT and DISTINCT faster and uses fixed-size memory, so less memory can be used for columns with high cardinality.

'35;'35; example

MySQL > select ndv(query_id) from log_statis group by datetime;
+-----------------+
| ndv(`query_id`) |
+-----------------+
| 17721           |
+-----------------+

##keyword NDV