Hi all,
I have a database with all the transactions of a set of customers. One important parameter for us is to understand each client's interval between two consecutive visits. In out database, each row is one visit as in the example below:
| Client | Visit |
| 1 | 5-Jan |
| 1 | 10-Jan |
| 1 | 20-Jan |
| 2 | 10-Jan |
| 2 | 30-Jan |
- For client 1, the interval between his 1st and 2nd visits were 5 days and between his 2nd and 3rd visits 10 days.
- For client 2, with only two visits, the interval was 20 days
Given that the number of visits can go up to hundreds, does anybody know how could I have another column calculating the number of days since the last visit?
Thank you in advance!
Best,
Vinicius