title: Select count distinct query
body: <p>Writing a query that will give me the total count of an event rather than counting the event every time it happens </p>
  
  <p>Ok so I'm trying to write a query that will count the number of session IDs for that each distinct account id, program id and device id has.So for example. acct id 1 has 3 devices watching the same program with 3 different session IDs. I want my query to give me Acct id 1 has 3 sessions. The current query i have is just listing the number of sessions like this </p>
  
  <pre><code>Acct ID 01 Session 1, Acct ID 01 Session 1
  
  
  SELECT count( DISTINCT source_session_id), acct_id, device_id, program_id,  event_date
  FROM TABLE 
  WHERE condition 
  group by source_session_id, acct_id, device_id, program_id, event_date;
  </code></pre>
  
  <p>I would like the end result of my query to be 
  Acct ID 01   # of Sessions 2</p>