Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    37

    Unanswered: Count Number of Records

    I have two tables:

    Table1:

    ID Category
    1 Laptop
    2 Desktop
    3 Palm

    Table2
    Name Using
    Rob Desktop
    John Palm
    Eric Laptop
    Alex Desktop


    I would like to create a query so that my result displays the count of how many names are using each category:

    ex:

    Category NumberofUsers
    Desktop 2
    Laptop 1
    Palm 1


    I am using Access and am having difficulty getting this to work.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    why bother with primary keys if you're not going to use them in other tables? Change your text descriptions in table2 to the number they represent. Your query could look something like this:

    SELECT Category, COUNT(Using)
    FROM Table1 INNER JOIN Table2 ON Table1.id = Table2.Using
    GROUP BY Category
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jul 2003
    Posts
    37
    Thanks alot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •