DBI202_-_FA_2024_-_PE_-_s_-_7_2889.webp
Thùy Dung1

DBI202_-_FA_2024_-_PE_-_s_-_7_2889.webp

7 of 7
Paper No: 7
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)
TestID
Name
NumberOfPatients
5
2
9 Thyroid Test
10
11
Liver Function Test
Kidney Function Test 5
1
2
3
Zoom
+ 90%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

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

Share this media

Back
Bên trên Bottom