Forum Discussion
manideep547
6 years agoHelper III
Customer next step
Hi all, My data look like below CustomerId DATE START END JOURNEY_STATE 1111 ...
manideep547
6 years agoHelper III
amitchandak
I think we should not use the journey, [START]>EARLIER(journey[end]) see the above fig.
co column, define the next step of the customer.
In the above data, the customer started his journey at arrival 2:10:07 Pm and next he went to Enquiry 10:55:16 PM in that column co the value should be Enquiry I am not getting which constraint we have to add to get that values.
manideep547
6 years agoHelper III
amitchandak Here customer Id is repeating so we can't us MAX &MIN function to get next values in co column
In SQL we can achieve this by using a lag function it gives the next values of the same customer.
If we use MAX then, we have to compare only two rows of the customer.