Question: Create a SQL query that gets the order ID, order_mode, customer ID and product ID from the ORDERS and ORDER_ITEMS tables. You will have to

Create a SQL query that gets the order ID, order_mode, customer ID and product ID from the ORDERS and ORDER_ITEMS tables. You will have to join the tables on some common column.

Two Table Join With Subquery

Modify the previous query and add a subquery that looks for the existence of a customer ID in the CUSTOMERS table. This is a correlated sub-query so you will have to match the customer ID from the sub-query to the customer ID in the outer query.

Three Table Join with Subquery

Modify the previous SQL query the add the translated name column from the PRODUCT_DESCRIPTIONS table.

Tables:

Customer Table

Create a SQL query that gets the order ID, order_mode, customer ID

ORDERS Table

and product ID from the ORDERS and ORDER_ITEMS tables. You will have

ORDER_ITEMS table

to join the tables on some common column. Two Table Join With

PRODUCT_DESCRIPTION Table

Subquery Modify the previous query and add a subquery that looks for

Column Data Type Length Precision Scale Nullable CUSTOMER ID CUST FIRST NAME VARCHAR2 CUST LAST NAME VARCHAR2 STREET ADDRESS POSTAL_CODE CITY STATE PROVINCE COUNTRY ID PHONE_NUMBER NUMBER 0 No 20 20 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 CHAR VARCHAR2 VARCHAR2 VARCHAR2 NUMBER VARCHAR2 NUMBER es 30 25 es NLS LANGUAGE es NLS TERRITORY CREDIT LIMIT CUST EMAIL ACCOUNT_ MGR ID 30 30 es

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!