codice:
select cod,sum(pezzi) as totale 
from tabella
group by cod