title: How select unique values by a field and print all other fields?
body: <p>I need to get the unique rows from a table with timestamp field which is not unique.</p>
  
  <p>I tried to run with distinct and removing timestamp field. It gives perfect result but I miss the timestamp. Timestamp is necessary for me.</p>
  
  <p>This gives right result but I miss tstamp field.</p>
  
  <pre><code>SELECT distinct      person_id, status, type, strowner
  FROM            tbl_wa_requests_h
  WHERE        (person_id = 1128)
  </code></pre>
  
  <p>This has tstamp field but then result is not what I need.</p>
  
  <pre><code>SELECT       person_id, status, type, strowner, db_tstamp
  FROM            tbl_wa_requests_h
  WHERE        (person_id = 1128)
  </code></pre>
  
  <p>Expected Result</p>
  
  <pre><code>personid - status - type - email - tstamp
  1128 -  0 - t1 -    wandam@gmail.com -  2019-08-18 11:37:15.6893649
  1128 -  1 - t2 -    stever@gmail.com -  2019-08-18 11:41:04.8658361
  </code></pre>
  
  <p>Actual Result</p>
  
  <pre><code>personid - status - type - email - tstamp
  1128 -  0 - t1 -    wandam@gmail.com -  2019-08-18 11:37:15.6883648
  1128 -  0 - t1 -    wandam@gmail.com -  2019-08-18 11:37:15.6883648
  1128 -  0 - t1 -    wandam@gmail.com -  2019-08-18 11:37:15.6883648
  1128 -  0 - t1 -    wandam@gmail.com -  2019-08-18 11:37:15.6893649
  1128 -  0 - t1 -    wandam@gmail.com -  2019-08-18 11:37:15.6893649
  1128 -  1 - t2 -    stever@gmail.com -  2019-08-18 11:41:04.8658361
  1128 -  1 - t2 -    stever@gmail.com -  2019-08-18 11:41:04.9328798
  1128 -  1 - t2 -    stever@gmail.com -  2019-08-18 11:41:05.0309459
  1128 -  1 - t2 -    stever@gmail.com -  2019-08-18 11:41:04.9278764
  1128 -  1 - t2 -    stever@gmail.com -  2019-08-18 11:41:04.9278764
  </code></pre>