I have an attendance table in sql where I store data for activities by organizations. Each record in my attendancegrid is associated to a specific month and fiscal year.
I am looking to get all the Distinct records based on ID from my table that have a total > 0 throughout the whole year. I would like to group it by activity and committee.
Here is what I am using. Does it look like I am on the right track using the count() function?
SELECT committee, Activity, Count(Distinct ID) as NumberofParticipants FROM AttendanceGrid where Total > 0
and Month IN ('July', 'August', 'September', 'October', 'November','December','January', 'February','March','April', 'May','June')
And Fiscal = 2014 GROUP BY Committee, Activity order by Committee, Activity