DBI202_-_PE_-_SP_2025_-_s_5_3475.webp
G

DBI202_-_PE_-_SP_2025_-_s_5_3475.webp

☑Kizspy.me
27
2222
TT
DI. Emma JomsoIT
AMTOXICIT
11
Dr. Emma Johnson
Aspirin
28
11
Dr. Emma Johnson
Aspirin
49
29
11
Dr. Emma Johnson
Aspirin
2345
Micrider Moore
33
John Taylor
David Wilson
57
James Davis
Picture 7.1
Question 8:
Create a function named F1 which calculates and returns an integer number which is the
number of distinct patients who have been diagnosed a given diagnosis in a given year
(based on the RecordDate), where Diagnosis nvarchar(255) and year int are respectively the
first and the second input parameters of the function.
For example, when we call the F1 function in the following query, the results must be shown
as in the following figure:
select distinct Diagnosis, YEAR(RecordDate) as Year, dbo.F1(Diagnosis,
YEAR(RecordDate)) as NumberOfPatients
7 of 7
Paper No: 5
from MedicalRecords
where RecordDate < '2022-01-01'
Diagnosis
Allergy
+ 100%
Year
NumberOfPatients
2019 3
Zoom
- FUO
1
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom