You are on page 1of 5

Assignment 6

:
1.SELECT CustomerNum, CustomerName FROM Customer;

CustomerNum CustomerName 148 Al's Appliance and Sport 282 Brookings Direct 356 Ferguson's 408 The Everything Shop 462 Bargains Galore 524 Kline's 608 Johnson's Department Store 687 Lee's Sport and Appliance 725 Deerfield's Four Seasons 842 All Season
2. SELECT * FROM Part;

PartNum Description OnHand Class Warehouse Price AT94 Iron 50 HW 3 $24.95 BV06 Home Gym 45 SG 2 $794.95 CD52 Microwave Oven 32 AP 1 $165.00 DL71 Cordless Drill 21 HW 3 $129.95 DR93 Gas Range 8 AP 2 $495.00 DW11 Washer 12 AP 3 $399.99 FD21 Stand Mixer 22 HW 3 $159.95 KL62 Dryer 12 AP 1 $349.95 KT03 Dishwasher 8 AP 3 $595.00 KV29 Treadmill 9 SG 2 $1,390.00
3. SELECT CustomerNum, CustomerName FROM Customer WHERE RepNum='35';

CustomerNum CustomerName 282 Brookings Direct 408 The Everything Shop 687 Lee's Sport and Appliance 725 Deerfield's Four Seasons

SELECT OrderNum. CustomerNum CustomerName 282 Brookings Direct 5. Rep WHERE Customer.CustomerNum.CustomerNum.4. Customer WHERE Orders. CustomerName FROM Orders.CustomerNum=Customer.RepNum=Rep. CustomerName FROM Customer. CustomerNum CustomerName 282 Brookings Direct 408 The Everything Shop 462 Bargains Galore 608 Johnson's Department Store 687 Lee's Sport and Appliance 725 Deerfield's Four Seasons 6.RepNum . CustomerName FROM Customer WHERE RepNum='35' OR CreditLimit=10000. OrderDate. CustomerName FROM Customer WHERE RepNum='35' AND CreditLimit=10000. SELECT CustomerNum. Orders. OrderNum OrderDate CustomerNum CustomerName 21608 10/20/2013 148 Al's Appliance and Sport 21619 10/23/2013 148 Al's Appliance and Sport 21614 10/21/2013 282 Brookings Direct 21610 10/20/2013 356 Ferguson's 21613 10/21/2013 408 The Everything Shop 21617 10/23/2013 608 Johnson's Department Store 21623 10/23/2013 608 Johnson's Department Store 7. SELECT CustomerNum. SELECT CustomerNum.

OnHand * Price FROM Part WHERE Class='HW'. Expr1000 2 9. Access: SELECT COUNT(*) FROM Orders WHERE OrderDate=#10/20/2013#.95 FD21 Stand Mixer 3518.75 10. Expr1000 $8.5 DL71 Cordless Drill 2728.AND LastName='Perez' AND FirstName='Juan'. Description. PartNum Description Expr1002 AT94 Iron 1247. . CustomerNum CustomerName 356 Ferguson's 462 Bargains Galore 608 Johnson's Department Store 8.9 11.815. SELECT * FROM Part ORDER BY Description. SELECT COUNT(*) FROM Orders WHERE OrderDate='20-OCT-2013'. SELECT SUM(Balance) FROM Customer WHERE RepNum='35'. SELECT PartNum.

00 BV06 Home Gym 45 SG 2 $794.95 FD21 Stand Mixer 22 HW 3 $159.00 DR93 Gas Range 8 AP 2 $495.95 KT03 Dishwasher 8 AP 3 $595.95 KV29 Treadmill 9 SG 2 $1.00 FD21 Stand Mixer 22 HW 3 $159. OnHand. SELECT PartNum. SELECT Class. Description.00 AT94 Iron 50 HW 3 $24.95 AT94 Iron 50 HW 3 $24.390.PartNum Description OnHand Class Warehouse Price DL71 Cordless Drill 21 HW 3 $129. Warehouse.95 CD52 Microwave Oven 32 AP 1 $165.95 DR93 Gas Range 8 AP 2 $495. PartNum Description OnHand Class Warehouse Price CD52 Microwave Oven 32 AP 1 $165.99 KL62 Dryer 12 AP 1 $349.95 DL71 Cordless Drill 21 HW 3 $129. SELECT * FROM Part ORDER BY Class.00 DW11 Washer 12 AP 3 $399.00 DW11 Washer 12 AP 3 $399. Price INTO SportingGoods . PartNum.95 KV29 Treadmill 9 SG 2 $1.00 13.95 BV06 Home Gym 45 SG 2 $794.00 KL62 Dryer 12 AP 1 $349. SUM(OnHand) FROM Part GROUP BY Class.95 KT03 Dishwasher 8 AP 3 $595.99 12.390. Class Expr1001 AP 72 HW 93 SG 54 14.

DELETE FROM SportingGoods WHERE Price>1000. 16. UPDATE SportingGoods SET Description='Fitness Gym' WHERE PartNum='BV06'. 15.FROM Part WHERE Class='SG'. .