SESSION NAME: Joins and Unions-2.
QUESTION NAME: Join Two Tables.
TABLE DESCRIPTION:
Write a Query to Join the following tables
Table 1 = Difficulty
Table 2 = Departments
Hint: Use Union to add both the tables.
Table 1 = Difficulty
Table 2 = Departments
Hint: Use Union to add both the tables.
CODE:
select customers.customerid, customers.firstname, customers.lastname, items_ordered.item, items_ordered.price from customers JOIN items_ordered ON customers.customerid = items_ordered.customerid;
0 Comments