How to get rows which has data set matching
I have a table which describe place where product is selling as below:
Rank in SQL special case
Write Hive SQL query to get the output from the input shown below.
I am trying to add rank column which is ordered by event_ts. But if there is same item_id for any consecutive rows, they should get the same rank. Partition by item_id will not work here as it will rank each partition window starting from 1. But I want the rank to monotonically increase.