title: SQL Distinct Count with Group By
body: <p>My table in this issue has three columns: Player, Team and Date_Played.</p>
  
  <pre><code>Player         Team         Date_Played
  John Smith     New York     2/25/2014
  Joe Smith      New York     2/25/2014
  Steve Johnson  New York     2/25/2014
  Steph Curry    Orlando      2/25/2014
  Frank Anthony  Orlando      2/26/2014
  Brian Smith    New York     2/26/2014
  Steve Johnson  New York     2/27/2014
  Steph Curry    New York     2/28/2014
  </code></pre>
  
  <p>I know how to get a list of distinct team names or dates played, but what I'm looking for is a query that will group by Team and count the number of distinct Team &amp; Date combinations. So the output should look like this:</p>
  
  <pre><code>Team          Count
  New York      4
  Orlando       2
  </code></pre>
  
  <p>So far I have:</p>
  
  <pre><code>SELECT DISTINCT Tm, Count(Date_Played) AS Count
  FROM NBAGameLog
  GROUP BY NBAGameLog.[Tm];
  </code></pre>
  
  <p>But this gives me the total amount of records grouped by date.</p>