Question
Use the db_pvfc12_big database in Teradata SQL Assistant. Create a .SQL file that provides queries to the following Problems in the textbook: 15) 5-74. For
Use the db_pvfc12_big database in Teradata SQL Assistant. Create a .SQL file that provides queries to the following Problems in the textbook:
15) 5-74. For each payment made on or after March 10, 2010, list PaymentID, OrderID,
PaymentAmount, and the first 10 characters of PaymentComment.
21) 5-81. For employees who live in TN or FL, list the age at which they were hired.
22) 5-82. Measured by average standard price, what is the least expensive product finish?
29) 5-89. For each customer, list the customer ID, the number of orders from that customer, and the ratio of the number of orders from that customer to the total number of orders from all customers combined. (This ratio, of course, is the percentage of all orders placed by each customer.)
Book Pine Valley Furniture Company (PVFC) Datasets
Customer_T
CustomerID, CustomerName, CustomerAddress, CustomerCity, CustomerState, CustomerPostalCode
1, 'Contemporary Casuals', '1355 S Hines Blvd', 'Gainesville', 'FL', '32601-2871'
2, 'Value Furniture', '15145 S.W. 17th St.', 'Plano', 'TX', '75094-7743'
3, 'Home Furnishings', '1900 Allard Ave.', 'Albany', 'NY', '12209-1125'
4, 'Eastern Furniture', '1925 Beltline Rd.', 'Carteret', 'NJ', '07008-3188'
5, 'Impressions', '5585 Westcott Ct.', 'Sacramento', 'CA', '94206-4056'
6, 'Furniture Gallery', '325 Flatiron Dr.', 'Boulder', 'CO', '80514-4432'
7, 'Period Furniture', '394 Rainbow Dr.', 'Seattle', 'WA', '97954-5589'
8, 'California Classics', '816 Peach Rd.', 'Santa Clara', 'CA', '96915-7754'
9, 'M and H Casual Furniture', '3709 First Street', 'Clearwater', 'FL', '34620-2314'
10, 'Seminole Interiors', '2400 Rocky Point Dr.', 'Seminole', 'FL', '34646-4423'
11, 'American Euro Lifestyles', '2424 Missouri Ave N.', 'Prospect Park', 'NJ', '07508-5621'
12, 'Battle Creek Furniture', '345 Capitol Ave. SW', 'Battle Creek', 'MI', '49015-3401'
13, 'Heritage Furnishings', '66789 College Ave.', 'Carlisle', 'PA', '17013-8834'
14, 'Kaneohe Homes', '112 Kiowai St.', 'Kaneohe', 'HI', '96744-2537'
15, 'Mountain Scenes', '4132 Main Street', 'Ogden', 'UT', '84403-4432'
Order_T.
OrderID, OrderDate, CustomerID
1001, '21/Oct/10', 1
1002, '21/Oct/10', 8
1003, '22/Oct/10', 15
1004, '22/Oct/10', 5
1005, '24/Oct/10', 3
1006, '24/Oct/10', 2
1007, '27/Oct/10', 11
1008, '30/Oct/10', 12
1009, '05/Nov/10', 4
1010, '05/Nov/10', 1
Product_T.
ProductID, ProductDescription, ProductFinish, ProductStandardPrice, ProductLineID
1, 'End Table', 'Cherry', 175, 1
2, 'Coffee Table', 'Natural Ash', 200, 2
3, 'Computer Desk', 'Natural Ash', 375, 2
4, 'Entertainment Center', 'Natural Maple', 650, 3
5, 'Writers Desk', 'Cherry', 325, 1
6, '8-Drawer Desk', 'White Ash', 750, 2
7, 'Dining Table', 'Natural Ash', 800, 2
8, 'Computer Desk', 'Walnut', 250, 3
OrderLine_T.
OrderID, ProductID, OrderedQuantity
1001, 1, 2
1001, 2, 2
1001, 4, 1
1002, 3, 5
1003, 3, 3
1004, 6, 2
1004, 8, 2
1005, 4, 4
1006, 4, 1
1006, 5, 2
1006, 7, 2
1007, 1, 3
1007, 2, 2
1008, 3, 3
1008, 8, 3
1009, 4, 2
1009, 7, 3
1010, 8, 10
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started