I have a table named AttendanceGrid and I have the following query below that finds the records from two separate fiscal years. The problem with the output is that there are duplicate records. I want to select only the unique records based on these columns:
How can I modify the following code to select only those unique records?
select AttendanceGrid.Committee, count(Distinct AttendanceGrid.ID) as 'Core Males' from
AttendanceGrid INNER JOIN tblRegistration ON AttendanceGrid.[ID]=tblRegistration.[ID]
Where ((AttendanceGrid.Month IN ('November','December','January', 'February','March','April', 'May','June') And AttendanceGrid.Fiscal = 2013) or
(AttendanceGrid.Month IN ('July', 'August', 'September', 'October') And AttendanceGrid.Fiscal = 2014))
And tblRegistration.Combo5 = 'Male' And AttendanceGrid.Total > 0 And AttendanceGrid.[CSW/TitleXX] = 'T'
group by AttendanceGrid.Committee order by Committee