0 Replies Latest reply: Aug 19, 2016 2:21 AM by Daniel Balchasan RSS

    Check time difference since last action



      I've been searching for an answer to this one for a while, but I couldn't figure it out based on existing posts, so I decided to ask a question instead.


      I have a scenario where I have a table with events. These events have a DATE, a PERSON_ID and an EVENT_TYPE.

      I would like to check, using set analysis, what is the avg time between 2 different actions.

      Meaning, I'd like to know how long it took from since a person had an event of type 'BOOKING' to an event of type 'SALE'.

      Also, it is possible the person never had the previous action.


      I tried using above() with combination with aggr() to try and check the actions done previously by the person, but I couldn't ge it to work.


      Could someone please give me an example for this?