APPROX_TOP_K (Lakehouse v2)
Returns the top-k most frequent values and their approximate counts.
Analyze Syntax
Section titled “Analyze Syntax”func.approx_top_k(get_column(table, 'city'), 3)Analyze Examples
Section titled “Analyze Examples”func.approx_top_k(get_column(table, 'city'), 3)
┌──────────────────────────────┐│ [{"item":"NYC","count":150}] │└──────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”APPROX_TOP_K(<city>, 3)SQL Examples
Section titled “SQL Examples”SELECT APPROX_TOP_K(city, 3) FROM customers;
┌───────────────────────────────────┐│ [{"item":"New York","count":150}] │└───────────────────────────────────┘