Hi,
I am trying to find the difference between the date values which stored in the same field. I want to find the span of consecutive calendar days. I tried with window functions like difference, lag, rank and ended up with syntax error. Tried using the similar functions in custom sql as well and did not work. Please advise. Thanks !
For example, the date field in the order table have the below values and I have to find the day delta in QS.
Date Find the Day Delta/Date Difference
1/1/2023 - 1 (1/2/2023 - 1/1/2023)
1/2/2023 - 0 (1/2/2023 - 1/2/2023)
1/2/2023 - 0 (1/2/2023 - 1/2/2023)
1/2/2023 - 1 (1/3/2023 - 1/2/2023)
1/3/2023 - 4 (1/7/2023 - 1/3/2023)
1/7/2023 - 5 (1/12/2023 - 1/7/2023)
1/12/2023 - 3 (1/15/2023 - 1/12/2023)
1/15/2023 - 0 (1/15/2023 - 1/15/2023)
1/15/2023 - 0 (1/15/2023 - 1/15/2023)
1/15/2023 - 1 (1/16/2023 - 1/15/2023)
1/16/2023