Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    1

    Unhappy Unanswered: totalling up fields - HELP

    Can anyone help me, when designing my database I came across a problem, I was trying to total up a text field so that I could work out the total number of people in the database. The Persons name can be repeated many times taking part in different events, I really need some help

    Smilez

  2. #2
    Join Date
    Nov 2001
    Posts
    336
    Here is an example of using Group By clause:

    How To Get Totals For Each User:
    SELECT Count(UserID) AS CountOfUserID, UserName
    FROM Users GROUP BY UserName ORDER BY UserName;

    Now save query below as qryUsers (it gives you the list of all users):
    SELECT UserName
    FROM Users GROUP BY UserName ORDER BY UserName;

    Final query is:
    SELECT Count(UserName) AS CountOfUsers FROM qryUsers;

    HTH.

Posting Permissions

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