☑Kizspy.me
5 of 5
Paper No: 12
Write a query to identify, for each Specialty, doctors who have the highest sum of total billing
amount from appointments. The results must include Specialty, DoctorID, FullName,
SumOfTotalAmount, where the SumOfTotalAmount of each doctor is the sum of
TotalAmount of all billings from appointments of the doctor. Order the results by ascending
order of Specialty, then by ascending order of DoctorID for rows of the same Specialty as
follows:
Specialty
Zoom
DoctorID
FullName
SumOfTotalAmount
12345
Cardiology
8
Dr. Michael Moore
1272.83
Dermatology
2
Dr. David Taylor
3656.38
General Surgery 4
Dr. Sarah Jones
1307.37
Neurology
23
Dr. Laura Miller
2591.39
5
Ophthalmology 13
Dr. Emma Jules
3882.68
6
Orthopedics
6
Dr. John Taylor
2440.93
7
Pediatrics
15
Dr. Emily Williams
2228.79
8
Psychiatry
14
Dr. John Wilson
1539.12
Picture 6.1
Question 7:
display the
+100%
doctor with tha
Close