Skip to main content
Version: current [25.x]

Categories: Aggregate

APPROX_COUNT_DISTINCT

Returns the approximate number of unique, non-null values in a column.

Syntax

APPROX_COUNT_DISTINCT(column_name any primitive) → BIGINT

  • column_name: You can specify a column of any primitive data type.

Examples

APPROX_COUNT_DISTINCT example
SELECT APPROX_COUNT_DISTINCT(IncidntNum) FROM Samples."samples.dremio.com"."SF_incidents2016.json"
-- 116696