Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Query to return the difference of dates between records - response (1) by VBurmist

$
0
0

Hi,
 
you can use
MAX(status_date) OVER (PARTITION BY policy_no ORDER BY status_date ROWS BETWEEN PRECEDING 1 and PRECEDING 1)  
or something similar to get the "previous" date for the dates you mention.
 
Regards,
Vlad.


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>