title: tsql join with dateparts in subqueries
body: <p>I have two queries with subqueries for dateparts which I like to join.</p>
  
  <pre><code>SELECT  DateMonth, DateYear, Datestring,
      MAX(CouponTotalCount) NoOfCouponsViewed
  FROM    (
          SELECT  *, DATEPART(MONTH, DateInsert) DateMonth, DATEPART(YEAR, DateInsert) DateYear, 
          CONVERT(CHAR(4), DateInsert, 100) + CONVERT(CHAR(4), DateInsert, 120) Datestring
          FROM FlurryCouponViewed
      ) sub
  where couponID=249
  GROUP BY DateMonth, DateYear, Datestring
  
  SELECT  DateMonth, DateYear, Datestring,
      MAX(CouponTotalCount) NoOfCouponsRedeemed
  FROM    (
          SELECT  *, DATEPART(MONTH, DateInsert) DateMonth, DATEPART(YEAR, DateInsert) DateYear, 
          CONVERT(CHAR(4), DateInsert, 100) + CONVERT(CHAR(4), DateInsert, 120) Datestring
          FROM FlurryCouponRedeemed
      ) sub
  
  where couponID=249
  GROUP BY DateMonth, DateYear, Datestring
  </code></pre>
  
  <p>The output is of the two queries is:</p>
  
  <pre><code>DateMonth   DateYear    Datestring NoOfCouponsViewed
  ----------- ----------- ---------- -----------------
  2           2012        Feb 2012   5
  3           2012        Mar 2012   12
  4           2012        Apr 2012   25
  5           2012        May 2012   25
  
  
  
  DateMonth   DateYear    Datestring NoOfCouponsRedeemed
  ----------- ----------- ---------- -------------------
  2           2012        Feb 2012   3
  3           2012        Mar 2012   4
  4           2012        Apr 2012   5
  5           2012        May 2012   11
  </code></pre>
  
  <p>What I like to achive is two have one joined query giving me:</p>
  
  <pre><code>DateMonth   DateYear    Datestring NoOfCouponsViewed NoOfCouponsRedeemed
  ----------- ----------- ---------- ----------------- -------------------
  2           2012        Feb 2012   5                 3
  3           2012        Mar 2012   12                4
  4           2012        Apr 2012   25                5
  5           2012        May 2012   25                11
  </code></pre>
  
  <p>How can I do this ?</p>