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
9
10
11
12
Name
NumberOfPatients
5
2
5
Thyroid Test
Liver Function Test
Kidney Function Test
Complete Blood Count 8
Question 9:
Picture 8.1
1
2
3
4
Create a trigger named insertDoctor for the INSERT statement on the "Doctors" table so that when we execute an insert statement to add one or more rows to the "Doctors" table, if any
Close
+ 100%
Zoom