gojets1721
Registered User.
- Local time
- Today, 06:11
- Joined
- Jun 11, 2019
- Messages
- 430
I have a query. There's a number field in the query where any record could have a value in it from 1 to 100.
I am trying to group the query by 'employeename' and then have two count columns for each employeename. A count column where the number field is below 50 and another count column where the number field is over 50.
I can only figure out how to have one count column (which results in me having to make two seperate queries). I was hoping it could be done in a single query. Here's my SQL currently if helpful:
I am trying to group the query by 'employeename' and then have two count columns for each employeename. A count column where the number field is below 50 and another count column where the number field is over 50.
I can only figure out how to have one count column (which results in me having to make two seperate queries). I was hoping it could be done in a single query. Here's my SQL currently if helpful:
Code:
SELECT EmployeeName, Count(Number) AS [CountOfNumber]
FROM qryEmployeeTotals
WHERE (((Number)>50))
GROUP BY EmployeeName;