Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

image text in transcribed

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 last name of a customer, along with the total number of unique products they have ever purchased. (Hint: Quantity of a product is not required, just the total count of unique products) Required: COUNT DISTINCT GROUP BY

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago

Question

=+derived from the assignment will balance the costs?

Answered: 1 week ago