Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit36553b0

Browse files
add 1789
1 parent258ccad commit36553b0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎database/_1789.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- # Write your MySQL query statement below
2+
select employee_id, department_id
3+
from (select*,count(employee_id) over(partition by employee_id)as EmployeeCountfrom Employee) EP
4+
where EmployeeCount=1
5+
or primary_flag='Y';

‎paginated_contents/database/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
|------|----------------|-----------------------------------------------------------------------------------------------------------------------|---------------|---------------|-------------
33
| 3198|[Find Cities in Each State](https://leetcode.com/problems/find-cities-in-each-state/)|[Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_3198.sql)|| Easy|
44
| 3172|[Second Day Verification](https://leetcode.com/problems/second-day-verification/)|[Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_3172.sql)|| Easy|
5+
| 1789|[Primary Department for Each Employee](https://leetcode.com/problems/primary-department-for-each-employee/)|[Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1789.sql)|| Easy|
56
| 1757|[Recyclable and Low Fat Products](https://leetcode.com/problems/recyclable-and-low-fat-products/)|[Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1757.sql)|| Easy|
67
| 1741|[Find Total Time Spent by Each Employee](https://leetcode.com/problems/find-total-time-spent-by-each-employee/)|[Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1741.sql)|| Easy|
78
| 1729|[Find Followers Count](https://leetcode.com/problems/find-followers-count/)|[Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1729.sql)|| Easy|

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp