title: Find the max record in two tables
body: <p>I have two tables:</p>
  
  <pre><code> question(qid int,title varchar(100))
  
   answer(aid int,qid int,vote int,content varchar(4096))
  </code></pre>
  
  <p>Qid and aid are primary key.</p>
  
  <p>Each question has some answers, and each answer has an vote number. </p>
  
  <p>Now taking some question qid, how to find the max(vote) answer for each question if the question has some answers?</p>
  
  <p>Ex:</p>
  
  <pre><code>mysql&gt; select * from question;
  +-----+-------+
  | qid | title |
  +-----+-------+
  |   1 | abc   |
  |   2 | efg   |
  |   3 | hij   |
  |   4 | mn    |
  +-----+-------+
  
  mysql&gt; select * from answer;
  +-----+------+------+---------+
  | aid | qid  | vote | content |
  +-----+------+------+---------+
  |  77 |    3 |   45 | mysql2  |
  | 110 |    1 |   95 | good    |
  | 122 |    1 |   78 | bad     |
  | 123 |    1 |   34 | bad2    |
  | 223 |    2 |   56 | book1   |
  | 224 |    2 |   82 | book2   |
  +-----+------+------+---------+
  </code></pre>
  
  <p>Now, giving qid(1,2), I want to find the result following:</p>
  
  <pre><code>+-----+------+------+---------+
  | aid | qid  | vote | content |
  +-----+------+------+---------+
  | 110 |    1 |   95 | good    |
  | 224 |    2 |   82 | book2   |
  +-----+------+------+---------+
  </code></pre>
  
  <p>I want the full answer record(with all columns), not only the max(vote) column.</p>
  
  <p><strong>I just want to show the best answer(the max vote answer) for each question.</strong></p>
  
  <p>What's the best SQL in MySQL ?</p>
  
  <p>Thank you!</p>
  
  <hr>
  
  <p><strong>Update 2013/1/7:</strong></p>
  
  <p>I want to show the only one best <code>answer</code>(the max vote answer) if exists. The answer from @Brian Hoover works fine ONLY under MySQL.</p>
  
  <p>Maybe there is not a SQL working fine under all databases.</p>