Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
Exercise (7-10)

You are a database developer for Walmart Inc.

​You are in charge of building a program that computes the total price for any online orders.

​Copy and run the code from the yellow box below:

The ORDER1 table contains the items in a customer's shopping cart on Walmart.com. 

​The customer has selected a list of items and the quantities for the order.
Picture

Task 1

Write a Proc SQL step to compute the subtotal for each items. The query result should look like this:
Picture

The PRICE column should be taken from the WALMART table. The subtotal is calculated as:

SUBTOTAL = PRICE * QUANTITY

Task 2

Based on the query / table from task 1, write a Proc SQL step to create a SAS table that contains the subtotal of the order, $5 shipping charges and the total cost of the order. ​

Name the table as WALMARTPRICE.

The table should look like this:
Picture
Next
Already a member? Go to member's area.