Hive query to find out the time gap between two value of same column.

I have a data set having columns like: u_id, condition and timestamp.
Data set is sorted as per u_id and timestamp. I have to find out the time gap in between condition S1 to S2.

For a particular ID, i can have multiple transitions between S1 to S2 and condition will always starts with S1 and ends with S2.

Sign In or Register to comment.