Question: Two Table Join 1. Create a SQL query that gets the order ID, order_mode, customer ID and proeduct ID from the ORDERS and ORDER_ITEMS tables.

Two Table Join

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

Two Table Join With Subquery

2. 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

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

Tables:

Customer Table

Two Table Join 1. Create a SQL query that gets the order

ORDERS Table

ID, order_mode, customer ID and proeduct ID from the ORDERS and ORDER_ITEMS

ORDER_ITEMS table

tables. You will have to join the tables on some common column.

PRODUCT_DESCRIPTION Table

Two Table Join With Subquery 2. Modify the previous query and add

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!