title: oracle sql to take the first record in a group by clause
body: <p>I have a table that has 2 columns. </p>
  
  <p>ID number
  Created_DT date</p>
  
  <p>I can have duplicate values in ID (and often do). I need to get just 1 record per ID and I need the Created_DT so I do:</p>
  
  <pre><code>select ID, Created_DT from table group by ID, Created_DT
  </code></pre>
  
  <p>However, the Created_DT has time in it as well and for the same ID can span over 2 seconds making it unique and returning 2 records instead of 1. This is such a small difference that I don't care about it. I would want to just get the first one if this happens.</p>
  
  <p>Doing any sort of to_char() doesn't work as I would want the actual time. I tried to_char() on the group_by Created_DT only it doesn't run.</p>
  
  <p>Any ideas on how I can accomplish this?</p>