ylliX - Online Advertising Network
How to build GenAI mock server?

Multiple min and max


I have a data set that shows when customer visit different stores. I am trying to find time between when they visit one store and when they go to the next. I have a field for arrival and departure at each location. It is possible and even likely that guest will visit multiple sites in a day and even revisit a site. It is the revisit that is causing me issue. My first attempt was just to take the min and max of their timestamps for each location and compare those but has errors like in this example:

location1 at 11am and leaves at 1pm 
then arrives at location2 at 2pm and leaves at 3pm 
then later arrives at location1 again at 5pm and leaves at 6p.

with the current approach this shows location1 min is 11am max is 6pm and location2 min is 2pm and max is 3pm. based on the current logic this guest was in two palces as once. this is not good. I would like to be able to show that is was 1 hour between location1 and 2 and then 2 hours between location 2 and 1.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *