title: Select top 20 scores from a table
body: <p>I have a table like the following:</p>
  
  <pre><code>votes
  -----
  page_id - long
  vote_type - varchar which is either 'UP' or 'DOWN'
  voter_id - varchar
  </code></pre>
  
  <p>What I would like to do is get the top 20 page ids with the highest number of votes (UP votes minus DOWN votes).</p>
  
  <p>Could someone help me out with the SQL query for this functionality? I basically want to display a 'high scores' list of most voted up pages.</p>