title: MySQL Query with distinct on a column value
body: <p>I have this table (with 100k+ rows):</p>
  
  <pre><code>room_id | emote_id | count | since
  ----------------------------------------
        1 |       22 |    718| 1577135778
        1 |       23 |    124| 1577135178
        1 |       24 |    842| 1577135641
        2 |       22 |    124| 1577135748
        2 |       23 |    345| 1577136441
        2 |       24 |     43| 1577543578
        3 |       22 |     94| 1572135778
        3 |       23 |   4718| 1577135641
        3 |       24 |     18| 1577134661
        4 |       22 |     78| 1577125641
        4 |       23 |    128| 1577135778
        4 |       24 |    278| 1577132577
  </code></pre>
  
  <p>I want to get for each emote_id the row where count is the highest for this emote_id</p>
  
  <p>So for this example I'd like to get this as response:</p>
  
  <pre><code>room_id | emote_id | count | since
  ----------------------------------------
        1 |       22 |    718| 1577135778
        3 |       23 |   4718| 1577135641
        1 |       24 |    842| 1577135641
  </code></pre>
  
  <p>I'm stuck at building the query and need help. :(</p>