title: How to SELECT the MAX Time Difference Between Any 2 Consecutive Rows Per Value?
body: <p>Just had a user <a href="https://stackoverflow.com/questions/58309669/how-to-get-the-max-time-difference-between-any-2-consecutive-rows-per-value">answer this correctly for TSQL</a>, but wondering how best to achieve this now in SQL Developer/PLSQL seeing as there is no DATEDIFF function.</p>
  
  <p>Table I want to query on has some 'CODE' values, which can naturally have multiple primary key records ('OccsID') in a table 'Occs'. There is also a datetime column called 'CreateDT' for each OccsID.</p>
  
  <p>Just want to find the maximum possible time variance between any 2 consecutive rows in 'Occs', per 'CODE'. </p>