Question: 1 . Write the select statement that will create an employee schedule that has the full name, day of the week, start time and end

1. Write the select statement that will create an employee schedule that has the full name, day of the week, start time and end time sorted by employee id within start time. (15 points)
2. Write the select statement that will create a list of employee last name, employee first name, and their specialty description, sorted by description within last name. (20 points)
3. Write the select statement that will create a list of employee last name, employee first name, and their type description, sorted by last name within description. (15 points)
4. Write the select statement that will create an appointment schedule. Display the appointment date, patients full name, employees full name, start time and duration. Only return rows where the appointment has been scheduled. Sort on patient last name within date. (50 points)
5. Write the select statement that will create a medical history for all patients. Display the date of the history, patient last name, patient first name, description from the medical history table, and the type of history record (Condition, Surgery, or Prescription). Sort on patient last name within date. (50 points)
Query 5 requires you to use a UNION clause for the three medical history tables and create a column in the Select statement to display the type of history record (hint: use a constant and an alias). The best way to tackle this is one Select at a time. Write the Select statement that uses the MedicalHistoryCond table. Once you are satisfied that the output is correct, add a UNION clause, copy and paste the Select statement, and change what is needed for the MedicalHistorySurg table. Run that and once you are satisfied that the output is correct add another UNION clause and repeat for the MedicalHistoryPres table. I have included a partial screenshot of the expected output as a guide.

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 Programming Questions!