Returns the total value of a numeric field:
SELECT StageName, SUM(Amount) FROM Opportunity GROUP BY StageName