Skip to content
Go back

2356-number-of-unique-subjects-taught-by-each-teacher

2356 https://leetcode.cn/problems/number-of-unique-subjects-taught-by-each-teacher/

SELECT t.teacher_id, COUNT(DISTINCT t.subject_id) AS cnt
FROM Teacher t
GROUP BY t.teacher_id

Share this post on:

Previous Post
2370-longest-ideal-subsequence
Next Post
1789-primary-department-for-each-employee