title: SQl - How do I compare the data from one row to the next?
body: <p>My data has a single ticket record with a Slot field to identify how long the ticket will take.</p>
  <p>I don't know how to have the empty date fields populate with the data above based on how many 30 min slots there in the ticket.</p>
  <p>I want to replicate the SCHED_START AND SCHED_END dates from the ticket row to the other DATEDATE rows.</p>
  <p><img src="https://i.stack.imgur.com/iEjDw.png" alt="Sample data snapshot" /></p>
  <p>Here's my query that produces this data:</p>
  <blockquote>
  <pre><code>SELECT   DATEDATE
  </code></pre>
  </blockquote>
  <pre><code>        ,TICKET_ID
          ,TECH
          ,TICK_TYPE
          ,SCHED_START
          ,SCHED_END
          ,PREV_DATE
          ,SLOTS
          ,SLOT_MINUTES
  FROM DATES_TICKETS
  ORDER BY DATEDATE, TECH
  </code></pre>