SELF JOIN
SELECT with a self JOIN
In this exercise we will query the orders table using a self JOIN.
SELECT a.employee_id AS employee_id_1,b.employee_id AS employee_id_2,a.customer_idFROM orders a,orders bWHERE a.employee_id <> b.employee_idAND a.customer_id=b.customer_idORDER BY a.employee_id;Run in terminal
The query should return 8,704 rows.