OracleAggregate FunctionsAPPROX_COUNT_DISTINCT
GROUPING

APPROX_COUNT_DISTINCTAggregate Functions

ROW_NUMBER

Returns an approximate count of distinct values quickly.

Syntax

APPROX_COUNT_DISTINCT(expr)

Example

Enter values below to update the example in real time.

customer_id
approx_customers
orders
SELECT APPROX_COUNT_DISTINCT(customer_id) AS approx_customers
FROM orders;