Skip to content

Commit 6df60e6

Browse files
committed
Upload 117
1 parent 19b9477 commit 6df60e6

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ To make the daily tasks of creating a new file and updating the index easier, th
145145
| 114 | [Monthly Transactions I](https://leetcode.com/problems/monthly-transactions-i/description/) | [Solution](solutions/114_monthly_transactions_i.md) | LeetCode | Medium | |
146146
| 115 | [Immediate Food Delivery II](https://leetcode.com/problems/immediate-food-delivery-ii/description/) | [Solution](solutions/115_immediate_food_delivery_ii.md) | LeetCode | Medium | |
147147
| 116 | [Game Play Analysis IV](https://leetcode.com/problems/game-play-analysis-iv/description/) | [Solution](solutions/116_game_play_analysis_iv.md) | LeetCode | Medium | |
148+
| 117 | [Number of Unique Subjects Taught by Each Teacher](https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher/description/) | [Solution](solutions/117_number_of_unique_subjects_taught_by_each_teacher.md) | LeetCode | Easy | |
148149

149150
## Author(s)
150151

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SQL Everyday \#117
2+
3+
## Number of Unique Subjects Taught by Each Teacher
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Write a solution to calculate the number of unique subjects each teacher teaches in the university.
11+
12+
Return the result table in *any order*. [[Full Description](https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher/description/)]
13+
14+
## Submitted Solution
15+
16+
```sql
17+
-- Submitted Solution
18+
SELECT
19+
teacher_id
20+
,COUNT(DISTINCT subject_id) AS cnt
21+
FROM Teacher
22+
GROUP BY teacher_id
23+
;
24+
```
25+
26+
## Site Solution
27+
28+
```sql
29+
-- LeetCode Solution
30+
-- Site solution essentially the same.
31+
```
32+
33+
## Notes
34+
35+
TODO
36+
37+
Go to [Table of Contents](/README.md#contents)\
38+
Go to [Overview](/README.md)

0 commit comments

Comments
 (0)