I have a CustomerData table with the following attributes:
FirstName, LastName, DateofBirth, ID, Location
I am trying to write a query that pulls the first name, last name, date of birth, and IDNumber of users who belong to more than one location.
I tried the following code but I am getting an error about aggregates needing a group by clause.
SELECT *
FROM CustomerData
WHERE Count(Location) > 2
Any assistance would be greatly appreciated
Use HAVING:
HAVING is basically a
WHEREthat allows you to use aggregate functions.