Skip to content

Commit e23598f

Browse files
committed
Upload 138
1 parent 66932aa commit e23598f

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ The problems and both submitted and site solutions are documented in individual
170170
| 135 | [Investments in 2016](https://leetcode.com/problems/investments-in-2016/description/) | [Solution](solutions/135_investments_in_2016.md) | LeetCode | Medium | |
171171
| 136 | [Department Top Three Salaries](https://leetcode.com/problems/department-top-three-salaries/description/) | [Solution](solutions/136_department_top_three_salaries.md) | LeetCode | Hard | |
172172
| 137 | [Fix Names in a Table](https://leetcode.com/problems/fix-names-in-a-table/description/) | [Solution](solutions/137_fix_names_in_a_table.md) | LeetCode | Easy | `SUBSTRING()` |
173+
| 138 | [Patients With a Condition](https://leetcode.com/problems/patients-with-a-condition/description/) | [Solution](solutions/138_patients_with_a_condition.md) | LeetCode | Easy | |
173174
<!-- Index End - WARNING: Do not delete or modify this markdown comment. -->
174175

175176
## Author(s)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SQL Everyday \#138
2+
3+
## Patients With a Condition
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Write a solution to find the patient_id, patient_name, and conditions of the patients who have Type I Diabetes. Type I Diabetes always starts with `DIAB1` prefix.
11+
12+
Return the result table in *any order*. [[Full Description](https://leetcode.com/problems/patients-with-a-condition/description/)]
13+
14+
## Submitted Solution
15+
16+
```sql
17+
-- Submitted Solution
18+
SELECT
19+
*
20+
FROM Patients
21+
WHERE (conditions LIKE "DIAB1%") OR (conditions LIKE "% DIAB1%")
22+
;
23+
```
24+
25+
## Site Solution
26+
27+
```sql
28+
-- LeetCode Solution
29+
-- TBD
30+
```
31+
32+
## Notes
33+
34+
TBD
35+
36+
## NB
37+
38+
39+
40+
Go to [Index](../?tab=readme-ov-file#index)\
41+
Go to [Overview](../?tab=readme-ov-file)
42+

0 commit comments

Comments
 (0)