ARRAY_TOP_N (Lakehouse v2)
Returns the top N elements from an array.
Analyze Syntax
Section titled “Analyze Syntax”func.array_top_n([3,1,4,1,5], 3)Analyze Examples
Section titled “Analyze Examples”func.array_top_n([3, 1, 4, 1, 5], 3)
┌─────────┐│ [5,4,3] │└─────────┘SQL Syntax
Section titled “SQL Syntax”ARRAY_TOP_N([3,1,4,1,5], 3)SQL Examples
Section titled “SQL Examples”SELECT ARRAY_TOP_N([3, 1, 4, 1, 5], 3);
┌─────────┐│ [5,4,3] │└─────────┘