LeetCode Medium 177 "Nth Highest Salary" Amazon Bloomberg Interview SQL Question With Explanation

  Рет қаралды 4,875

Everyday Data Science

Everyday Data Science

Күн бұрын

Question: leetcode.com/p...
In this video I solve and explain a medium difficulty leetcode SQL question using MySQL query. This question has been asked in Apple, Facebook, Amazon, Google, Adobe, Microsoft, Adobe interviews or what we popularly call FAANG interviews.
I explain the related concept as well. This question includes points to keep in mind to develop SQL queries.
LeetCode is the best platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.
If you found this helpful, Like and Subscribe to the channel for more content.
#LeetCodeSQL #FAANG #SQLinterviewQuestions

Пікірлер: 6
@jeroldmorphy3764
@jeroldmorphy3764 Жыл бұрын
man you are wonderful. You are the only I guy I have seen that writes FROM before SELECT, which is how it should be
@devsagar5812
@devsagar5812 3 ай бұрын
Alternative if interviewer ask to not to use windows functions: CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN SET N = N-1; RETURN ( # Write your MySQL query statement below. select distinct salary from Employee order by salary desc limit 1 offset N ); END
@tejaswaniguttula5961
@tejaswaniguttula5961 3 ай бұрын
@devsagar can you tell how it works fine with this test case?? | id | salary | | -- | ------ | | 1 | 100 | | 2 | 100 |
@needoa487
@needoa487 Жыл бұрын
can you explain why u write in code where rnk = n
@minakshi_119
@minakshi_119 Жыл бұрын
n could be anything 1,2,3, and rnk is the name given to over(order by sal desc)
LeetCode Medium 178 Amazon Interview SQL Question with Detailed Explanation
6:13
Everyday Data Science
Рет қаралды 2,8 М.
When you discover a family secret
00:59
im_siowei
Рет қаралды 35 МЛН
АЗАРТНИК 4 |СЕЗОН 1 Серия
40:47
Inter Production
Рет қаралды 1,3 МЛН
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 219 М.
LeetCode 177: Nth Highest Salary [SQL]
6:40
Frederik Müller
Рет қаралды 23 М.
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
How I'd Learn Data Analytics in 2024 (If I Had to Start Over)
14:08
CareerFoundry
Рет қаралды 801 М.
What does a Data Analyst actually do? (in 2024) Q&A
14:27
Tim Joo
Рет қаралды 56 М.