Question: Doctors at a busy general practice record their consultations in a central database. Each consultation has a doctor recorded against it as well as the

Doctors at a busy general practice record their consultations in a central database. Each consultation has a doctor recorded against it as well as the time of the appointment and how long (in minutes) the consultation was.

CREATE TABLE Doctor(

DoctorID int,

Name varchar(40))

CREATE TABLE Disease(

DiseaseID int,

Name varchar(40))

CREATE TABLE Consultation(

ConsultationID int,

DoctorID int,

AppointmentTime datetime,

Duration int)

CREATE TABLE ConsultationDisease(

ConsultationID int,

DiseaseID int)

Write a query or queries to find the different diseases that each doctor saw patients with for each week of the year. Also show the total time that each doctor spent examining patients with each disease for each week.

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