/* */

SASTechies

Place to learn SAS and enhance your professional career...

Here's a simple SAS Problem to work with... 
This was presented at a technical interview screening at Gap Inc....

For the following 7 questions we are working with a temporary database called PRODUCT  Each record is a product transaction along with the following information:
Store                $1                    Store number 0-9
Product           $20                  Product Number
Date                mmddyy10.     Date of the transaction
Buy_sell          $1                    ‘B’ if the product was Bought or ‘S’ if it was sold
Units               12.                   # of units transacted
Price                12.2                 Unit price

Please answer the following questions using this database:
  1. Assume that the data is loaded into memory as WORK.PRODUCT, write a program that lists by Store, the following information: Store; products bought; total cost per product. Create a table called work.totalbuy.
  2. We have just been told that there is an error in the data. There can only be products sold after a product has been bought for any one store. Clean the data and output any errors to work.errors.
  3. Write a macro that for each store would create a file work.STOREx (where x = the store number). The file should have data that summarizes information across products.
  4. Use Proc Freq to determine what products are being bought across all stores. Store this information in work.prodbuy.
  5. Do number 4 again without using Proc Freq but using a different procedure.
  6. Do number 4 again using the data step and not the procedure used in 4 and 5.
  7. Using  WORK.PRODUCT output a dataset that contains the a record for the each store with the earliest purchase date for each product; the earliest sale date for each product; and the total profit for each product.
Download Sample data for this project

 Check your solution with my Solution..under Projects | Mini Projects 2 Try...

0 comments:

Post a Comment





Technology Top Blogs Programming Blogs - BlogCatalog Blog Directory TopOfBlogs Blog Directory blogarama - the blog directory blog search directory Blog Directory - OnToplist.com hihera.com On our way to 1,000,000 rss feeds - millionrss.com Increase Page Rank