- Overview
- Data types
- Commands
- Functions
- Overview
- Aggregate
- Conditional expression
- Conversion
- Date and time
- Numeric
- String
- Semi-structured data
- Window
- System
On this page
approx_count_distinct
Estimates the number of distinct non-NULL input values.
Syntax
approx_count_distinct( <expr> )
Returns
Returns int.
Examples
VALUES ('a'), ('b'), ('a'), ('c')
AGGREGATE approx_count_distinct($0);