Jun 17, 2005 #1 bill1one Programmer Sep 29, 2004 93 US The following statement counts all the records in the table. How can I limit it to count only the records where [School] is "Souders"? SELECT Count(*) AS [Number of Participants] FROM tblParticipants;
The following statement counts all the records in the table. How can I limit it to count only the records where [School] is "Souders"? SELECT Count(*) AS [Number of Participants] FROM tblParticipants;
Jun 17, 2005 1 #2 r937 Technical User Jun 30, 2002 8,847 CA SELECT Count(*) AS [Number of Participants] FROM tblParticipants WHERE [School] = 'Souders' r937.com | rudy.ca Upvote 0 Downvote
SELECT Count(*) AS [Number of Participants] FROM tblParticipants WHERE [School] = 'Souders' r937.com | rudy.ca
Jun 17, 2005 Thread starter #3 bill1one Programmer Sep 29, 2004 93 US Great thanks. Upvote 0 Downvote
Jun 17, 2005 #4 rstitzel MIS Apr 24, 2002 286 US SELECT Count(*) AS [Number of Participants] FROM tblParticipants WHERE [school] = "Souders" Upvote 0 Downvote
Jun 17, 2005 #5 lespaul Programmer Feb 4, 2002 7,083 US For future reference, if you want a count of all schools individually: SELECT School, COunt(*) As [Number of Participants] FROM tblParticipants GROUP BY School will return data like this: School Number of Participants Souders 75 Norders 60 Easters 56 Westers 100 Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual Upvote 0 Downvote
For future reference, if you want a count of all schools individually: SELECT School, COunt(*) As [Number of Participants] FROM tblParticipants GROUP BY School will return data like this: School Number of Participants Souders 75 Norders 60 Easters 56 Westers 100 Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual