Question
SQL queries: 1. A. Find the name and phone number of each vendor who has a cooperating vendor. Hint: the vendors for whom the field
SQL queries:
1. A. Find the name and phone number of each vendor who has a cooperating vendor. Hint: the vendors for whom the field Cooperating_Vendor_id is not empty
B. Now find additionally the name and phone number of the cooperating vendor. Present these two columns as: cooperating vendor and cooperating vendor phone.
C. Modify the above query to report all vendors. If they are have a cooperating vendor, report their name if not report N/A.
2. A. Find the order date for all the orders of customers who leave in Los Angeles using joins
B. Repeat the same query this time using non-correlated subqueries
C. Repeat the same query this time using correlated subqueries with the IN statement D. Repeat the same query this time using WHERE EXISTS
VENDOR_CONTACTS 1 VENDOR_ID LAST_NAME FIRST_NAME VENDORT VENDORS I VENDOR_ID I VENDOR_NAME 1 VENDOR_ADDRESS1 0 VENDOR_ADDRESS2 | VENDOR_CITY 1 VENDOR_STATE - VENDOR_ZIP_CODE I VENDOR_PHONE 1 VENDOR_CONTACT_LAST_NAME O VENDOR_CONTACT_FIRST_NAME - DEFAULT_TERMS_ID DEFAULT_ACCOUNT_NUMBER O COOPERATING_VENDOR_ID CUSTOMERS O CUSTOMER_ID 1 CUSTOMER_FIRST_NAME 1 CUSTOMER_LAST_NAME - CUSTOMER_ADDRESS - CUSTOMER_CITY 1 CUSTOMER_STATE 1 CUSTOMER_ZIP 1 CUSTOMER_PHONE CUSTOMER_FAX CUSTOMERSHIPADDRESS_T DOESBUSINESSIN_T EMPLOYEE_T EMPLOYEESKILLS_T GENERAL_LEDGER_ACCOUNTS INVOICE_LINE_ITEMS INVOICES ITEMS ORDER_DETAILS ORDER_T ORDERLINE_T ORDERS 11 ORDER_ID 1 CUSTOMER_ID - ORDER_DATE 1 SHIPPED_DATEStep 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