title: Stuck with SQL query - Learning SQL
body: <p>Hi I'm learning MYSQL / MariaDB and I'm stuck with making a ranking based on 2 columns</p>
  <p>I did this query:</p>
  <pre><code>SELECT * FROM partides WHERE PUNTUACIO &gt; 0 ORDER BY ID_NIVELL DESC, PUNTUACIO DESC
  </code></pre>
  <p>and I got this table and now I want the red table: <a href="https://i.stack.imgur.com/Ooxrp.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  <p>Ranking by levels and points (puntuacio) only one nick per user to make a top 5</p>
  <p>Thanks in advance</p>