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(number)
FROM eth.recent_blocks
-- 143

Last updated