Show names of teachers and the number of courses they teach.
CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course_arrange (Teacher_ID VARCHAR)
SELECT T2.Name, COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course_arrange (Teacher_ID VARCHAR) Question: Show names of teachers and the number of courses they teach. [/INST] SELECT T2.Name, COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name </s>