Sentry Page Protection
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:
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.
Task 1
Write a Proc SQL step to compute the subtotal for each items. The query result should look like this:
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: