title: Postgres UNION: not showing the full number of rows from both tables
body: <p>I needed to export an ESP report in two chunks (split by timeframe) because of the size and I wanted to import both reports into postgres and combine them into one table. (All column names and column orders are the same). While I was able to import both reports as separate tables into postgresql, when I run a union, it seems like 103k rows were lost. </p>
  
  <p>Here's the query I used:</p>
  
  <pre><code>select *
  from all_email_opens_by_date_range_feb_to_may
  union
  select *
  from all_email_opens_by_date_range_june_to_sept;
  </code></pre>
  
  <p>And the result shows 1,019,378 rows. 
  However, the table "all_email_opens_by_date_range_feb_to_may" has 625,142 rows and the table "all_email_opens_by_date_range_june_to_sept" has 497,759.  Since 625,142 + 497,759 = 1,122,901, I was expecting the union to display 1,122,901 rows.  Can someone please explain how my union could discard 103k rows? I don't have much experience with unions.
  Thanks in advance!</p>