Find Employees Whose Salary Higher Than Their Manager Salary in SQL | Self Join in SQL

preview_player
Показать описание
This channel would provide new videos on SQL, ETL and Data warehouse concepts. I would create a separate play list for SQL Tutorials for beginners, advanced concepts, Interview questions and data warehousing concepts

Facebook Page:

Youtube Channel:
Рекомендации по теме
Комментарии
Автор

Very good example of table joins... Good work bro!!!

parmindersingh
Автор

Select e.id, e.name, e.sal as emp sal, m.sal as mgr sal from table e, table m
Where e.id= m.id and e.sal>m.sal;

SathishKumar-qrjj
Автор

select a.empid, a.empname, a.salary, b.salary from
emptable A
join
emptable b
on a.managerid =b.empid
and a.salary >b.salary

vijay.s-llyq
Автор

How to join 2 tables and get nth highest salary..

jayanthjay
Автор

what happens if we use E.empidid = M.managerid?

praveenreddy