Fai quest'ultimo tentativo, altrimenti posta un dump significativo.![]()
codice:set @mail := '', @num := 1; select * from ( select *, @num := if(@mail = mail, @num + 1, 1) as riga_numero, @mail := mail as m from tabella order by mail asc, punteggio desc) as tab where riga_numero = 1;