☑Kizspy.me
29 4
Dr. Sarah Jones
30 4
Dr. Sarah Jones
298
299
Amoxicillin
Ibuprofen
Apply topically
31 19
Dr. Sarah Williams
NULL
NULL
2020-07-23 00:00:00.000 50
Inject once a week 2020-07-23 00:00:00.000 50
NULL
NULL
Laura Moore
NULL
Laura Moore
NULL
Picture 4.1
Question 5:
Write a query to display DoctorID, FullName, Specialty, NumberOfAppointments,
SumOfBilling TotalAmount for all doctors having the specialty 'Neurology'; where, for each
doctor:
- NumberOfAppointments is the total number of appointments in 2021 and 2022 (based on
AppointmentDate) of the doctor.
- SumOfBilling TotalAmount is the sum of TotalAmount of all billings for appointments in 2021
and 2022 (based on AppointmentDate) of the doctor.
Note that the NumberOfAppointments = 0 and SumOfBilling TotalAmount = 0 if the doctor
has no appointment with the AppointmentDate in 2021 or 2022.
DoctorID
FullName
1
3
Dr. Laura Moore
Specialty
Neurology 0
NumberOfAppointments SumOfBilling TotalAmount
0.00
2
10
Dr. Michael Johnson
Neurology 2
422.34
3
4
5
267
Dr. Emma Wilson
Neurology 2
524.85
Dr. Chris Taylor
Neurology 1
114.29
Dr. Sarah Brown
Neurology 1
94.43
6
20
Dr. Sarah Davis
Neurology 2
240.54
7
23
Dr. Laura Miller
8
24
Dr. Emma Jones
9
25
Dr. James Brown
Neurology 0
Neurology 3
Neurology 4
Picture 5.1
0.00
918.17
1569.95
Question 6:
Zoom
+ 100%
Close