Question: please use the sql! 4. Join following tables where one patient can book an appointment with one doctor. [Clue: Define Foreign Key in Appointment table]

please use the sql!
please use the sql! 4. Join following tables
please use the sql! 4. Join following tables
4. Join following tables where one patient can book an appointment with one doctor. [Clue: Define Foreign Key in Appointment table] A. Appointment table (A_ID, Doctor_ID, Patient ID). B. Patient table (Patient ID) C. Doctor table (Doctor ID). SELECT Appointment.Appointment_ID, Appointment.Doctor_ID, Appointment.Patient_ID, Patient.Patient_ID, Doctor.Doctor_ID FROM Appointment JOIN Patient ON Patient_ID = Patient.Patient_ID JOIN Doctor ON Doctor_ID = Doctor.Doctor_ID; 5. Display the patient names, patient gender, doctor gender and doctor speciality. Make sure that all doctor gender is female only. 6. Display the list of doctor name who got more than or equal two appointments [Clue: HAVING CLAUSE] 7. Display patient name and the starting and ending of the appointment time using the left outer join table "2022-OCT-06". 8. Update the doctor salary to be 10% increment for Doctors with CANCER SPECIALITY. 9. Display the patient's name, appointment start and end using where appointment date equals 09 October 2022 right table. (Clue: Right outer join). 9.2 Extra Display the patient name, appointment date which is 2022-Jan-23 and the patient gender is male only. 10. UPDATE the first doctor id so that the doctor's name will be Dr Sara. 11. Delete all the appointment for the patient whose phone number is 509987765

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!