I meant SELECT Sum(Amount),Type1,Type2 FROM Accs WHERE Type1='3' OR Type2='3' GROUP BY Type1, Type2 Sorry, ~/Stan > SELECT Sum(Amount) > FROM Accs, Type1, Type2 > WHERE Type1='3' OR Type2='3' > GROUP BY Type1, Type2