Results 1 to 3 of 3
  1. #1
    slaterino is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2009
    Posts
    25

    Counting multiple items in a query

    Hi,


    I'm just getting to grips with queries at the moment and was hoping that someone could tell me how to do a query as such.

    Imagine there is a table with two fields 'Name' and 'Status.' There are three possible answers to Status; Yes, No and Don't Know.

    How would I create a query that would have all the names then listed next to them would be a count for how many said Yes, how many said No, and how many said Don't Know.

    This seems like it shouldn't be too hard to do but after playing around for many hours I still haven't worked it out.

    Any help would be massively appreciated!

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi,

    try a groupsquery: group by answer and count the number of records in each group.
    Tip: any beginners handbook or learning website can help you with those topics.

    grNG

  3. #3
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    While Noellag gave you the way to get the answer(good way to learn), I give you the answer for reference:
    select Name,Status,count(*) from aTable group by Name,Status

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Selecting multiple items from Dropdown
    By Kipster1203 in forum Forms
    Replies: 12
    Last Post: 06-07-2010, 09:20 AM
  2. Multiple detail items per line
    By needafix in forum Reports
    Replies: 3
    Last Post: 10-22-2009, 11:04 AM
  3. Help with counting Query
    By metalhead22 in forum Queries
    Replies: 8
    Last Post: 04-29-2009, 02:07 AM
  4. Counting returned records in a query
    By johncob in forum Queries
    Replies: 0
    Last Post: 02-11-2009, 05:30 PM
  5. Replies: 1
    Last Post: 11-11-2006, 08:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums