title: SQL Syntax with ROW_NUMBER()
body: <p>Im creaing an android app and I am using MySQL.</p>
  
  <p>The MySQL table look like </p>
  
  <p><img src="https://i.stack.imgur.com/OH4Sd.png" alt="this"></p>
  
  <p>I want to get the user's rank by his qa, if I want to get Kenig's rank I will get 1 because he has the most qa (1060) and if I want to get Dyrus's rank I will get 3 because he has the lowest qa etc..</p>
  
  <p>I looked all over the internet for a query to do that and this is the result</p>
  
  <pre><code>SELECT ip,name,qa,ROW_NUMBER() over (ORDER BY qa) AS Number FROM users ORDER BY qa;
  </code></pre>
  
  <p>But when I try to run this line I get this error:</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near '(ORDER BY qa) AS Number FROM users ORDER BY id' at line 12</p>
  </blockquote>