Results 1 to 3 of 3
  1. #1
    dinesh_ltjd is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    8

    Query to give Subtotals of field

    Hi Sir,

    I am very new to this access world. Before this I have a good knowledge of excel and basic vba for excel.
    I am working in a database in which there is a table where i have following fields
    PRODUCT ID QUANTITY
    2801 40.00
    2801 40.00
    2801 40.00


    2808 40.00
    2808 40.00
    2808 40.00
    2808 40.00

    Now I want output 'Product ID Wise quantity ordered'
    PRODUCT ID QUANTITY
    2801 120.00
    2808 160.00
    Just like we do Pivots in excel But i dont want to create a pivote view in acess.
    Please guide if possible

    Thanks
    DG

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Consider a table - ltjd - with fields

    ProductId, Quantity

    a query such as
    Code:
    SELECT ltjd.ProductId
    , Sum(ltjd.Quantity) AS SumOfQuantity
    FROM ltjd
    GROUP BY ltjd.ProductId;
    will give the following result

    ProductId SumOfQuantity
    2801 120
    2808 160

  3. #3
    dinesh_ltjd is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    8
    Thank u sir for your help

    I have used Total Query then Group By in Query Design Mode

    Thanks Again

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

Similar Threads

  1. Query Subtotals???
    By claysea in forum Queries
    Replies: 3
    Last Post: 02-20-2012, 11:29 AM
  2. Access Newbie - Query for Daily Subtotals?
    By malikastor in forum Access
    Replies: 3
    Last Post: 01-09-2012, 09:11 PM
  3. Replies: 3
    Last Post: 11-29-2011, 12:54 AM
  4. Replies: 2
    Last Post: 11-04-2011, 09:14 AM
  5. Subtotals within a query
    By mulefeathers in forum Queries
    Replies: 2
    Last Post: 06-07-2010, 01:02 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