Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2005
    Location
    Brooklyn, ny
    Posts
    69

    Unanswered: select Top 10 Weekly Sales (Desc)

    Hello, I'm working on a query, but need your help...
    How can select Top 10 Weekly Sales (Desc) in the product group and within sales group? Order by Weekly Sales Desc

    Sales Group:
    Adult
    Product Group:
    Active
    Dane
    Lgw
    Prvt
    Sales Group:
    Girls
    Product Group:
    Dane
    Lgw
    Sales Group:
    NYCB
    Product Group:
    Active
    Dane
    Lgw
    Sales Group:
    PLUS
    Product Group:
    Active
    Lgw

    Thank you for your help.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Not enough information.

    What do the tables look like?
    Provide a sample result set.
    oh yeah... documentation... I have heard of that.

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

  3. #3
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    shoot.... Teddy beat me to it.
    Inspiration Through Fermentation

  4. #4
    Join Date
    Sep 2005
    Location
    Brooklyn, ny
    Posts
    69
    Hello , need help:
    This is example of a table:
    SalesGroup ProductGroup FabricGroup StyleNumber Weekly Sales
    Adult Active Nylon 1561 $300
    Adult Active Nylon 1562 $200
    Adult Active Nylon 1568 $400
    Adult Active Nylon 1563 $420
    Adult Active Nylon 1565 $150
    Adult Active Cotton 1677 $150
    Adult Active Cotton 1678 $150
    Adult Active Cotton 1675 $450
    Adult Active FS 1288 $450
    Adult Dane Nylon 1099 $100
    Adult Dane Poli 8871 $250
    Adult Lgw Cotton/Spx 1011 $55
    Adult Prvt Nylon 1561 $300
    Girls Dane Nylon 1112 $210
    Girls Dane Nylon 8801 $200
    Girls Lgw Cotton/Spx 1011 $55
    NYCB Active Cotton 2010 $150
    NYCB Active Cotton 2011 $300
    NYCB Dane Poli 8881 $250
    NYCB Lgw Cotton/Spx 1012 $55
    PLUS Active Cotton 3677 $150
    PLUS Active Cotton 3699 $350
    PLUS Active Cotton 3661 $150
    PLUS Lgw Cotton/Spx 3012 $55
    PLUS Lgw Cotton/Spx 3013 $155
    PLUS Lgw Cotton/Spx 3014 $355

    How can I select Top 10 Weekly Sales (Desc) within each prod group that in each sales group?
    Order by Weekly Sales (Desc), style number

    Thank you so much

  5. #5
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154
    To be fair this still looks as muffled as the original post; anyhow I'll shoot out in the dark and try and answer your question;

    What you need is 2 queries (one for each type that you want the results of)

    In each you need to:

    Add a date group field (to filter ecords by date, so that you have the week/month/year you wish to view)

    and.....

    count your transaction items

    then....

    organise them highest to lowest. (not sure how to restrict them to the top 10 hghest records. but it is a start)

    just a bit more help

    To filter by date:

    set up a table with 2 fields "start Date" and "end date"
    add these fields to your query
    set the criteria for your transaction date to >=[start date] AND <=[end date]

    When you add a date to these fields it will use them to filter by. If no date is present in these fields (start date/end date) the query won't return any results.

    hope this helps;

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

Posting Permissions

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