Im trying to find out how many clients viewed a property within 14 days of May 20, 2004, either before or after. Not really sure at all how to go about this.
Im assuming i need to group it and use a having?
EDIT: I am using oracle now
select count(*)
from VIEWING
WHERE CLAUSE?
Edit #1, since you are using Oracle, you can use:
See SQL Fiddle with Demo
Based on some of your previous questions you were using MySQL.If you are using MySQL then you can use the
DATE_ADD()function to get the date range and then usecount(*)to return all records from those dates: