DBI202_-_FA_2024_-_PE_-_s_-_6_2892.webp
B

DBI202_-_FA_2024_-_PE_-_s_-_6_2892.webp

Picture 4.1
Question 5:
Write a query to display DoctorID, FirstName, LastName, DepartmentName,NumberOfAppointments corresponding to each doctor of two departments named 'Pediatrics' and 'General Surgery'; where NumberOfAppointments is the number of 'Completed' appointments in 2023 of each doctor. Order the results in descending order of NumberOfAppointments, then in ascending order of DoctorID for rows having the same NumberOfAppointments as in the following figure. Note that all doctors of these two departments must be displayed.
5 of 5
Paper No: 6
DoctorID
FirstName LastName DepartmentName NumberOfAppointments
1
1
John Doe 2
Pediatrics
2
8
Robert Martinez
General Surgery 2
3
29
Melissa Young
Pediatrics
2
4
40
Samuel Carter Pediatrics
2
5 48
Keith
Evans
General Surgery 2
6 50
Frank Collins Pediatrics 2
7
11
Jennifer Wilson Pediatrics
1
8 20
Helen Thompson General Surgery 1
9 23
Betty
Clark
Pediatrics
1
10 28
Christopher Hall General Surgery 0
11 37
Laura Baker General Surgery 0 Katherine Perez General Surgery 0
12 42
Picture 5.1
Question 6:
Write a query to display, for each department, all the doctors who have the highest number of medical records. The results must include DepartmentID, Name, DoctorID,DoctorFullName and NumberOfRecords, where DoctorFullName is the concatenation of the doctor's first name, a whitespace and the doctor's last name. The NumberOfRecords of a doctor is the total number of medical records associated with that doctor.
Departmentin Nama
+ 100%
Doctordn DoctorFullName NumberOfDecorde
Close
Chưa có bình luận nào.

Thông tin

Category
DBI202
Thêm bởi
banana_milk
Ngày thêm
Lượt xem
564
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
DBI202_-_FA_2024_-_PE_-_s_-_6_2892.webp
File size
281.6 KB
Dimensions
1920px x 1008px

Share this media

Back
Bên trên Bottom