I know this should be painfully simple, but I’m having a mental block. I have three tables in a SQL Server 2008 database:
Users:
- ID
- Birthdate (datetime)
User_Visits:
- Site_ID
- User_ID
- Visit_Date
Sites:
- ID
I need a SQL statement that gets the count of sites that have visitors with an average age between say 40-50 years old.
Thanks in advance!
1 Answer