title: SQL - How to find a distinct value for specific parameters in sql where the data is in the same table
body: <p>I'm not sure what the easiest way is of accomplishing this with a SQL query</p>
  
  <p>How do I find a unique value that is in column test = 1 but that value is not in any other value of test 2 or test 3. Meaning if there is dog B is in test 1 but also test 3 it would not show up in my results. I only want results that show up in test = 1 but they are unique to test = 1 and do not repeat anywhere else.</p>
  
  <p>Using the example below my end result should only be Dog A as all the other values show up at least one more time. IE also I cannot just do a unique on the Dog Column as in test 4 z and y are unique.</p>
  
  <p>I'm thinking two temp tables and then do a join but is there an easy way just from one query ?</p>
  
  <pre><code>   test dog
      1   a
      1   b
      1   c
      1   d
      1   e
      2   b
      2   c
      2   d
      2   e
      3   e
      3   b
      3   c
      4   z
      4   y
  </code></pre>