Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2003
    Location
    Morgantown, Pennsylvania, USA
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Do I need a Union Query (2003)

    Hello,

    I was asked the question below by someone else. If necessary, I can make up a table and attach it. My question is simply, is there some method in Access that I have missed to perform this query, or do I need to do a union query?

    Here is his request:

    I have a table of customers with 4 fields, customer ID, class of trade (10 classes), region (5 regions), and profitability (a metric). I have many thousands of customers, and I want to find the top 10 in profitability for each region and class of trade combination (5 regions * 10 classes of trade = 50 combinations * Top 10 for each = 500 customers)

    I'm thinking that he needs to do a bunch of Select Top N statements in a union query.

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Do I need a Union Query (2003)

    Have you tried a Group By Query?

    I'm taking for granted that the end product will be a Report, You could do your Sorting and Grouping within the report.

    Just a thought
    threecrow

    Don't make excuses. It's what you do, not why you didn't.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Do I need a Union Query (2003)


Posting Permissions

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