Question: fix column name: SELECT YEAR(AppointmentDateTime) AS Year, COUNT(*) AS TotalAppointments, SUM(CASE WHEN VisitCompleted = 1 THEN 1 ELSE 0 END) AS TotalVisits FROM Appointments GROUP
fix column name: SELECT YEAR(AppointmentDateTime) AS Year, COUNT(*) AS TotalAppointments, SUM(CASE WHEN VisitCompleted = 1 THEN 1 ELSE 0 END) AS TotalVisits FROM Appointments GROUP BY YEAR(AppointmentDateTime) ORDER BY Year
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
