Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SQL vendor V_CODE INT(11) V_NAME VARCHAR(35) V_CONTACT VARCHAR(15) V_AREACODE CHAR(3) V_PHONE CHAR(8) V_STATE CHAR(2) V_ORDER CHAR(1) Indexes customer CUS_CODE INT(11) CUS_LNAME VARCHAR(15) CUS_FNAME VARCHAR(15) CUS_INITIAL
SQL
vendor V_CODE INT(11) V_NAME VARCHAR(35) V_CONTACT VARCHAR(15) V_AREACODE CHAR(3) V_PHONE CHAR(8) V_STATE CHAR(2) V_ORDER CHAR(1) Indexes customer CUS_CODE INT(11) CUS_LNAME VARCHAR(15) CUS_FNAME VARCHAR(15) CUS_INITIAL CHAR(1) CUS AREACODE CHAR(3) CUS_PHONE CHAR(8) CUS_BALANCE DECIMAL(9,2) CUS_PPBAL DECIMAL(9,2) Indexes product P_CODE VARCHAR(10) P_DESCRIPT VARCHAR(35) P_INDATE DATETIME P_QOH INT(11) P_MIN INT(11) P_PRICE DECIMAL(8,2) P_DISCOUNT DECIMAL(4,2) V_CODE INT(11) PREORDER INT(11) Indexes + line INV_NUMBER INT(11) LINE_NUMBER DECIMAL(2,0) P_CODE VARCHAR(10) LINE_UNITS DECIMAL(9,2) LINE_PRICE DECIMAL(9,2) Indexes Triggers invoice INV_NUMBER INT(11) CUS_CODE INT(11) INV_DATE DATETIME Indexes List the first name of each customer in alphabetical order (i.e. A-Z) along with the total money they spent on all products. Filter your results so that only customers having exactly 5 characters in their first names and who spent over 200 dollars are displayed. Your output should match the output shown below: CUS_FNAME Total Money Spent Leona 488.9700 Myron 422.7700 Required: GROUP BY HAVING ORDER BY SUMStep 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