Hive last_value()


#1

for this query,

select order_item_order_id,order_item_subtotal,
FIRST_VALUE(order_item_subtotal) over(partition by order_item_order_id order by order_item_subtotal ),
last_value(order_item_subtotal) over(partition by order_item_order_id order by order_item_subtotal)
from order_items
limit 10;

I’m getting the result as

for this query I’m getting the first_value() correctly ,but getting different value for last_value()
where am i going wrong ?..