title: MYSQL - SELECT all rows, but use Distinct on one column
body: <p>I have a table data like this</p>
  
  <pre><code>Column_a  | Column_b
    a       |    5
    b       |    25
    g       |    14
    t       |    13
    b       |    15
    c       |    04
    g       |    15
    b       |    13
  </code></pre>
  
  <p>in the column_a i have a lot of duplicate values, i want to be able to select all the rows from the table but if two rows have the same column_a value, i want only the row with the biggest value from colum_b in the results
  exemple of the result that i am looking for :</p>
  
  <pre><code>Column_a  | Column_b
    a       |    5
    b       |    25
    t       |    13
    c       |    04
    g       |    15
  </code></pre>
  
  <h1>Thank you in advance</h1>
  
  <p>**</p>
  
  <ol>
  <li>Update of the question</li>
  </ol>
  
  <p>**</p>
  
  <p>these are the columns i have in my table :
  CRMID | user |  ticket_id | |  description  |  date | hour</p>
  
  <p>what i am trying to do is to select all the rows from the table, but when two rows have the same ticket_id, i want only the newest one to appear in the results, so the row with the newest date and hour ,
  Sorry for making this such complicated !
  i am not a native english speaker and i find it hard to well explain the problem.</p>