Apache Tajo - first_value (value)



Let us now check the first_value(value) function with the following query.

Query

sampledb> select first_value(mark) over (order by name) as firstvalue from mytable; 

Result

The above query will generate the following result.

firstvalue 
------------------------------- 
90 
90 
90 
90 
90 
90 
90 
90 
90 
90 

The first value 90 in the Mark column is replaced in all rows using the first_value() function.

apache_tajo_aggregate_and_window_functions.htm
Advertisements