title: SQL Two Different WHERE Conditions for Two Columns
body: <p>How can I return two columns that each use different WHERE critia? Obviously, this won't work:</p>
  
  <pre><code>SELECT Name, COUNT(Column1) AS Total, COUNT(Column1) AS YearToDate
  FROM Table1
  WHERE Occurred_Date BETWEEN '2010-06-01' AND '2010-06-30' --Total
  WHERE Occurred_Date BETWEEN '2010-01-01' AND '2010-06-30' --YearToDate
  </code></pre>
  
  <p>This is the output I'm looking for:</p>
  
  <pre><code>Name  | Total | YTD  
  -------------------
  Item1 | 2     | 3
  Item2 | 4     | 8
  </code></pre>