Question For this assignment, use the following database schema:
1) Patient-PatientID, Name, DOB
2) Doctor-DoctorID, Name, MedLicenseNumber, Phone
3) Medication-MedicationID, BrandName, GenericName
4) Prescription-PrescriptionID, Date, PatientID, PrescriberID, MedicationID
Specify the SQL queries to retrieve:
1) A list of all doctors.
2) The number of patients that were born before 01/01/1994.
3) The patient information along with the ID of any prescribing doctor for each patient.
4) The prescription information along with patient name, DOB, medication brand name, and prescribing doctor name sorted by most recent date.
5) The most prescribed generic medication name.
Solution Preview :
The task of the assignment is to write sql queries for the following table schema
1) Patient-PatientID, Name, DOB, 2) Doctor-DoctorID, Name, MedLicenseNumber, Phone,
3) Medication-MedicationID, BrandName, GenericName,
4) Prescription-PrescriptionID, Date, PatientID, PrescriberID, MedicationID and write sql queries to list of all doctors, determine number of patients that were born before 01/01/1994 display the patient information along with the ID.