title: Exclude Rows based on overlapping restrictions (SQL)
body: <p>I was looking at <a href="https://stackoverflow.com/questions/4823353/exclude-rows-based-on-other-rows-sql">this link</a>, but was still having trouble creating my statement. I have the following query </p>
  
  <pre><code>SELECT SUM(AMT) AS TOTAL, NAME, YEAR 
  FROM TABLE WHERE IND='ISVALID' GROUP BY NAME, YEAR
  </code></pre>
  
  <p>I would get the following results</p>
  
  <pre><code>TOTAL | NAME | YEAR 
  ====================
  10000 | JOHN | 2010  
  20500 | PETE | 2009 
  12500 | MIKE | 2008 
  50500 | MARY | 2008 
  50500 | MARY | 2007 
  40000 | JANE | 2007 
  </code></pre>
  
  <p>I would like to exclude 50500 | MARY | 2008, which has an IND column with 'ISVALID' as well. How do I do this?</p>