Results 1 to 2 of 2
  1. #1
    Lorlai is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    107

    Sum by groups

    I have data that needs to be summed together. It is presented below:

    ID Qty
    abc 12
    abc 4
    abc 5
    efg 89
    efg 1
    efg 6
    hij 21
    hij 9

    How can I get these all together by ID, so that the data will read:

    abc 21
    efg 96
    hij 30



    These columns are also amoung about 20 other columns that will need to be selected, if that makes a difference.

    Thank you!

  2. #2
    vicrauch is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Sacramento
    Posts
    27
    Here is the SQL for that type of query:
    Code:
    SELECT yourTableName.yourAlphaField, Sum(yourNumberField) AS SumOfyourNumberField
    FROM yourTableName
    GROUP BY yourTableName.yourAlphaField;
    Because you did not give us field names, I used my own. your AlphaField is for those alpha characters, and yourNumberField is for the numbers you want to sum, by alpha group.

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

Similar Threads

  1. Question about Option Groups
    By mnsemple83 in forum Forms
    Replies: 3
    Last Post: 07-18-2011, 11:25 AM
  2. Sort Calculated Ages in to Age Groups
    By l3111 in forum Queries
    Replies: 2
    Last Post: 06-09-2011, 04:33 AM
  3. forceing groups to next page
    By newtoAccess in forum Reports
    Replies: 1
    Last Post: 04-25-2011, 12:11 PM
  4. Group & Reports (more than 4 Groups??)
    By JohnS in forum Reports
    Replies: 3
    Last Post: 10-01-2009, 07:11 AM
  5. using date for groups
    By antcox2004 in forum Reports
    Replies: 3
    Last Post: 01-28-2006, 07:44 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