SQL Practice Logo

SQLPractice Online

Home/Tutorials/

Healthcare Database

Practice with Healthcare Database
Beginner Level5 Tables

Healthcare Database SQL Tutorial

Hospital and clinic system with patients, doctors, appointments, and diagnoses

🎯 What you'll practice: Patient records, Appointment scheduling, Diagnosis tracking, Department analytics using real-world database scenarios.

📊 Database Tables

departments

Core healthcare data table

doctors

Core healthcare data table

patients

Core healthcare data table

appointments

Core healthcare data table

diagnoses

Core healthcare data table

🔍 Common Query Patterns

Doctors by Department

List doctors with their department name

SELECT d.first_name, d.last_name, dep.department_name
FROM doctors d
JOIN departments dep ON d.department_id = dep.department_id
ORDER BY dep.department_name;
Try Now →

Appointments per Patient

Count appointments by patient

SELECT patient_id,
COUNT(*) as appointment_count
FROM appointments
GROUP BY patient_id
ORDER BY patient_id;
Try Now →

🚀 Ready to Practice?

Start practicing SQL queries with the healthcare database database. All tables are loaded and ready to use!