☑Kizspy.me
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
from MedicalRecords
where RecordDate < '2022-01-01'
7 of 7
Paper No: 12
Zoom
123456
+100%
Diagnosis
Year NumberOfPatients
Allergy
2019 3
Allergy
2020 4
Allergy
2021 2
Arthritis
2019 3
Arthritis
2020 1
Arthritis
2021 3
2010
Close