PostgreSQL - Joins in PostgreSQL
Consider this query intended to find pairs of employees who share the same manager:
What is the main issue with this query?
SELECT e1.name, e2.name FROM employees e1 JOIN employees e2 ON e1.manager_id = e2.manager_id WHERE e1.id != e2.id;
What is the main issue with this query?
