No video

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

  Рет қаралды 11,475

SQL With RaviMartha

SQL With RaviMartha

4 жыл бұрын

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
Feel free to drop me an email at sql.ravimartha@gmail.com in case of any queries you have in SQL or clarifications on the videos I have done :)
Blog: sqlwithravimar...
Video 13: Find Employees With Salary Lower Than Their Department Average in SQL --* • Find Employees With Sa...
Blog: sqlwithravimar...
Video 12: Import Tables from one Server to another Using SSMS | Import tables using SQL Query in SSMS --* • Import Tables from one...
Blog: sqlwithravimar...
Video 11: Table Variables in SQL Server | Pound Tables | Table Variable in SQL | Table Variable in Tempdb --* • Table Variables in SQL...
Blog: sqlwithravimar...
Video 10: Quick Practical onTemporary tables in SQL Server | Temp Tables in SQL | Local Temp Table | Global Temp Table--* • Quick Practical on Tem...
Blog: sqlwithravimar...
Video 9: Temporary tables in SQL Server | Temp Tables in SQL | Local Temp Table | Global Temp Table -- * • Temporary tables in SQ...
Blog: sqlwithravimar...
Video 8: Running total & Avg in SQL | Cumulative Sum & Avg in SQL | Calculating running total & Avg in SQL -- * • Running total & Avg in...
sqlwithravimar...
Video 7 Title: Length Vs DataLength Vs ColumnLength | Len() | DataLength() | Col_Length | Column length in SQL -- * • Length Vs DataLength V...
sqlwithravimar...
Video 6 Title: Tricky CASE Statement Interview Questions | CASE WHEN | WHEN Clause | CASE Statement in SQL -- * • Tricky CASE Statement ...
sqlwithravimar...
Video 5 Title: Delete Duplicates in SQL by retaining one Unique record | Row Duplicates | Business Key Duplicates -- * • Delete Duplicates in S...
sqlwithravimar...
Video 4 Title: Difference between TRUNCATE, DELETE and DROP -- * • Difference between TRU...
sqlwithravimar...
Video 3 Title: Sorting in SQL | Order By | Conditional Sorting| Unusual Sorting -- * • Sorting in SQL | Order...
sqlwithravimar...
Video 2 Title: Difference between Primary Key and Unique Key -- * • Difference between Pri...
sqlwithravimar...
Video 1 Title: Logical Processing of SELECT Statement -- * • Logical Processing of ...
sqlwithravimar...
Blog: sqlwithravimar...
Facebook Page:
/ sql-with-ravimartha-10...
/ etl-dwh-testing-100494...
KZbin Channel:
/ @sqlwithravimartha6357

Пікірлер: 12
@SathishKumar-qr2jj
@SathishKumar-qr2jj 2 жыл бұрын
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;
@sqlwithravimartha6357
@sqlwithravimartha6357 Жыл бұрын
Hi Sathish, we should join the mgrid from employee table with empid of employee table. Thus we are trying to lookup mgrid from emplyee table and pick up manager salary for comparision. The query you have provided will search employee id with it self. Select e.id,e.name,e.sal as emp sal ,m.sal as mgr sal from table e,table m Where e.mgrid= m.id and e.sal>m.sal;
@parmindersingh6267
@parmindersingh6267 4 жыл бұрын
Very good example of table joins... Good work bro!!!
@sqlwithravimartha6357
@sqlwithravimartha6357 4 жыл бұрын
Thank you very much
@vsagar4b38
@vsagar4b38 8 ай бұрын
Super
@vijay.s-ll1yq
@vijay.s-ll1yq 3 ай бұрын
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
@jayanthjay1050
@jayanthjay1050 2 жыл бұрын
How to join 2 tables and get nth highest salary..
@sqlwithravimartha6357
@sqlwithravimartha6357 Жыл бұрын
you mean does both tables have same structure?
@susheelsingh1716
@susheelsingh1716 4 жыл бұрын
Good. Keep it up.
@sqlwithravimartha6357
@sqlwithravimartha6357 4 жыл бұрын
Thank you Susheel, will do my best :)
@praveenreddy1767
@praveenreddy1767 2 жыл бұрын
what happens if we use E.empidid = M.managerid?
@sqlwithravimartha6357
@sqlwithravimartha6357 2 жыл бұрын
it pick employees (M.Manager) who are reporting to that employee (E.empid)
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 22 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 18 МЛН
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 2,4 МЛН
SQL Query | How to find employees with highest salary in a department
10:38
SQL Self Join: Querying Employees with Higher Salary than Their Managers
10:18
SRTechnologies Ravindra Reddy
Рет қаралды 1,2 М.
SQL Query Optimization | SQL Query Optimization and performance tuning
10:16
How to find and remove Duplicate values from table. Session 3
20:31
Sunny Database Tech
Рет қаралды 12 М.
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 22 МЛН