Retrieve Patient Information for Dementia Diagnoses Using SQLite
Easy
4
83.3% Acceptance
You will be working with two tables:
patients
admissions
The Question
Your task is to write an SQL query to show the patient_id
, first_name
, and last_name
from the patients
table for those patients whose primary diagnosis is 'Dementia'. Note that the primary diagnosis is stored in the admissions
table.
Concepts Covered
JOIN
: You'll need to join tables to combine rows from two or more tables based on a related column.SELECT
: You'll use this to specify the columns you want in the result set.WHERE
: To filter records based on specific conditions.
Important: The query you write should be case-sensitive and should match exactly with the column names and values in the database.
Good luck!