Schema:
CREATE TABLE "list" ( 
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Grade" INTEGER, 
	"Classroom" INTEGER,
	PRIMARY KEY(LastName, FirstName)
);
CREATE TABLE "teachers" ( 
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Classroom" INTEGER,
	PRIMARY KEY(LastName, FirstName)
);

Question: Find the number of students in total.
SQL:
SELECT count(*) FROM list

Question: How many students are there?
SQL:
SELECT count(*) FROM list

Question: Find the last names of students studying in room 111.
SQL:
SELECT lastname FROM list WHERE classroom  =  111

Question: What are the last names of students in room 111?
SQL:
SELECT lastname FROM list WHERE classroom  =  111

Question: Find the first names of students studying in room 108.
SQL:
SELECT firstname FROM list WHERE classroom  =  108

Question: What are the first names of students in room 108?
SQL:
SELECT firstname FROM list WHERE classroom  =  108

Question: What are the first names of students studying in room 107?
SQL:
SELECT DISTINCT firstname FROM list WHERE classroom  =  107

Question: List the first names of all the students in room 107.
SQL:
SELECT DISTINCT firstname FROM list WHERE classroom  =  107

Question: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.
SQL:
SELECT DISTINCT classroom ,  grade FROM list

Question: What are the grade number and classroom number of each class in the list?
SQL:
SELECT DISTINCT classroom ,  grade FROM list

Question: Which grade is studying in classroom 103?
SQL:
SELECT DISTINCT grade FROM list WHERE classroom  =  103

Question: Find the grade taught in classroom 103.
SQL:
SELECT DISTINCT grade FROM list WHERE classroom  =  103

Question: Find the grade studying in room 105.
SQL:
SELECT DISTINCT grade FROM list WHERE classroom  =  105

Question: Which grade is studying in room 105?
SQL:
SELECT DISTINCT grade FROM list WHERE classroom  =  105

Question: Which classrooms are used by grade 4?
SQL:
SELECT DISTINCT classroom FROM list WHERE grade  =  4

Question: Find the classrooms in which grade 4 is studying.
SQL:
SELECT DISTINCT classroom FROM list WHERE grade  =  4

Question: Which classrooms are used by grade 5?
SQL:
SELECT DISTINCT classroom FROM list WHERE grade  =  5

Question: Show me the classrooms grade 5 is using.
SQL:
SELECT DISTINCT classroom FROM list WHERE grade  =  5

Question: Find the last names of the teachers that teach fifth grade.
SQL:
SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  5

Question: what are the last names of the teachers who teach grade 5?
SQL:
SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  5

Question: Find the first names of the teachers that teach first grade.
SQL:
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  1

Question: What are the first names of the teachers who teach grade 1?
SQL:
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  1

Question: Find the first names of all the teachers that teach in classroom 110.
SQL:
SELECT firstname FROM teachers WHERE classroom  =  110

Question: Which teachers teach in classroom 110? Give me their first names.
SQL:
SELECT firstname FROM teachers WHERE classroom  =  110

Question: Find the last names of teachers teaching in classroom 109.
SQL:
SELECT lastname FROM teachers WHERE classroom  =  109

Question: Which teachers teach in classroom 109? Give me their last names.
SQL:
SELECT lastname FROM teachers WHERE classroom  =  109

Question: Report the first name and last name of all the teachers.
SQL:
SELECT DISTINCT firstname ,  lastname FROM teachers

Question: What are the first name and last name of all the teachers?
SQL:
SELECT DISTINCT firstname ,  lastname FROM teachers

Question: Report the first name and last name of all the students.
SQL:
SELECT DISTINCT firstname ,  lastname FROM list

Question: Show each student's first name and last name.
SQL:
SELECT DISTINCT firstname ,  lastname FROM list

Question: Find all students taught by OTHA MOYER. Output the first and last names of the students.
SQL:
SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"

Question: Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.
SQL:
SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"

Question: Find all students taught by MARROTTE KIRK. Output first and last names of students.
SQL:
SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "MARROTTE" AND T2.lastname  =  "KIRK"

Question: Which are the first and last names of the students taught by MARROTTE KIRK?
SQL:
SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "MARROTTE" AND T2.lastname  =  "KIRK"

Question: Find the first and last name of all the teachers that teach EVELINA BROMLEY.
SQL:
SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "EVELINA" AND T1.lastname  =  "BROMLEY"

