7
7
8
9 8
10 8
11 8
12 9
13 10
Oncology
2
Jane Smith
Emergency Medicine 5
Linda Brown
Emergency Medicine 16
Mary Jackson
Emergency Medicine 36
Ryan Adams
Emergency Medicine 43
Psychiatry
Justin Roberts
8
7
7
7
7
General Surgery
24
48
George Rodrigu... 10
Keith Evans
11
Picture 6.1
Question 7:
Write a query to display, for each department, the number of distinct patients who have appointments with a doctor in that department for the years 2022, 2023 and 2024. The results must include DepartmentID, Name, NumberOfPatientsIn2022,NumberOfPatientsIn2023 and NumberOfPatientsIn2024, as shown in the following figure.Note that all departments must be displayed in the results.
6 of 6
Paper No: 12
Zoom
+ 100%
Close