title: SELECT DISTINCT for multiple fields
body: <p>In my table, I have <code>Collection_Date</code> and <code>Tag_Date</code> fields, both of type <code>date</code>.</p>
  
  <p>I need to query this table, separating each date into its component month, day, and year, but still keeping the distinction between the <code>Collection_Date</code> dates and the <code>Tag_Date</code> dates, and I don't want duplicates.</p>
  
  <p>I tried this:</p>
  
  <pre><code>SELECT DISTINCT
      MONTH(Collection_Date) AS col_month,
      DAY(Collection_Date) AS col_day,
      YEAR(Collection_Date) AS col_year,
      MONTH(Tag_Date) AS tag_month,
      DAY(Tag_Date) AS tag_day,
      YEAR(Tag_Date) AS tag_year
  FROM the_table
  </code></pre>
  
  <p>However, this only returns rows with a unique <code>Collection_Date</code> <em>and</em> <code>Tag_Date</code>.</p>
  
  <p>What I think I want is to separate it into two queries, one <code>SELECT DISTINCT</code>ing <code>Collection_Date</code> and one for <code>Tag_Date</code>. However, I would really like to avoid multiple queries, if possible.</p>
  
  <p>How can I accomplish this?</p>