Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
CREATE TABLE course_arrange (Course_ID VARCHAR, Teacher_ID VARCHAR); CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course (Course VARCHAR, Course_ID VARCHAR)
SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE course_arrange (Course_ID VARCHAR, Teacher_ID VARCHAR); CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course (Course VARCHAR, Course_ID VARCHAR) Question: Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name. [/INST] SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name </s>