prova cosi:

$sql = " select votante, AVG(voto) from ...... ";