Daily leetcode_2356_The number of subject types taught by each teacher

Leetcode Daily Question_Number of subjects taught by each teacher

Record your own growth, come on.

topic

Solve problems

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

Guess you like

Origin blog.csdn.net/qq_45925197/article/details/133692582