https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher/description/
Number of Unique Subjects Taught by Each Teacher - LeetCode
Can you solve this real interview question? Number of Unique Subjects Taught by Each Teacher - Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
1
2
3
4
|
# Write your MySQL query statement below
select teacher_id , count(distinct subject_id) cnt
from Teacher
group by teacher_id
|
cs |
반응형
'SQL' 카테고리의 다른 글
leetcode 1789. Primary Department for Each Employee (0) | 2023.04.08 |
---|---|
leetcode 1251. Average Selling Price (0) | 2023.04.07 |
leetcode 1378. Replace Employee ID With The Unique Identifier (0) | 2023.04.06 |
leetcode 1683. Invalid Tweets (0) | 2023.04.06 |
leetcode 1393. Capital Gain/Loss (0) | 2023.01.26 |
댓글