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)
basically, I have lots of "people" in r db, and "domains" in the d. 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.
Example return: 1, Site1, 21/05/13, 5 2, Site2, 20/05/13, 2
d
directdomain (PK)
domaindisplayname
r
rsld (PK)
lastdate
directdomain (FK)