Skip to content

functions_aggregate_approx.yaml

This document file is generated for functions_aggregate_approx.yaml

Aggregate Functions

approx_count_distinct

Implementations:
approx_count_distinct(x): -> return_type
0. approx_count_distinct(any): -> i64

Calculates the approximate number of rows that contain distinct values of the expression argument using HyperLogLog. This function provides an alternative to the COUNT (DISTINCT expression) function, which returns the exact number of rows that contain distinct values of an expression. APPROX_COUNT_DISTINCT processes large amounts of data significantly faster than COUNT, with negligible deviation from the exact result.