A good source for php/MySQL interaction (using PDO is recommended) is https://phpdelusions.net/pdo_examples
This query should get you started
SELECT
, scheduled_student_service
, category
, COUNT(*) as total_appointments
, SUM(is_no_show) as no_shows
, SUM(is_cancelled) as cancellations
FROM thetable
GROUP BY scheduled_student_service, category
If that isn't what you want, repost with more details.
In future, please don't post images of data. They are as much use as chocolate teapots if we need to recreate your data to test with when helping.