Schema for SaleCo company database, VENDOR (V-NAME, V CONTACT, V-STATE, V-ORDER)
ID: 3575792 • Letter: S
Question
Schema for SaleCo company database, VENDOR (V-NAME, V CONTACT, V-STATE, V-ORDER) PROOUCT (P_CODE, P_DESCRIPT, P_INDATE, P_QOM, P_MIN, P_PRICE, V_CODE) INVOICE (INV_NUMBER, CUS_CODE, INV_DATE) LINE (INV NUMBER, LINE NUMBRE, P_CODE, LINE_UNITS, LINE_PRICE) CUSTOMER (CUS_CODE, CUS_LNAME, CUS_FNAME, CUS_BALANCE) Finish the following SQL statements. What is the maximum value of P_PRICE ? How much is the total customer balance? What products have a price that exceeds the average product price? List the number of products by vendor, include only the rows with average price below 10.00.Explanation / Answer
Answers:
(a) select max(P_PRICE) from PRODUCT
(b) select sum(CUS_BALANCE) AS TOTBALANCE from CUSTOMER
(c) select P_CODE, P_DESCRIPTION, P_PRICE from PRODUCT where P_PRICE>(select AVG(P_PRICE) from PRODUCT)
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.