Task: Text to Code
Input (English): SQL: SELECT Type , Count ( * ) FROM school GROUP BY Type
Feedback: Be certain that it corresponds rows to each value of school id in school bus .
Output (English): SELECT T2.type ,  count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T2.type