title: How to get sum of unique names while grouping by date
body: <p><br>
  I am using oracle 10g and i have a table of logged in users<br></p>
  
  <pre><code>created                userid
  --------------------   ------
  10-jul-2014 10:10:10   usr1
  10-jul-2014 10:12:10   usr2
  10-jul-2014 11:12:10   usr1
  10-jul-2014 12:12:10   usr3
  13-jul-2014 10:12:10   usr1
  13-jul-2014 11:12:10   usr2
  </code></pre>
  
  <p>The output i am looking for is</p>
  
  <pre><code>created            count(userid)
  -----------        ------------------
  10-jul-2014        3 (3 unique users)
  13-jul-2014        2 (2 unique users)
  </code></pre>
  
  <p>Query i came up with is not working as expected <br></p>
  
  <pre><code>select trunc(created) cr, userid  
  from loggedinusers
  group by trunc(created), userid
  order by trunc(created) asc;
  </code></pre>