title: MYSQL Left Join last row of result
body: <p>I am in need of some MYSQL help.</p>
  
  <p>I have a table called Tickets and a table called statusLogs how can I:</p>
  
  <pre><code>select 
    t.*,
    sl.statusId
  from
    ticket LEFT JOIN (
      select * from statusLog where ticket_ticketId = t.ticketId order by statusLogId DESC LIMIT 1
    ) sl
  </code></pre>
  
  <p>Basically, I would like to select the last statusLog for a given ticket number in one statement.</p>