title: Incorrect MySQL query string
body: <p>I am trying to get a certain result set with MySQL and I am not sure how to pull it off.  I want <em>everything</em> from the <code>call_logs</code> table for the latest entry by <code>timestamp</code> of every <code>calls_id</code>. Here's what I've tried so far:</p>
  
  <pre><code>SELECT distinct calls_id FROM call_logs order by timestamp
  </code></pre>
  
  <p>That gives me only the <code>calls_id</code>, though. When I put the following:</p>
  
  <pre><code>SELECT distinct calls_id, created, modified, viewed FROM call_logs order by timestamp
  </code></pre>
  
  <p>It returns all of the entries instead of only the last one of each <code>calls_id</code>.</p>