CREATE TABLE list (
    LastName TEXT PRIMARY KEY,
    FirstName TEXT,
    Grade NUMBER,
    Classroom NUMBER
);
CREATE TABLE teachers (
    LastName TEXT PRIMARY KEY,
    FirstName TEXT,
    Classroom NUMBER
);

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"