A: SQL Queries for Tables: Patient, Doctor and Appointment: 71

a. Display name and address of patients who are suffering from Tuberculosis(TB).


SELECT Pname,
       Paddress
FROM   Patient
WHERE  disease = 'Tuberculosis(TB)';  

 

b. Count the number of doctors working in ENT department.


SELECT COUNT(DID)
FROM   Doctor
WHERE  Department = 'ENT';

 

c. Display name of doctor who is receiving maximum salary.

 SELECT Dname
FROM   Doctor
WHERE  salary = (SELECT MAX(salary)
                 FROM   Doctor);