Apache Presto - element_at(array,index)


Query 1

presto:default> select array_intersect(array[1,2,3],array[2,4]) as intersection;

Result

 intersection 
-------------- 
     [2] 

Query 2

presto:default> select element_at(array[1,2,3],2) as element_position; 

Result

element_position 
------------------ 
       2
apache_presto_sql_functions.htm
Advertisements