title: Oracle SQL - Inner Join & Count
body: <p>I have the following Oracle database, and I need to return the following:
  d.directdomain, d.domaindisplayname, r.lastdate (The latest), and count(how many times, r.directdomain = d.directdomain)</p>
  
  <p>basically, I have lots of "people" in <strong>r</strong> db, and "domains" in the <strong>d</strong>. I need to return how many times a person in R visited each "domain", and also return the last time they visited the domain.
  I tried a few things, but it seems by using count, i need to GROUP BY the date, so that's confusing me.</p>
  
  <p>Example return:
  1, Site1, 21/05/13, 5
  2, Site2, 20/05/13, 2</p>
  
  <pre><code>d
  directdomain (PK)
  domaindisplayname
  
  r
  rsld         (PK)
  lastdate
  directdomain (FK)
  </code></pre>