- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
MSSQL Solution for Leet Code Problem 185: Department Top Three Salaries
In this video, I will show you how to solve the LeetCode problem 185: Department Top Three Salaries using Microsoft SQL Server. This problem asks us to find employees who are high earners in each of the company's departments. A high earner is an employee who has a salary in the top three unique salaries for that department. We will use two tables: Employee and Department, which contain information about the employees and their departments. We will use the following steps to solve this problem:
- Join the Employee and Department tables on the departmentId column
- Use the DENSE_RANK() function to rank the employees by their salary within each department
- Filter out the employees whose rank is greater than 3
- Select the department name, employee name, and salary columns from the filtered table
- Use the DISTINCT keyword to remove any duplicates
I hope you enjoyed this video and learned something new. If you did, please like, share, and subscribe to my channel for more SQL solutions. Thank you for watching and happy coding!
Timecodes
0:00 - Question
0:52 - Approach
1:52 - Solution
5:38 - Fixing and Submission
Видео MSSQL Solution for Leet Code Problem 185: Department Top Three Salaries канала Shantanu Khond
- Join the Employee and Department tables on the departmentId column
- Use the DENSE_RANK() function to rank the employees by their salary within each department
- Filter out the employees whose rank is greater than 3
- Select the department name, employee name, and salary columns from the filtered table
- Use the DISTINCT keyword to remove any duplicates
I hope you enjoyed this video and learned something new. If you did, please like, share, and subscribe to my channel for more SQL solutions. Thank you for watching and happy coding!
Timecodes
0:00 - Question
0:52 - Approach
1:52 - Solution
5:38 - Fixing and Submission
Видео MSSQL Solution for Leet Code Problem 185: Department Top Three Salaries канала Shantanu Khond
Комментарии отсутствуют
Информация о видео
1 ноября 2023 г. 22:58:54
00:06:13
Другие видео канала




















