Ver originalSELECT a.nombreactor, t1.total, t1.cuantos, t1.idactor FROM actores a INNER JOIN ( SELECT idactor, FORMAT( sum( voto ) / sum( votos ) , 2 ) AS total, count( id_actor ) AS cuantos, id_actor FROM rate_actors GROUP BY id_actor HAVING count( id_actor ) > 0 ORDER BY total DESC LIMIT 0 , 3)t1 ON a.idactor = t1.idactor