title: Selecting latest timestsamp based on column
body: <p>I have a query:</p>
  
  <pre><code>SELECT ti.*
  FROM New_OTPMS.TBL_TESTER_ONLINE_INFO ti
  INNER JOIN TBL_TESTER_LIST tl
  ON ti.tester_name = tl.tester_name
  WHERE ti.board_name = 'DC30'
  AND tl.tester_type = 'UFLEX'
  ORDER BY ti.tester_name
  </code></pre>
  
  <p>In the table table that I'm selecting from, <code>TBL_TESTER_ONLINE_INFO</code>, there is a column named <code>last_checked</code> where it has keeps the timestamp of the records. The timestamps are all different.</p>
  
  <p>However in this table there is one column which can contain duplicated records which is <code>tester_name</code>. So I can have <code>test1</code> and <code>test1</code> but both with different timestamps.</p>
  
  <p>Example:</p>
  
  <pre><code>tester_name       last_checked
     test1          2015-07-30 03:56:51
     test1          2015-07-31 05:56:38
     test2          2015-07-31 10:10:36
     test2          2015-07-31 02:27:12
  </code></pre>
  
  <p>I want to get the latest time stamp only. So an example of the output I want to get would be</p>
  
  <pre><code>tester_name       last_checked
     test1          2015-07-31 05:56:38
     test2          2015-07-31 02:27:12
  </code></pre>
  
  <p>I'm not sure how to modify the query I'm using, I've tried to <code>group by last_checked</code> but obviously that's the wrong way. I've seen other answers using inner joins </p>
  
  <pre><code>SELECT ti.*
  FROM New_OTPMS.TBL_TESTER_ONLINE_INFO ti
  INNER join
  (
      SELECT id, max(last_checked) as mts
      FROM New_OTPMS.TBL_TESTER_ONLINE_INFO
      GROUP BY id
  )  s2 on s2.id = ti.id and ti.last_checked = s2.mts
  INNER JOIN TBL_TESTER_LIST tl
  ON ti.tester_name = tl.tester_name
  WHERE ti.board_name = 'DC30'
  AND tl.tester_type = 'UFLEX'
  ORDER BY ti.tester_name
  </code></pre>
  
  <p>but it returns the same rows (with duplicates) as the unmodified query.</p>
  
  <p>Any help?</p>
  
  <p>P.S. There are more columns to the table of course but the illustration is just to show a simple example in this question.</p>
  
  <p>EDIT: TBL_TESTER_ONLINE_CONFIG Sample data</p>
  
  <pre><code> id      tester_name        frame       board_name  config    part_no, serial_no, license_count, legal_enabling   last_checked             log_name
  '105318' 'UFLEX-02' 'LICENSE_ENABLERS' 'DC30'     '1'       ' '      ' '        'N/A'          '1,0'          '2015-07-30 00:35:15' 'IGXLEventLog.7.30.2015.00.34.21.000.log'
  '105048' 'UFLEX-02', 'LICENSE_ENABLERS' 'DC30'    '1'       ' '      ' '        'N/A'          '1,0'          '2015-07-29 15:31:42' 'IGXLEventLog.7.29.2015.15.30.46.344.log'
  '109709' 'UFLEX-05', 'LICENSE_ENABLERS' 'DC30'    '1'       ' '      ' '        'N/A'          '1,0'          '2015-07-30 05:10:16' 'IGXLEventLog.7.30.2015.05.09.45.515.log'
  '108802' 'UFLEX-05', 'LICENSE_ENABLERS' 'DC30'    '1'       ' '      ' '        'N/A'          '1,0'          '2015-07-30 01:34:08' 'IGXLEventLog.7.30.2015.01.33.36.891.log'
  </code></pre>
  
  <p>Ignore everythign except <code>tester_name</code> column and <code>last_checked</code> column. Just want to ensure I only get one tester name. I'm doing this for a web application (in PHP) to get specific testers, if that info helps.</p>