title: Update top N values using PostgreSQL
body: <p>I want to update the top 10 values of a column in table. I have three columns; <code>id</code>, <code>account</code> and <code>accountrank</code>. To get the top 10 values I can use the following:</p>
  
  <pre><code>SELECT  * FROM accountrecords    
  ORDER BY account DESC
  LIMIT 10;
  </code></pre>
  
  <p>What I would like to do is to set the value in <code>accountrank</code> to be a series of <code>1 - 10</code>, based on the magnitude of <code>account</code>. Is this possible to do in PostgreSQL?</p>