Hospital Management System

Tables: Doctors, Patients, Appointments, Bills.

  • Tasks: Most visited doctor, patients with unpaid bills, daily appointments report.
    SELECT d.DoctorName, COUNT(a.AppointmentID) AS TotalAppointments
    FROM Doctors d
    JOIN Appointments a ON d.DoctorID = a.DoctorID
    GROUP BY d.DoctorName
    ORDER BY TotalAppointments DESC;
    

    Comments

    Leave a Reply

    Your email address will not be published. Required fields are marked *