SyntaxFix
Write A Post
Hire A Developer
Questions
You must use LEFT JOIN instead of INNER JOIN
LEFT JOIN
INNER JOIN
SELECT person.person_id, COUNT(appointment.person_id) AS "number_of_appointments" FROM person LEFT JOIN appointment ON person.person_id = appointment.person_id GROUP BY person.person_id;