Results 1 to 4 of 4
  1. #1
    shubhamgandhi is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2011
    Posts
    22

    Can access analyze orders with a SKU list?

    I have a spreadsheet of a few thousand lines of order data of order # and SKUs Ordered which I imported into Access. Now I need analyze the data to figure out which two SKUs are most commonly sold together (i.e. same order).

    Is there a way I can automatically do this? Or do I have to write some VBA?

    I have tried setting up relationships and making queries and reports based on the data but I just cant figure it out.

    I know this can be done VBA but I need a fast and automated way of doing this, after all, this is the type of thing access is made for, right?

    Heres a screenshot of what my data looks like: The first column is Order, second column is SKU ordered.





    Any help is appreciated! Thank you!

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Build your SELECT query that shows all of the data you want, in your case select a specific order number, SKU and count(sku) this will give you three columns, sort the data by the count(SKU) column in descending order. go to the SQL view of the query and after the SELECT statement add TOP 2 so your statement should start with SELECT TOP 2. NOTE, unless you limit it access will show all ties. So for instance in your data there are no duplicate SKU numbers so you would have a bunch of records with 1 total SKU type.

    EDIT: it occurs to me that you mean you want a list of order numbers and the top 2 items for each order in a single query which is a different type of query but you did say it was for a single order you were looking.

  3. #3
    shubhamgandhi is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2011
    Posts
    22
    I edited the OP to clarify.
    I'm looking to figure out which 2 items are found together most commonly in an order.
    So at the end of the month you can say "wow, looks like its a trend that people buy these two things together"

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    ah well then I assume you have a date field. So you would just pick all the data between two dates in a summary (aggregate) query, make sure the date field is set to WHERE not GROUP BY, have one field that is your SKU, one field that is your Count(SKU) sort by the count field in descending order and proceed as I said before using the TOP 2 statement on your select SQL

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

Similar Threads

  1. Replies: 4
    Last Post: 06-16-2011, 09:30 PM
  2. How to analyze holidays/weekends
    By Galio83 in forum Queries
    Replies: 0
    Last Post: 03-31-2011, 12:27 PM
  3. Purchase orders 2 in 1
    By jordanturner in forum Forms
    Replies: 1
    Last Post: 09-09-2010, 03:38 AM
  4. Replies: 1
    Last Post: 05-05-2010, 10:34 AM
  5. Orders & Products
    By mastromb in forum Database Design
    Replies: 4
    Last Post: 01-22-2010, 07:59 AM

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