Question

 

Write and execute SQL statements for the following queries:
i) List the names of doctors who joined before January 1st, 2026.
ii) List the names of all patients in alphabetical order.
iii)Find the name of every patient along with the name of their assigned doctor.
iv)List the ID of all doctors who have been assigned to more than five patients.
v) Find the total number of patients assigned to each doctor.
vi) Find the total number of doctors in the hospital.
Note: Make suitable assumptions, if any.

11 Apr 2026
Answer :
Word Count : 252
Assume the following tables are used in the hospital database: Doctors(DoctorID, DoctorName, JoinDate) Patients(PatientID, PatientName, DoctorID) Sample data can be inserted for execution: ```sql CREATE TABLE Doctors ( DoctorID INT PRIMARY KEY, DoctorName VARCHAR(50), JoinDate DATE ); CREATE TABLE Patients ( PatientID _______ ________ __________ _______ ______ __________ ___ _______ ________ _______ ___ _____.
________ ___ __________ ______ __________ ______.
_____ ___ ___ _________ ____ _____ _____ ________ _____.
________ ___ ____ _____ ___ ________.
______ ____ ______ ________ _____ ___ __________ ____ _______ __________.
___ __________ ____ _______ ________.
___ ________ _________ ________ ___ ______ _____ ___ ________ _____.
__________ ____ ___ ____ ________ _____.
___ ___ __________ _________ __________ ____ _______.
____ _____ __________ ___ ________ ___.
_________ _______ __________ ___ _____ ________ ________ ____ __________.
____ ___ __________ _____ _________ __________ ____.
_____ ______ _____ ________ _______ _____ ________ _________ _________.
______ ______ _____ __________ ______ _________.
____ _________ __________ ____ ______ _____ _______ _________.
_______ _________ ____ ___ __________ ______ _____.
_______ _________ ___ _________ _____.
________ ______ ______ _________ ____ _____.
_________ ____ _______ ______ ______.
_________ ____ ______ ________ ___.
___ _______ ____ ___ ______ ___ __________ ________ ______.
____ _______ _______ _______ _______ _____.
_________ _________ _________ ______ __________ ______ ____ ________ ______ ________.
_____ ______ ________ ___ ________ ______ _____.
_____ _____ ____ _____ _________ _________.
___ ___ _________ __________ _____ ___ ________ ____.
__________ ________ ______ ____ _____ ____.
___ ________ _____ ______ _______ ________.
_______ _________ _______ __________ ___ ________ _______ ____.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance  Write and execute SQL statements for the following queries:
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→