University administrators need to report on faculty workload. Specifically, they want to know how many different subjects each teacher handles, regardless of how many departments those subjects span.
Write an SQL query to report the number of unique subjects each teacher teaches in the university.
| teacher_id(INTEGER) | subject_id(INTEGER) | dept_id(INTEGER) |
|---|---|---|
| 1 | 2 | 3 |
| 1 | 2 | 4 |
| 1 | 3 | 3 |
| 2 | 1 | 1 |
| 2 | 2 | 1 |
| 2 | 3 | 1 |
| 2 | 4 | 1 |
| teacher_id(INTEGER) | cnt(INTEGER) |
|---|---|
| 1 | 2 |
| 2 | 4 |