Which of the query in SQL is an example of self-join? I. SELECT a.column_name FROM table1 a, table1 b WHERE a.x = b.x; II. SELECT b.column_name FROM table1 a, table2 b WHERE a.y = b.y;
Example: self join example
SELECT
e.first_name + ' ' + e.last_name employee,
m.first_name + ' ' + m.last_name manager
FROM
sales.staffs e
INNER JOIN sales.staffs m ON m.staff_id = e.manager_id
ORDER BY
manager;