title: Adding argument to SELECT statement with UNION changes record number
body: <p>When I add a new argument to the <code>SELECT</code> clause of a <code>UNION</code>, I get more records... how can this be? Isn't a <code>UNION</code> just mashing them together? Example:</p>
  
  <p>EDIT: They're absolutely distinct. the <code>code</code> column is either "IN" or "OUT", and that's what I'm using to separate the two.</p>
  
  <p>EDIT2: UNION ALL gives me 80 records, like it should, but it's odd because my two SELECT statements are absolutely distinct.</p>
  
  <p>FINAL EDIT: Ultimate problem was records within one of my SELECT statements being not DISTINCT, not between the two SELECT statements. Thanks all.</p>
  
  <pre><code>-- Yields 76 records
  SELECT
         f.date
       , f.code
       , f.cost
    FROM a.fact f
    WHERE f.code = 'IN'
  UNION
  SELECT
         f2.date
       , f2.code
       , f2.cost
    FROM a.fact2 f2
    WHERE f2.code = 'OUT'
  ;
  
  -- Yields 80 records
  SELECT
         f.key
       , f.date
       , f.code
       , f.cost
    FROM a.fact f
    WHERE f.code = 'IN'
  UNION
  SELECT
         f2.key
       , f2.date
       , f2.code
       , f2.cost
    FROM a.fact2 f2
    WHERE f2.code = 'OUT'
  ;
  </code></pre>