Class = 'incomecc' AND Class ='incomecheck' <-- That will always return false. Perhaps you want to use OR rather than AND? SELECT SUM(Amount) AS Sales
FROM Bank
WHERE
Class = 'incomecc' OR Class ='incomecheck'
That will add up the amounts for the two classes 'incomecc' and 'incomecheck'