title: SQL query syntax to retrieve data from 2 tables
body: <p>I have 2 tables in Mysql: <code>authors</code> and <code>articles</code>.</p>
  
  <p>I have authors with several articles for each of them.</p>
  
  <p>I need sql query  with the result of this query:
  retrieve 3 authors ordered by age with all articles which belong each of them.</p>
  
  <p>In my example it will be</p>
  
  <pre><code>ID  FIRSTNAME   LASTNAME    AGE AUTHORID    TITLE       PRICE
  6   Salido      Gomes       90  6           All 3       1
  6   Salido      Gomes       90  6           All 3       33
  6   Salido      Gomes       90  6           All 3       3
  5   Vitora      Mantora     45  5           Total 3     99
  5   Vitora      Mantora     45  5           Total 3     33
  5   Vitora      Mantora     45  5           Total 3     12
  3   Joe         Smith       43  3           Python      5
  3   Joe         Smith       43  3           Python 2    22
  3   Joe         Smith       43  3           Python 3    44
  3   Joe         Smith       43  3           Python 4    12
  3   Joe         Smith       43  3           Python 5    67
  </code></pre>
  
  <p><a href="http://sqlfiddle.com/#!2/718c4/1" rel="nofollow">http://sqlfiddle.com/#!2/718c4/1</a></p>
  
  <p>I use</p>
  
  <pre><code>select * from authors join articles on authors.id = articles.authorId
  join (select authors.id from authors order by age DESC limit 3) as t
  on t.id = authors.id
  </code></pre>
  
  <p>with wrong result</p>
  
  <pre><code>ID  FIRSTNAME   LASTNAME    AGE AUTHORID    TITLE   PRICE
  6   Salido      Gomes       90  6           All 3   1
  6   Salido      Gomes       90  6           All 3   33
  6   Salido      Gomes       90  6           All 3   3
  </code></pre>