column_names: -1
*
0
course id
0
staring date
0
course
1
teacher id
1
name
1
age
1
hometown
2
course id
2
teacher id
2
grade
column_names_original: -1
*
0
Course_ID
0
Staring_Date
0
Course
1
Teacher_ID
1
Name
1
Age
1
Hometown
2
Course_ID
2
Teacher_ID
2
Grade
column_types: text
number
text
text
number
text
text
text
number
number
number
db_id: course_teach
table_names: course
teacher
course arrange
table_names_original: course
teacher
course_arrange

How many teachers are there?
SELECT count(*) FROM teacher

What is the total count of teachers?
SELECT count(*) FROM teacher

List the names of teachers in ascending order of age.
SELECT Name FROM teacher ORDER BY Age ASC

What are the names of the teachers ordered by ascending age?
SELECT Name FROM teacher ORDER BY Age ASC

What are the age and hometown of teachers?
SELECT Age ,  Hometown FROM teacher

What is the age and hometown of every teacher?
SELECT Age ,  Hometown FROM teacher

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

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

Show the name of teachers aged either 32 or 33?
SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33

What are the names of the teachers who are aged either 32 or 33?
SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33

What is the hometown of the youngest teacher?
SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1

Where is the youngest teacher from?
SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1

Show different hometown of teachers and the number of teachers from each hometown.
SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown

For each hometown, how many teachers are there?
SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown

List the most common hometown of teachers.
SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1

What is the most commmon hometowns for teachers?
SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1

Show the hometowns shared by at least two teachers.
SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2

What are the towns from which at least two teachers come from?
SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2

Show names of teachers and the courses they are arranged to teach.
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

What is the name of each teacher and what course they teach?
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

Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
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

What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?
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

Show the name of the teacher for the math course.
SELECT T3.Name 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 WHERE T2.Course  =  "Math"

What are the names of the people who teach math courses?
SELECT T3.Name 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 WHERE T2.Course  =  "Math"

Show names of teachers and the number of courses they teach.
SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name

What are the names of the teachers and how many courses do they teach?
SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name

Show names of teachers that teach at least two courses.
SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2

What are the names of the teachers who teach at least two courses?
SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2

List the names of teachers who have not been arranged to teach courses.
SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)

What are the names of the teachers whose courses have not been arranged?
SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)