2. What are the full names of all vendors who can supply more than one item or a
ID: 3832805 • Letter: 2
Question
2. What are the full names of all vendors who can supply more than one item or are based in Illinois?
vendor table:
Name Null? Type
----------------------------------------- -------- ----------------------------
VENDOR_ID NOT NULL NUMBER(10)
NAME VARCHAR2(30 CHAR)
Address table:
Name Null? Type
----------------------------------------- -------- ----------------------------
VENDOR_ID NOT NULL NUMBER(10)
STREET_NO NOT NULL NUMBER(10)
STREET_NAME NOT NULL VARCHAR2(30 CHAR)
ZIP_CODE NUMBER(10)
STATE_TERRITORY_PROVINCE VARCHAR2(30 CHAR)
COUNTRY NOT NULL VARCHAR2(20 CHAR)
can_supply table:
Name Null? Type
----------------------------------------- -------- ----------------------------
VENDOR_ID NOT NULL NUMBER(10)
PRODUCT_ID NOT NULL NUMBER(10)
Explanation / Answer
Answer:
Please find the required query as follows:
Select V.Name
From [Vendor] V Inner join [Address] A on A.Vendor_Id = V.Vendor_Id
Where (Select count(*) From Can_Suppy C Where C.Vendor_Id = V.Vendor_Id) > 1
OR A.Country = 'lllinois'
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.