I was looking at this link, but was still having trouble creating my statement. I have the following query
SELECT SUM(AMT) AS TOTAL, NAME, YEAR
FROM TABLE WHERE IND='ISVALID' GROUP BY NAME, YEAR
I would get the following results
TOTAL | NAME | YEAR
====================
10000 | JOHN | 2010
20500 | PETE | 2009
12500 | MIKE | 2008
50500 | MARY | 2008
50500 | MARY | 2007
40000 | JANE | 2007
I would like to exclude 50500 | MARY | 2008, which has an IND column with 'ISVALID' as well. How do I do this?