title: Do do i get the balance rank of a user efficiently
body: <p>I am new to SQL so i would like to ask this. I have an table with <code>my_id</code> (primary key) and <code>balance</code>. There are millions of rows of data in the table. I want to find what rank the <code>my_id</code> row of <code>4</code> stands. What I mean by ranking is, if the entire table was sorted by the balance amount (people with the most money would be rank 1 and the person with the lowest amount of money would be the last). How can  I get someone's rank efficiently.</p>
  
  <pre><code>my_id | balance
  ---------------
  1     | 5
  2     | 1
  3     | 45
  4     | 81
  5     | 95
  6     | 45
  </code></pre>
  
  <p>In this where <code>my_id = 4</code> would have the rank of <code>2</code> because he is the second richest. I understand maybe I might need to indexing as well?</p>
  
  <p>Where <code>my_id = 6</code>, would have rank of <code>3</code>. And <code>my_id = 3</code> would also have the rank of <code>3</code> because they are duplicates</p>