Mysql
 sql >> Database >  >> RDS >> Mysql

Come selezionare una riga con il valore massimo per una colonna in MySQL?

Rimuovi CC colonna da group by . Prova questo.

SELECT t.* FROM  t
     JOIN (
       SELECT 
    t.id
    ,max(t.count) as max_slash24_count
    FROM t 
    group by t.id
      ) highest
     ON t.count = highest.max_slash24_count
  and t.id= highest.id