PrepZone Logo
PrepZone
Back to Database

Database · Medium

Find employees who earn more than their manager.

DatabaseSQL QueriesFresherJoins

Answer preview

Self-join employees to itself on e.manager_id = m.emp_id and compare the two salary columns.…