Results 1 to 4 of 4
  1. #1
    Lady_Jane is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2010
    Location
    Canada
    Posts
    49

    Question Two Different "Group By"'s in the Same Query


    Hi everyone,
    I have two tables linked in a one to many relationship through ID field.
    The first table has fields ID and Type
    The second table has fields ID, Region, and Percent
    One ID in the first table can have many Regions in the second table.

    I would like to produce a table that returns the total number of IDs per region where Percent >= 90 AND the total number of IDs per region where Percent is >=90 AND where Type is "Reference".

    The final table would be have fields: Region, Total#ID, and #ReferenceID

    Is it possible to do this in ONE query?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I think so.

    What you have started on?? do you have a start on it??

  3. #3
    Lady_Jane is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2010
    Location
    Canada
    Posts
    49

    Arrow

    I have written two other queries, one gets # ID's per region and the other gets # reference ID's per region. These combined with the second table (id, region, percent) produce the results I need. But I don't know how to do it without using the two other queries.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    if that's important, than you're done!

    there's nothing wrong with using two queries.

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

Similar Threads

  1. ComboBox "Select" and "DLookUp"
    By witooldas in forum Forms
    Replies: 0
    Last Post: 03-23-2011, 03:31 AM
  2. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  3. Replies: 3
    Last Post: 04-10-2010, 10:22 AM
  4. aSTR = Dir("C:\*.*") >> "Type Mismatch"
    By JGrant in forum Programming
    Replies: 1
    Last Post: 03-28-2009, 05:17 AM
  5. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 PM

Tags for this Thread

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