Question: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name  of the teachers.
SQL:
SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "EVELINA" AND T1.lastname  =  "BROMLEY"

Question: Find the last names of all the teachers that teach GELL TAMI.
SQL:
SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "GELL" AND T1.lastname  =  "TAMI"

Question: What are the last names of the teachers who teach the student called GELL TAMI?
SQL:
SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "GELL" AND T1.lastname  =  "TAMI"

Question: How many students does LORIA ONDERSMA teaches?
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "LORIA" AND T2.lastname  =  "ONDERSMA"

Question: Count the number of students the teacher LORIA ONDERSMA teaches.
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "LORIA" AND T2.lastname  =  "ONDERSMA"

Question: How many students does KAWA GORDON teaches?
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "KAWA" AND T2.lastname  =  "GORDON"

Question: Find the number of students taught by the teacher KAWA GORDON.
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "KAWA" AND T2.lastname  =  "GORDON"

Question: Find the number of students taught by TARRING LEIA.
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "TARRING" AND T2.lastname  =  "LEIA"

Question: How many students are taught by teacher TARRING LEIA?
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "TARRING" AND T2.lastname  =  "LEIA"

Question: How many teachers does the student named CHRISSY NABOZNY have?
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "CHRISSY" AND T1.lastname  =  "NABOZNY"

Question: Find the number of teachers who teach the student called CHRISSY NABOZNY.
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "CHRISSY" AND T1.lastname  =  "NABOZNY"

Question: How many teachers does the student named MADLOCK RAY have?
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "MADLOCK" AND T1.lastname  =  "RAY"

Question: Find the number of teachers who teach the student called MADLOCK RAY.
SQL:
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "MADLOCK" AND T1.lastname  =  "RAY"

Question: Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.
SQL:
SELECT DISTINCT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  1 EXCEPT SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"

Question: What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?
SQL:
SELECT DISTINCT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  1 EXCEPT SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"

Question: Find the last names of the students in third grade that are not taught by COVIN JEROME.
SQL:
SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME"

Question: Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.
SQL:
SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME"

Question: For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.
SQL:
SELECT grade ,  count(DISTINCT classroom) ,  count(*) FROM list GROUP BY grade

Question: For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade.
SQL:
SELECT grade ,  count(DISTINCT classroom) ,  count(*) FROM list GROUP BY grade

Question: For each classroom, report the classroom number and the number of grades using it.
SQL:
SELECT classroom ,  count(DISTINCT grade) FROM list GROUP BY classroom

Question: For each classroom, show the classroom number and count the number of distinct grades that use the room.
SQL:
SELECT classroom ,  count(DISTINCT grade) FROM list GROUP BY classroom

Question: Which classroom has the most students?
SQL:
SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1

Question: Find the classroom that the most students use.
SQL:
SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1

Question: Report the number of students in each classroom.
SQL:
SELECT classroom ,  count(*) FROM list GROUP BY classroom

Question: For each classroom, show the classroom number and find how many students are using it.
SQL:
SELECT classroom ,  count(*) FROM list GROUP BY classroom

Question: For each grade 0 classroom, report the total number of students.
SQL:
SELECT classroom ,  count(*) FROM list WHERE grade  =  "0" GROUP BY classroom

Question: For each grade 0 classroom, return the classroom number and the count of students.
SQL:
SELECT classroom ,  count(*) FROM list WHERE grade  =  "0" GROUP BY classroom

Question: Report the total number of students for each fourth-grade classroom.
SQL:
SELECT classroom ,  count(*) FROM list WHERE grade  =  "4" GROUP BY classroom

Question: For each fourth-grade classroom, show the classroom number and the total number of students using it.
SQL:
SELECT classroom ,  count(*) FROM list WHERE grade  =  "4" GROUP BY classroom

Question: Find the name of the teacher who teaches the largest number of students.
SQL:
SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom GROUP BY T2.firstname ,  T2.lastname ORDER BY count(*) DESC LIMIT 1

Question: Which teacher teaches the most students? Give me the first name and last name of the teacher.
SQL:
SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom GROUP BY T2.firstname ,  T2.lastname ORDER BY count(*) DESC LIMIT 1

Question: Find the number of students in one classroom.
SQL:
SELECT count(*) ,  classroom FROM list GROUP BY classroom

Question: How many students does one classroom have?
SQL:
SELECT count(*) ,  classroom FROM list GROUP BY classroom