I have a transactional log with one row representing one order. Customers can have multiple orders, or just a single one. I want to figure out the time difference between customers making their first order and 2nd order, ignoring the 3rd/4th/5th etc orders. Some customers have a single order so wouldn't apply, some have like 25 spread over 3 years. I'm really struggling to figure this out, especially as Alteryx seems to be sorting my dates weirdly, despite me ensuring the order date column is recognised as datetime format.
Current data:
| Customer ID | Order Date |
| 10000039 | 30/05/2023 |
| 10000039 | 01/06/2023 |
| 10000039 | 08/06/2023 |
| 10000085 | 20/11/2023 |
| 10000085 | 02/04/2023 |
The goal:
| Customer ID | Days between 1st and 2nd transaction |
| 10000039 | 9 |
| 10000085 | 232 |