guarda se così ti va bene....
codice:
SELECT Sum(Quantita) AS quantita, Codice, Prodotto
FROM Tabella
GROUP BY Codice, Prodotto
ciao