title: Query to find one to many relationship between two tables and two columns (exclude anything one to one)
body: <p>New to this forum, and new to SQL.  I'm trying to clean up some data and pull out the errors.  I have two tables, which both share the columns FILENAME, TYPE, SEC, I would like to pull out any records from both tables where there is a one to many relationship between SEC and TYPE, anything with a SEC and TYPE where only a one to one relationship can be ignored and is considered valid.</p>
  
  <p>For Example,
  I have in table1.</p>
  
  <pre><code>FILENAME TYPE SEC
  
  a----------------x----1
  
  b----------------x----2
  
  c----------------y----1
  
  d----------------y----3
  </code></pre>
  
  <p>in table2 i would have something similar,</p>
  
  <pre><code>FILENAME TYPE SEC
  
  e----------------x----1 
  
  f----------------x----2
  
  g----------------z----1
  
  h----------------y----3
  </code></pre>
  
  <p>so i would like a query that would find</p>
  
  <pre><code>FILENAME TYPE SEC
  
  a----------------x----1
  
  c----------------y----1
  
  e----------------x----1
  
  g----------------z----1
  </code></pre>
  
  <p>My database is very large and any help would be much appreciated!</p>
  
  <p>Thanks.</p>