title: sql where score >= s.score
body: <p>I have a question about sql. I have a question looks like this.</p>
  
  <pre><code> +----+-------+
   | Id | Score |
   +----+-------+
   | 1  | 3.50  |
   | 2  | 3.65  |
   | 3  | 4.00  |
   | 4  | 3.85  |
   | 5  | 4.00  |
   | 6  | 3.65  |
   +----+-------+
  </code></pre>
  
  <p>The table is called 'Scores' and after ranking the score here, it will look like this,</p>
  
  <pre><code> +-------+------+
   | Score | Rank |
   +-------+------+
   | 4.00  | 1    |
   | 4.00  | 1    |
   | 3.85  | 2    |
   | 3.65  | 3    |
   | 3.65  | 3    |
   | 3.50  | 4    |
   +-------+------+
  </code></pre>
  
  <p>Here is a sample answer but I am confused about the part after WHERE.</p>
  
  <pre><code>select 
      s.Score, 
      (select count(distinct Score) from Scores where Score &gt;= s.Score) 
   Rank
   from Scores s
   order by s.Score Desc;
  </code></pre>
  
  <p>This Score >= s.Score is something like Score column compare with itself. I totally feel confused about this part. How does it work? Thank you!</p>
  
  <p>E.</p>