title: Get the latest record of datetime field by date value
body: <p>I have a table like</p>
  <pre><code>id    |    start                |    Value   | Value2    | Value3
  1     |    2019-01-01 22:15:02  |    A       |   P       |   C
  2     |    2019-01-01 22:35:23  |    B       |   O       |   G
  4     |    2019-01-02 22:35:36  |    C       |   D       |   H
  5     |    2019-01-02 22:37:15  |    D       |   C       |   F
  7     |    2019-01-03 17:26:36  |    C       |   K       |   M
  10    |    2019-01-03 12:05:15  |    D       |   J       |   L
  </code></pre>
  <p>I have a lot of records for the same <strong>day</strong>, but different <strong>time</strong>.<br />
  I need to select the latest of each <code>day</code> from a <code>DateTime</code> field.<br />
  It should return the records of IDs:</p>
  <pre><code>id: 2 for Jan 1   
  id: 5 for Jan 2nd  
  id: 7 for January 3rd
  </code></pre>
  <p>Tried without success:</p>
  <pre><code>SELECT value, value2, value3
  FROM myTable AS mt
  INNER JOIN (
     SELECT id, MAX(start)
     FROM myTable
     GROUP BY start
  ) AS b ON mt.id = b.id
  </code></pre>
  <p>I get no errors, but the data are mixed up. It shows the latest dateTime value, but the rest of the fields (Value, value2, value3) are wrong. They don't match with the latest row.</p>