I'm given a table Employee with 300,000 records that contains the following fields:
- First_name
- Last_Name
- Age
- Location_Id
Query should return location_id values that have more than 75000 records with their count.
I'm given a table Employee with 300,000 records that contains the following fields:
Query should return location_id values that have more than 75000 records with their count.
This is the query you're looking for:
SELECT T.Location_Id
,COUNT(T.Location_Id) AS [nbRecords]
FROM yourTable T
GROUP BY T.Location_Id
HAVING COUNT(T.Location_Id) > 75000
Hope this will help you.