title: ROW_NUMBER() in MySQL
body: <p>Is there a nice way in MySQL to replicate the SQL Server function <code>ROW_NUMBER()</code>?</p>
  
  <p>For example:</p>
  
  <pre><code>SELECT 
      col1, col2, 
      ROW_NUMBER() OVER (PARTITION BY col1, col2 ORDER BY col3 DESC) AS intRow
  FROM Table1
  </code></pre>
  
  <p>Then I could, for example, add a condition to limit <code>intRow</code> to 1 to get a single row with the highest <code>col3</code> for each <code>(col1, col2)</code> pair.</p>