NOT Counting Duplicates

jrock76

New member
Local time
Today, 14:32
Joined
Jun 13, 2006
Messages
5
Hello everyone,

I have been working on a database that involves Clients and Group Meetings. I have a table for Clients (which includes their ID, Name, ect) and also a table for Groups(Group ID,Name,ect).This is set to keep the attendance of each group meeting.

I would like to do a count of all the members that belong to each group. Right now I have the query set to count the Client ID with a group by of the Group name. This ends up counting a Client ID more than once each time they attend that groups meeting. Once the client belongs to a group I would like it to not count them more than once.

It's probably something simple that I'm overlooking. I have showed other people and nobody has had any answers about being able to a count without counting duplicates.

Here is my SQL:

SELECT DISTINCT Count([tblMaster-GroupMeetDates].ClientID) AS CountOfClientID, [tblMaster-Group].GroupName
FROM [tblMaster-Group] INNER JOIN [tblMaster-GroupMeetDates] ON [tblMaster-Group].GroupId = [tblMaster-GroupMeetDates].GroupId
GROUP BY [tblMaster-Group].GroupName;

Thank you to anyone that can help
 
Last edited:
Post the SQL of your query.

RV
 

Users who are viewing this thread

Back
Top Bottom