Question: NEED SQL QUERIES TO DO THE FOLLOWING: NOTE: PLEASE USE TABLE ALIASES AND DOT NOTATION ONLY. INNER JOIN SHOULD NOT BE USED TO DO THIS

NEED SQL QUERIES TO DO THE FOLLOWING:
NOTE: PLEASE USE TABLE ALIASES AND DOT NOTATION ONLY.
INNER JOIN SHOULD NOT BE USED TO DO THIS PROJECT.
List the appt ID, date, patient last name, and doctor last name for all appointments that have a total number of minutes greater than the average total minutes for all appointments. Use the following column headings: ApptID, Date, Patient, Doctor, TotalMinutes. Sort by appt ID. Hint: use a nested SELECT.
List the appt ID, date, patient last name, pay type description, insurance company, and count of reason codes for all appointments that have 2 or more reason. Sort by in descending order, then by appt ID in ascending order. Use the following column headings: ApptID, Date, Patient, PayType, InsCo, ReasonCount.
List the reason code, reason description, block code, block minutes for the appt detail row with the highest number of minutes in each appointment. Show the minutes formatted as # minutes and use the following column headings: Reason Code, Description, Block Code, Minutes. Hint: use a GROUP by and nested SELECT.
PATIENT REASON ApptReasonCode ApptReasonDesc PatientlD PatientFName PatientLName PatientPhone APPTDETAIL APPOINTMENT ApptID ApptDate ApptTime PatientID DoctorID BillingType InsColD ApptStatusCode ApptID ApptReasonCode BlockCode DOCTOR BLOCK DoctorFName BlockCode BlockDesc BlockTime DoctorLName BILLINGTYPE BillingType BillingTypeDesc INSCO InsColD InsCoName STATUS ApptstatusCode ApptStatusDesc PATIENT REASON ApptReasonCode ApptReasonDesc PatientlD PatientFName PatientLName PatientPhone APPTDETAIL APPOINTMENT ApptID ApptDate ApptTime PatientID DoctorID BillingType InsColD ApptStatusCode ApptID ApptReasonCode BlockCode DOCTOR BLOCK DoctorFName BlockCode BlockDesc BlockTime DoctorLName BILLINGTYPE BillingType BillingTypeDesc INSCO InsColD InsCoName STATUS ApptstatusCode ApptStatusDesc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
