Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Exercises Premiere Products and the Premiere Products database (see Figure 1-2 i

ID: 3699087 • Letter: E

Question

Exercises Premiere Products and the Premiere Products database (see Figure 1-2 in Chapter 1) to complete the MySQlse Use the notes at the end of Chapter 3 to print your output if directed to do so Use by your instructor 125 List the part number, description, and price for all parts. 1. tall rows and columns for the complete ORDERS table. 2. List List the names of customers with credit limits of $7,500 or less. 3. order number for each order placed by customer number 148 on 10/20/2007.(Hint 4. List the If you need help, use the discussion of t he DATE data type in Figure 3-11 in Chapter 3.) the number and name of each customer represent 5. List . List the part number and part description of each part that is not in item class SG. . List the part number, description, and number of units on hand for each part that has ed by sales rep 35 or sales rep 65. between 10 and 25 units on hand, including both 10 and 25. Do this two ways. B. List the part number, part description, and on-hand value (units on hand unit price) of each part in item class AP. (On-hand value is really units on hand cost, but there is no COST col- umn in the PART table.) Assign the name ON HAND_VALUE to the computation. List the part number, part description, and on-hand value for each part whose on-hand value is at least $7,500. Assign the name ON_ HAND_VALUE to the computation. Use the IN operator to list the part number and part description of each part in item class AP or SG. 9. o. 11. Find the number and name of each customer whose name begins with the letter "K 12. List all details about all parts. Order the output by part description. 13. List all details about all parts. Order the output by part number within item class. (That is, order the output by item class and then by part number.) How many customers have balances that are more than their credit limits? Find the total of the balances for all customers represented by sales rep 65 with balances that are less than their credit limits 14. 15. 6. List the part number, part description, and on-hand value of each part whose number of units on hand is more than the average number of units on hand for all parts. (Hint: Use a subquery.) 7. What is the price of the most expensive part in the database? 8. What is the part number, description, and price of the most expensive part in the database? (Hint: Use a subquery.) List the sum of the balances of all customers for each sales rep. Order and group the results by sales rep number. List the sum of the balances of all customers for each sales rep, but restrict the output to hose sales reps for which the sum is more than $10,000. ist the part number of any part with an unknown description.

Explanation / Answer

Answer)

Table Structures should have been included for all the tables. We will consider the tables according to the questions. Please change the tables according to the real names.

Premiere Products: Exercises:

1. List part number, description, price for all parts.

select part_number, description, price from parts;

This is a simple query to list out all the part number, description, price for all parts using SQL.

2. List all rows and columns for the complete orders table.

select * from orders;

We select all items, rows and column from the order table.

3. List names of customers with credit limits of $7500 or less.

select customer_name from customer where credit_limit <= 7500;

Simple quert to list out the names of customers with credit limits of $7500 or less

4. List the order number for each order places by customer number 148 on 10/20/2017.

select order_number from orders where customer_number = 148 and order_date='2017-10-20';

This is simple query where the order_number is selected for orders where customer number 148 and order date is 10/20/2017.

These are all simple queries where the table names and column names are imagined. If you have any more queries, please rate and comment. Thanks.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote