Database: course_teach
# course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id

Question: How many teachers are there?
SQL: select count ( * ) from teacher

Question: What is the total count of teachers?
SQL: select count ( * ) from teacher

Question: List the names of teachers in ascending order of age.
SQL: select name from teacher order by age asc

Question: What are the names of the teachers ordered by ascending age?
SQL: select name from teacher order by age asc

Question: What are the age and hometown of teachers?
SQL: select age , hometown from teacher

Question: What is the age and hometown of every teacher?
SQL: select age , hometown from teacher

Question: List the name of teachers whose hometown is not `` Little Lever Urban District '' .
SQL: select name from teacher where hometown != 'little lever urban district'

Question: What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?
SQL: select name from teacher where hometown != 'little lever urban district'

Question: Show the name of teachers aged either 32 or 33?
SQL: select name from teacher where age = 32 or age = 33

Question: What are the names of the teachers who are aged either 32 or 33?
SQL: select name from teacher where age = 32 or age = 33

Question: What is the hometown of the youngest teacher?
SQL: select hometown from teacher order by age asc limit 1

Question: Where is the youngest teacher from?
SQL: select hometown from teacher order by age asc limit 1

Question: Show different hometown of teachers and the number of teachers from each hometown.
SQL: select hometown , count ( * ) from teacher group by hometown

Question: For each hometown, how many teachers are there?
SQL: select hometown , count ( * ) from teacher group by hometown

Question: List the most common hometown of teachers.
SQL: select hometown from teacher group by hometown order by count ( * ) desc limit 1

Question: What is the most commmon hometowns for teachers?
SQL: select hometown from teacher group by hometown order by count ( * ) desc limit 1

Question: Show the hometowns shared by at least two teachers.
SQL: select hometown from teacher group by hometown having count ( * ) >= 2

Question: What are the towns from which at least two teachers come from?
SQL: select hometown from teacher group by hometown having count ( * ) >= 2

Question: Show names of teachers and the courses they are arranged to teach.
SQL: select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id

Question: What is the name of each teacher and what course they teach?
SQL: select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id

Question: Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
SQL: select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id order by teacher.name asc

Question: What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?
SQL: select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id order by teacher.name asc

Question: Show the name of the teacher for the math course.
SQL: select teacher.name from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id where course.course = 'Math'

Question: What are the names of the people who teach math courses?
SQL: select teacher.name from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id where course.course = 'Math'

Question: Show names of teachers and the number of courses they teach.
SQL: select teacher.name , count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name

Question: What are the names of the teachers and how many courses do they teach?
SQL: select teacher.name , count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name

Question: Show names of teachers that teach at least two courses.
SQL: select teacher.name from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name having count ( * ) >= 2

Question: What are the names of the teachers who teach at least two courses?
SQL: select teacher.name from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name having count ( * ) >= 2

Question: List the names of teachers who have not been arranged to teach courses.
SQL: select name from teacher where teacher_id not in ( select teacher_id from course_arrange )

Question: What are the names of the teachers whose courses have not been arranged?
SQL: select name from teacher where teacher_id not in ( select teacher_id from course_arrange )