LeetCode solutions

1670. Patients With a Condition

My accepted SQL solution to LeetCode problem 1670, Patients With a Condition, running in 373ms.

  • Difficulty: Easy
  • SQL
  • Runtime 373ms
  • Memory 0.0B

Read the problem on LeetCode View on GitHub

SQL

Accepted on LeetCode — runtime 373ms, memory 0.0B, accepted 2025-12-29.

sql
SELECT patient_id, patient_name, conditions
FROM Patients
WHERE conditions LIKE 'DIAB1%' OR conditions LIKE '% DIAB1%'

Source