Healthcare Data Analyst SQL Interview Questions
Healthcare Data Analyst SQL Interview Questions
1. Patients
Columns: patient_id, name, age, gender, admission_date, discharge_date
Question: Find the number of patients who have been admitted more than once in the last
year.
FROM Patients
GROUP BY patient_id
2. Appointments
Columns: appointment_id, patient_id, doctor_id, appointment_date, status
(Completed/Canceled)
Question: Identify the top 5 doctors with the highest number of completed appointments
in the last 6 months.
FROM Appointments
GROUP BY doctor_id
LIMIT 5;
3. Medical_Records
Columns: record_id, patient_id, diagnosis_code, diagnosis_description, record_date
Question: Retrieve the most common diagnosis codes used in patient records in the last
year.
FROM Medical_Records
GROUP BY diagnosis_code
LIMIT 5;
4. Billing
Columns: billing_id, patient_id, department, amount, billing_date, payment_status
(Paid/Pending)
Question: Calculate the total revenue generated by each hospital department in the last
quarter.
FROM Billing
GROUP BY department
5. Prescriptions
Columns: prescription_id, patient_id, doctor_id, medication_name, dosage,
prescription_date, diagnosis_code
Question: Find the most prescribed medication for diabetic patients in the last year.
FROM Prescriptions
WHERE diagnosis_code = 'E11' -- Assuming 'E11' is the diagnosis code for diabetes
GROUP BY medication_name
LIMIT 1;
6. Hospital_Admissions
Columns: admission_id, patient_id, admission_date, discharge_date, diagnosis_code,
department
Question: Determine the average length of stay for patients diagnosed with heart disease.
FROM Hospital_Admissions
WHERE diagnosis_code = 'I10'; -- Assuming 'I10' is the diagnosis code for heart
disease
7. Insurance_Claims
Columns: claim_id, patient_id, insurance_provider, claim_amount, claim_status
(Approved/Rejected), claim_date
Question: Identify the percentage of insurance claims that were rejected in the past 12
months.
SELECT
(COUNT(CASE WHEN claim_status = 'Rejected' THEN 1 END) * 100.0 / COUNT(*)) AS
rejection_rate
FROM Insurance_Claims
8. Lab_Results
Columns: lab_id, patient_id, test_name, test_result, test_date, reference_range, age_group
Question: Retrieve the average cholesterol levels of patients grouped by age group.
FROM Lab_Results
GROUP BY age_group
ORDER BY age_group;
9. Emergency_Visits
Columns: visit_id, patient_id, arrival_time, discharge_time, reason_for_visit, severity_level
Question: Find the busiest hour of the day for emergency room visits in the last 6 months.
FROM Emergency_Visits
GROUP BY busy_hour
LIMIT 1;
10. Doctors
Columns: doctor_id, name, specialization, hospital_id, years_of_experience,
total_patients_treated
Question: List doctors who have treated more than 100 unique patients in the past year.
FROM Appointments
GROUP BY doctor_id