APPROX_TOP_K

Returns the top-k most frequent values and their approximate counts.

Analyze Syntax

func.approx_top_k(get_column(table, 'city'), 3)

Analyze Examples

func.approx_top_k(get_column(table, 'city'), 3)

┌──────────────────────────────┐
 [{"item":"NYC","count":150}] 
└──────────────────────────────┘

SQL Syntax

APPROX_TOP_K(<city>, 3)

SQL Examples

SELECT APPROX_TOP_K(city, 3) FROM customers;

┌───────────────────────────────────┐
 [{"item":"New York","count":150}] 
└───────────────────────────────────┘