Code:
1. SELECT interview.location, Count(interview.location) AS [Total # of events], Count(IIF(interview.AgeOfParticipants=1,1,NULL)) AS [# for Youth], Count(IIF(interview.AgeofParticipants=2,1,NULL)) AS [# for Adults], SUM(interview.NumberOfkiosks), SUM(interview.NumberOfParticipants),
2. (SELECT SUM(NumberofParticipants)
FROM interview
WHERE AgeOfParticipants=1
GROUP BY location),
(SELECT SUM(NumberofParticipants)
FROM interview
WHERE AgeOfParticipants=2
GROUP BY location)
3. FROM interview
GROUP BY interview.location;
Any idea how I can get the correct output of the number of youth and number of adults that were interviewed at each location in this query?
Thanks