Results 1 to 3 of 3

Thread: Top100

  1. #1
    Join Date
    Oct 2006

    Exclamation Unanswered: Top100

    Hi, I am relatvily new to Access...

    I am trying to create a query that would show me the Top100 products ordered by Qty by man and his contract.

    My table of data consists of

    Product Ordered
    Product Group

    How can I show this in a simple way that I can understand?


  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Take the query that would normally group together quantity and man, then add "SELECT TOP 100" to it.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Oct 2006
    This is my query that I wrote...

    SELECT qryNPCData.Council, qryNPCData.ProductOrdered, qryNPCData.Qty
    FROM qryNPCData
    WHERE (((qryNPCData.Qty) In (SELECT TOP 100 qryNPCData.[Qty] FROM qryNPCData AS qryNPCData WHERE qryNPCData.[Qty] = qryNPCData.[Qty] AND qryNPCData.[Qty] = qryNPCData.[Qty] ORDER BY qryNPCData.[Qty] DESC)))
    ORDER BY qryNPCData.Qty DESC;

    My next problem I have found is when I delete the Qty as found thats not
    what I was after. I am wanting to count the number of products instead.

    I tried to replace the Qty with just the Products and this doesnt give me a
    count of all the same product, just gives me a count of 1 each time.

    How can I measure the Top100 products


Posting Permissions

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