title: mySQL query, for discrete results limited and ordered by a joined column
body: <p>I have two tables</p>
  
  <pre><code>User
    id
    name
  
  Result
    id
    user_id
    score
    created_at
  </code></pre>
  
  <p>Every hour a cron job runs and puts data in the result table for each user - assigning them a score based on some external variable parameters.</p>
  
  <p>So the Result table contains many records for each user.</p>
  
  <p>I want to retreive a 'top ten' users at any given point. So only one row for each user should be returned, and it should contain their most recent available score, and ideally only 10 rows relating to those ten users with the highest scores. </p>
  
  <p>I currently fetch all results and do the leg work with php which I'm fairly sure would be faster and more efficient if handled by the database. But I don't know where to start.</p>