Problem with Count query with Group by (1 Viewer)

BennyLinton

Registered User.
Local time
Today, 11:19
Joined
Feb 21, 2014
Messages
263
I am trying to count the number of people with a particular credential (qualifying credential, (numerical)) within a date range:

SELECT DISTINCTROW Count(*) AS [Count Of dbo_People]
FROM dbo_People INNER JOIN dbo_certs ON dbo_People.peopleId = dbo_certs.peopleId
WHERE (((dbo_certs.applicationDate) Between [Beginning Date:] And [Ending Date:]))
GROUP BY dbo_certs.applicationDate, dbo_People.qualifyingCredential;

Problem is my results are looking like this and I need them to be grouped (like 1: 13, 2: 5, 3: 6, etc.):

1
1
2
3
3
2
2
1
2
3
3
4
1
4
2
5
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:19
Joined
Oct 29, 2018
Messages
21,358
Hi. It seems in your SQL, you are grouping by a date field. What is the actual grouping category you want to use?
 

BennyLinton

Registered User.
Local time
Today, 11:19
Joined
Feb 21, 2014
Messages
263
That was the problem.... thanks! didn't need to group by date
 

Users who are viewing this thread

Top Bottom