Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 596 Bytes

approx_count_distinct.md

File metadata and controls

22 lines (15 loc) · 596 Bytes
description
Returns the approximate number of unique, non-null values in a column.

APPROX_COUNT_DISTINCT

Syntax

APPROX_COUNT_DISTINCT(column_name any primitive) → BIGINT

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

Examples

{% code title="APPROX_COUNT_DISTINCT example" %}

SELECT APPROX_COUNT_DISTINCT(number)
FROM eth.recent_blocks
-- 143

{% endcode %}