Apache Tajo - last_value(value)



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

Query

sampledb> select last_value(mark) over (order by name) as lastvalue from mytable;   

Result

The above query will generate the following result.

lastvalue 
------------------------------- 
95 
95 
95 
95 
95 
95 
95 
95 
95 
95 

The last value 95 in the Mark column is replaced in all rows using the last_value() function.

apache_tajo_aggregate_and_window_functions.htm
Advertisements