Back to Browse

Mastering Self-Joins in SQL and Pandas | LeetCode 181 Solution

22 views
Apr 9, 2026
3:46

In this video, we solve LeetCode 181: Employees Earning More Than Their Managers. This is a classic interview question that tests your understanding of Self-Joins. - SQL: How to perform a Self-Join to compare a table against itself. Linking the managerId from one instance of the table to the id of another. - Pandas: Using the .merge() function on a single DataFrame to align employees with their managers. ⏱️ Timestamps: 0:00 - Intro 0:42 - SQL Solution 1:39 - Python Pandas Solution Check out my Playlist: https://www.youtube.com/playlist?list=PLGT-z9cVth9mua-HvnqhN2FQTisyZjQ4B Check out study material on GitHub (downloadable in .PDF): https://github.com/TetyanaHvozda/SQL-vs-Pandas-Study-Material-for-LeetCode-Problems/blob/main/SQL%20vs%20Pandas%20LeetCode%20EASY.ipynb 💡 Subscribe for more LeetCode deep dives and FAANG prep! www.youtube.com/@datahead_girl #leetcode #sql #python #pandas #dataanalytics #interviewprep #datascience #coding

Download

0 formats

No download links available.

Mastering Self-Joins in SQL and Pandas | LeetCode 181 Solution | NatokHD