Filtering Patients by Specific IDs in a Hospital Database
Easy
127
1
94.0% Acceptance
The database focuses on hospital data, and for this particular exercise you'll be using the patients
table.
Schema
patients
table schema
patient_id
first_name
last_name
gender
birth_date
city
province_id
allergies
height
weight
Task
Write a SQL query to show all columns for patients who have specific patient_id
s: 1, 45, 534, 879, 1000.
Concepts to Know
SELECT
: To specify the columns you want to retrieve.WHERE
: To filter the records based on certain conditions.IN
: To specify multiple values in a WHERE clause.
Remember, the focus here is not just on getting the right answer, but also on understanding the SQL concepts being applied.
Good luck!