SELECT
    COUNT(*) AS all_count,
    COUNT(
        status_cd = 1
    OR  NULL
    ) AS unanswered,
    COUNT(
        status_cd = 9
    OR  NULL
    ) AS answered,
    COUNT(
        status_cd NOT IN(1, 9)
    OR  NULL
    ) AS answering,
    TRUNCATE(COUNT(
            status_cd = 9
        OR  NULL
        ) * 100 / COUNT(*) + 0.005, 2) AS collection_rate
FROM
    enquete_statuses
WHERE
    hoikuen_id = '%s'
AND `year` = '%s'
AND deleted_at IS NULL
;