Questions (1,4,5,16,17,19,20,21) .For each order, the database must store the or
ID: 3704193 • Letter: Q
Question
Questions (1,4,5,16,17,19,20,21)
.For each order, the database must store the order number, the part number, the number of units ordered, and the quoted price for each order line. The part description is stored with the information about parts. The result of multiply- ing the number of units ordered by the quoted price is not stored because the computer can calculate it when needed. .The overall order total is not stored. Instead, the database calculates the total whenever an order is printed or displayed on the screen. Figure 1-2 shows sample data for Premiere Products. REP REP LAST FIAST STREET CITY STATE ZIP COMMISSION RATE NUM NAME NAME 20 Kaiser Valerie 624 Randall Grove FL 35 Hull Richard 532 JacksonSheldon FL 33321$20,542.50 0.05 33553$39,216.00 0.07 65 Perez Juan1626 Taykor Fillmore FL 3333$23,487.00.05 CUSTOMER CUSTOMER STREET STATE ZIP BALANCE CREDIT REP LIMIT NUM 148 Al's Appliance 2837 Fillmore FL33336$6,550.00 $7,300.00 20 and Sport Greenway Brookings 3827 Devon Grove FL 33321 431.50 $10,000.00 35 Ferguson's 382 Wildwood Northfield FL 33146 $5,783.00 $7,300.00 63 282 56 The 1828 Raven Crystal FL 33503 $5,283.25 $5,000.00 35 Shop 462 3829 Central Grove FL 33321 $3,412.00 $10,000.00 65 524 Kline's 838 Ridgeland Fillmore FL 33336 $12,762.00$15,000.00 20 372 Oxford Sheldon FL 33553 $2,106.00 $10,000.00 65 Johnson's Store 687 Lee's Sport 282 Evengreen Altonville FL 32343 $2,851.00 $5,000.00 33 and Appliance 725 Deerfield's 282 Columbia Sheldon FL 33553 $248.00$7,500.00 35 Four Seasons AIl 28 Lakevlew FIGURE 1-2 Sample data for Premiere ProductsExplanation / Answer
1.
Select part_num,description ,price from part;
4.
Select order_num from orders where customer_num = 148 and order_date = '10/20/2007';
5.
Select customer_num,customer_name from customer where rep_num = 35 or rep_num = 65;
16.
Select part_num ,description,on_hand from part where on_hand >(Select avg(on_hand) from part);
17.
Select max(price) from Part;
19.
Select sum(balance) from customer group by rep_num order by rep_num;
20.
Select sum(balance) from customer group by rep_num having sum(balance) > 10000 order by rep_num;
21.
Select part_num frpm part where description IS NULL;
Do ask if any doubt. Please upvote.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.