rubus0304 님의 블로그
[데이터분석] 코드카타 99 본문
99. Number of Unique Subjects Taught by Each Teacher
https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher/description/
Write a solution to calculate the number of unique subjects each teacher teaches in the university.
Return the result table in any order.
중복되지 않은 과목수 찾기.
(정답) 엇..그냥 했는데 됐다
select teacher_id,
count(distinct subject_id) cnt
from Teacher
group by 1
'Data Analyst > daily' 카테고리의 다른 글
[데이터분석] 코드카타 101 (0) | 2024.11.14 |
---|---|
[데이터분석] 코드카타 100 (0) | 2024.11.12 |
[데이터 분석] 코드카타 98 (0) | 2024.11.08 |
[데이터분석] 코드카타 97 (4) | 2024.11.06 |
[데이터분석] 코드카타 96 (3) | 2024.11.05 |