DBI202_-_FA_2024_-_PE_-_s_-_3_2890.webp
I

DBI202_-_FA_2024_-_PE_-_s_-_3_2890.webp

Paper No: 3
DepartmentID Name
NumberOfPatientsIn2022 NumberOfPatientsIn2023 NumberOfPatientsIn2024
1
1
Cardiology 5
4
17
2
2
Neurology 6 Pediatrics 5
7
9
3
3
8
13
4
4
Orthopedics 3
2
15
5
5
Dermatology 4
1
15
6
6
Radiology
2
2
6
7
7
Oncology 1
3
8
8
8
Emergenc... 6
5
10
9
9
Psychiatry 0
1
6
10 10
General S... 10
6
12
Picture 7.1
Zoom
Question 8:
Create a function named F2 which calculates and returns an integer number which is the number of distinct patients who were required to do a given test during their appointments,where testID int is the input parameter of the function.
For example, when we call the F2 function in the following query for calculating the number of distinct patients who were required to do each of the four tests with testID respectively 9,10, 11 and 12, the results must be shown as in the following figure:
select TestID, Name, dbo. F2(TestID) as NumberOfPatients
from Tests
where TestID in (9,10,11,12)
+ 94%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
DBI202_-_FA_2024_-_PE_-_s_-_3_2890.webp
File size
173.5 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom