Notice
Recent Posts
Recent Comments
250x250
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 |
Tags
- 신뢰구간
- DATE_FORMAT
- limit
- truncate
- 모집단
- concat
- 재귀쿼리
- dateofmonth
- split
- 재퀴쿼리
- datediff
- pivot table
- lambda
- python
- join
- 레이더차트
- 표분편차
- 데이터 리터러시
- Recursive
- merge
- tableau
- 표본분포
- curdate
- calesce
- floor
- rrule
- 정규분포
- 프로그래머스
- 태블로
- 표준오차
Archives
- Today
- Total
반응형
hyezdata 님의 블로그
Department Highest Salary 본문
# 각 부서마다 가장 높은 연봉 받는 employee
select d.name as Department, e.name as Employee, e.salary as Salary
from (
select name, salary, departmentId,
dense_rank() over (partition by departmentId order by salary desc) as rnk
from Employee
) e left join department d on e.departmentId=d.id
where e.rnk=1
Department Highest Salary - LeetCode
Can you solve this real interview question? Department Highest Salary - Table: Employee +--------------+---------+ | Column Name | Type | +--------------+---------+ | id | int | | name | varchar | | salary | int | | departmentId | int | +--------------+---
leetcode.com
728x90
반응형
'코딩테스트' 카테고리의 다른 글
| Delete Duplicate Emails (0) | 2026.05.06 |
|---|---|
| Department Top Three Salaries (0) | 2026.05.06 |
| Nth Highest Salary (0) | 2026.05.01 |
| 180. Consecutive Numbers (0) | 2026.05.01 |
| 178. Rank Scores (0) | 2026.04.30 |