title: mysql - join table row based on id with the highest column value in the table - multiple joins and conditions
body: <p><strong>I have searched on SO prior to asking and have tried things I found - I have more involved due to multiple joins and conditions and cannot get the correct results.</strong></p>
  <p>SQL Fiddle <a href="http://sqlfiddle.com/#!9/a5fc13/1" rel="nofollow noreferrer">here</a> with basic data entered.</p>
  <p>The query below does not give the results I want, but gives an idea of what I am looking to achieve. I want to return 1 result per computer_id where time.capture_timestamp is between a specific start/end value and is the highest value in the table for that computer_id including that row's other column values. I have tried a few different things I found here on SO involving MAX() and subqueries, but can't seem to get what I am looking for.</p>
  <pre><code>SELECT
    computers.computer_name,
    users.username,
    time.title,
    time.capture_timestamp
  FROM computers
  INNER JOIN time
    ON time.computer_id = computers.computer_id AND time.capture_timestamp &gt;= 0 AND time.capture_timestamp &lt;= 9999999999
  INNER JOIN users
    ON users.user_id = time.user_id
  GROUP BY computers.computer_id
  ORDER BY time.capture_timestamp DESC
  </code></pre>
  <p>The fiddle as is will return :</p>
  <pre><code>computer_name   username    title           capture_timestamp
  computer1       user1       some title      1595524341
  computer2       user3       some title3     1595524331
  </code></pre>
  <p>while the result I would like is actually :</p>
  <pre><code>computer_name   username    title           capture_timestamp
  computer1       user2       some title2     1595524351
  computer2       user3       some title3     1595524331
  </code></pre>
  <p>... based on the example values in the fiddle. Yes, the start/end time values include 'everything' in this example, but in use there would actually be a timestamp range provided.</p>