ITSS 4300 - Lab 4 Using the script file provided, write and execute the followin
ID: 3919817 • Letter: I
Question
ITSS 4300 - Lab 4 Using the script file provided, write and execute the following queries. Write the query in this document and provide a screen shot of the results 1. Provide a list of customers who have not purchased an invoice. Display the customer code, their last name and their first name. Sort by cuscode in ascending order CUS_CODE CUS_LNAME CUS FNAME 10013 lowski Paul 1e017 Williams George 1ee1e 10016 10019 Ramas Brown Smith Alfred James olette Download CSV 5 rows selected SELECT CUS_CODE, CUS_LNAME, CUS_FNAME FROM CUSTOMER WHERE CUS_CODE NOT IN (SELECT CUS_CODE FROM INVOICE WHERE CUs_CODE IS NOT NULL) ORDER BY CUS_CODE ASC CUS_CODE CUS_LNAME CUS FNAME 10010 Ramas 10013 Olowski Paul 10016 1e017Williams George 18019 Smith Alfred Brown ames olette 2. What is the average price of all invoices? Round to 2 decimal places. Add a column alias for the column nameExplanation / Answer
The query you have provided in 2 is incorrect as you don't have to group the results by INV_NUMBER.
The correct query is given below.
SELECT (ROUND(AVG(LINE_PRICE), 2)) AS "Average Invoice Price" FROM LINE;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.