Retrieve Epilepsy Patients Attended by Doctor Lisa
Medium
1
63.5% Acceptance
This database contains various tables. However, for this exercise, you'll primarily be focusing on three tables: patients
, admissions
, and doctors
.
Problem Statement
Your task is to write an SQL query that achieves the following:
-
Retrieve the following columns:
patient_id
first_name
andlast_name
of patients aspatient_first_name
andpatient_last_name
- Attending doctor's
specialty
asattending_doctor_specialty
-
Your result should include only the patients who:
- Have a diagnosis of 'Epilepsy'
- Are being attended by a doctor with the first name 'Lisa'
Concepts to Consider
-
Joins: You'll need to join multiple tables to get the required information. Remember, the tables you need to focus on are
patients
,admissions
, anddoctors
. -
Filtering with WHERE: Filtering your dataset is crucial to get the exact rows that satisfy the given conditions.
Your goal is to get the desired output by understanding the relationships between the tables and the conditions provided.
Best of luck, and happy querying!