Results 1 to 2 of 2
  1. #1
    Beorn is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    4

    Sum without Group By

    Greetings Access Forum!

    I have another question thats bugging me.
    I have a table like this
    Code:
    Sim_Run\ Price, Number, Type 
    1 50 1 A
    1 100 3 B
    1 150 5 C
    2 200 2 A
    2 250 3 B
    3 300 1 A
    (How to use this "TABLE" thing right)

    Now i have a query1:
    SELECT Sim_Run, Sum(Price*Number) AS Volume, Type
    FROM table
    GROUP BY Sim_Run, Type;

    And a query2:
    SELECT Sim_Run, Sum(Price*Number) AS Volume2
    FROM table
    GROUP BY Sim_Run;

    But since table is very big opening it twice costs much time.




    Im sure there is another way of doing this task. What i basicly want is just to add "sum(Volume) Group By Sim_run" into query1 than all would be finished.
    But all the ways i tried i get an error.

    All i want is tu sum up the "Volumes" for each Sim_Run despite the type.
    But i also need the type and Volume data.

    Any Idea?

    Thanks in advance
    Beorn

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    if you really care about the time, you can save the result of Query1 into a table (group by sum_run,type) , then query2 sum this table for sim_run (group by sum_run).

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

Similar Threads

  1. Replies: 5
    Last Post: 11-29-2010, 08:16 AM
  2. how to group?
    By wconan in forum Access
    Replies: 2
    Last Post: 03-08-2010, 09:44 PM
  3. Group by
    By EstesExpress in forum Queries
    Replies: 0
    Last Post: 02-26-2010, 07:52 AM
  4. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08:53 AM
  5. Group By
    By SMAlvarez in forum Access
    Replies: 0
    Last Post: 10-28-2008, 04:40 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