Deloitte SQL Interview Question 2024 | Find the top 3 highest-paid employees in each department

  Рет қаралды 25,961

Skill Techath0n

Skill Techath0n

Күн бұрын

Пікірлер: 11
@NafisAnsari-vr2xq
@NafisAnsari-vr2xq 19 күн бұрын
Great Video, Just went through your channel and the idea of tackling interview questions like this is great. Thanks, you just got a sub💯
@ಅಜಯಕನ್ನಡಿಗ-ಪ4ಫ
@ಅಜಯಕನ್ನಡಿಗ-ಪ4ಫ 19 күн бұрын
thank you sir for explaining step by step😊😊
@RAHULEDITZS
@RAHULEDITZS Ай бұрын
MY ANSWER FOR 1ST QUE AND TQ BRO select distinct(EE.Salary),concat(EE.FirstName,'',EE.LastName) as Full_name,DD.DepartmentName FROM department DD Join employee EE on DD.DepartmentID=EE.DepartmentID group by concat(EE.FirstName,'',EE.LastName),DD.DepartmentName,EE.Salary order by DD.DepartmentName, EE.Salary DESC LIMIT 9;
@skilltechath0n
@skilltechath0n 26 күн бұрын
@RAHULEDITZS Great! Keep learning :)
@varmakvm4812
@varmakvm4812 2 ай бұрын
Hi, In first question while finding the top 3 employees within each department, dense_rank() would be appropriate one because it will handle tie values without skipping the ranking rather than row_number IMO. Thank you for the constant motivation through SQL Questions ! Looking for more ...
@skilltechath0n
@skilltechath0n 2 ай бұрын
Yes, definitely if the interviewer asked us to provide the same rank for duplicate values. Thanks for mentioning it 👍
@parthchauhan9305
@parthchauhan9305 2 ай бұрын
On the contrary, using dense_rank may give us more than 3 values (if there are ties), rather we only need to find top 3 highest paid employees (3 rows), row_number will always ensure that we get only 3 rows in the result set.
@sambasivaraonelluri
@sambasivaraonelluri Ай бұрын
MY answer 2 qst :SELECT AVG(salary) AS avg_salary_hired_last_5_years FROM employee_data WHERE hire_year BETWEEN 2019 AND 2024;
@skilltechath0n
@skilltechath0n 26 күн бұрын
@sambasivaraonelluri Nice. Keep practicing :)
@sambasivaraonelluri
@sambasivaraonelluri Ай бұрын
1 st question answer: WITH RankedEmployees AS ( SELECT employee_id, salary, department, ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC) AS rank FROM employee_data ) SELECT employee_id, salary, department FROM RankedEmployees WHERE rank
@skilltechath0n
@skilltechath0n 26 күн бұрын
@sambasivaraonelluri Great! Keep learning :)
Capgemini SQL Interview Question 2024 | Transform Rows Into Columns
5:16
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Learn English quickly with podcast | English learning Conversation | Episode 1
18:01
English Podcast Zone
Рет қаралды 1,5 МЛН
Learn 12 Basic SQL Concepts in 15 Minutes (project files included!)
16:48
Top 25 SQL Server Interview Questions - .NET C#
1:06:04
Interview Happy
Рет қаралды 122 М.
Querying 100 Billion Rows using SQL, 7 TB in a single table
9:07
Arpit Agrawal (Elastiq.AI)
Рет қаралды 59 М.
Walmart SQL Interview Question | SQL Window Functions | Advanced
11:31
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН