I have small issue in hive logic. I need to find longest customer in my data set.My dataset contains values as below
customer time
cust 1 8:01
cust 1 8:02
cust 2 8:02
cust 2 8:03
cust 2 8:04
cust 2 8:05
cust 3 8:02
cust 3 8:03
Here in my example, cust 2 has the longest customer based on the total time he/she has engaged. cust 1 total count is 2, cust 2 count is 4 and cust 3 count is 2. My issue between 8:01 to 8:05, the longest duration belongs to cust 2 . Hence cust 2 should come as result. How can i implement this logic.
Please help
Note: need solution without limit operation