db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
ship_mission | select name from ship order by tonnage asc | Question: list the name of ships in ascending order of tonnage. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | list the name of ships in ascending order of tonnage. |
ship_mission | select name from ship order by tonnage asc | Question: what are the names of the ships ordered by ascending tonnage? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the names of the ships ordered by ascending tonnage? |
ship_mission | select type , nationality from ship | Question: what are the type and nationality of ships? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the type and nationality of ships? |
ship_mission | select type , nationality from ship | Question: what are the types and nationalities of every ship? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the types and nationalities of every ship? |
ship_mission | select name from ship where nationality != 'united states' | Question: list the name of ships whose nationality is not 'united states'. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | list the name of ships whose nationality is not 'united states'. |
ship_mission | select name from ship where nationality != 'united states' | Question: what are the names of the ships that are not from the united states? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the names of the ships that are not from the united states? |
ship_mission | select name from ship where nationality = 'united states' or nationality = 'united kingdom' | Question: show the name of ships whose nationality is either united states or united kingdom. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | show the name of ships whose nationality is either united states or united kingdom. |
ship_mission | select name from ship where nationality = 'united states' or nationality = 'united kingdom' | Question: what are the names of the ships that are from either the us or the uk? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the names of the ships that are from either the us or the uk? |
ship_mission | select name from ship order by tonnage desc limit 1 | Question: what is the name of the ship with the largest tonnage? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what is the name of the ship with the largest tonnage? |
ship_mission | select name from ship order by tonnage desc limit 1 | Question: what is the ship with the largest amount of tonnage called? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what is the ship with the largest amount of tonnage called? |
ship_mission | select type , count(*) from ship group by type | Question: show different types of ships and the number of ships of each type. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | show different types of ships and the number of ships of each type. |
ship_mission | select type , count(*) from ship group by type | Question: for each type, how many ships are there? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | for each type, how many ships are there? |
ship_mission | select type from ship group by type order by count(*) desc limit 1 | Question: please show the most common type of ships. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | please show the most common type of ships. |
ship_mission | select type from ship group by type order by count(*) desc limit 1 | Question: what is the most common type of ships? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what is the most common type of ships? |
ship_mission | select nationality from ship group by nationality having count(*) > 2 | Question: list the nations that have more than two ships. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | list the nations that have more than two ships. |
ship_mission | select nationality from ship group by nationality having count(*) > 2 | Question: what are the nations that have more than two ships? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the nations that have more than two ships? |
ship_mission | select type , avg(tonnage) from ship group by type | Question: show different types of ships and the average tonnage of ships of each type. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | show different types of ships and the average tonnage of ships of each type. |
ship_mission | select type , avg(tonnage) from ship group by type | Question: for each type, what is the average tonnage? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | for each type, what is the average tonnage? |
ship_mission | select t1.code , t1.fate , t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id | Question: show codes and fates of missions, and names of ships involved. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | show codes and fates of missions, and names of ships involved. |
ship_mission | select t1.code , t1.fate , t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id | Question: what are the mission codes, fates, and names of the ships involved? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the mission codes, fates, and names of the ships involved? |
ship_mission | select t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t1.launched_year > 1928 | Question: show names of ships involved in a mission launched after 1928. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | show names of ships involved in a mission launched after 1928. |
ship_mission | select t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t1.launched_year > 1928 | Question: what are the names of ships that were involved in a mission launched after 1928? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the names of ships that were involved in a mission launched after 1928? |
ship_mission | select distinct t1.fate from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t2.nationality = 'united states' | Question: show the distinct fate of missions that involve ships with nationality 'united states' | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | show the distinct fate of missions that involve ships with nationality 'united states' |
ship_mission | select distinct t1.fate from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t2.nationality = 'united states' | Question: what are the different fates of the mission that involved ships from the united states? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the different fates of the mission that involved ships from the united states? |
ship_mission | select name from ship where ship_id not in (select ship_id from mission) | Question: list the name of ships that are not involved in any mission | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | list the name of ships that are not involved in any mission |
ship_mission | select name from ship where ship_id not in (select ship_id from mission) | Question: what are the names of the ships that are not involved in any missions? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the names of the ships that are not involved in any missions? |
ship_mission | select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000 | Question: show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. |
ship_mission | select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000 | Question: what are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000? | Tables: mission -> Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate. ship -> Ship_ID, Name, Type, Nationality, Tonnage. | Joins: mission.Ship_ID = ship.Ship_ID, | what are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000? |
student_1 | select count(*) from list | Question: find the number of students in total. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the number of students in total. |
student_1 | select count(*) from list | Question: how many students are there? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | how many students are there? |
student_1 | select lastname from list where classroom = 111 | Question: find the last names of students studying in room 111. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the last names of students studying in room 111. |
student_1 | select lastname from list where classroom = 111 | Question: what are the last names of students in room 111? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the last names of students in room 111? |
student_1 | select firstname from list where classroom = 108 | Question: find the first names of students studying in room 108. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the first names of students studying in room 108. |
student_1 | select firstname from list where classroom = 108 | Question: what are the first names of students in room 108? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the first names of students in room 108? |
student_1 | select distinct firstname from list where classroom = 107 | Question: what are the first names of students studying in room 107? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the first names of students studying in room 107? |
student_1 | select distinct firstname from list where classroom = 107 | Question: list the first names of all the students in room 107. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | list the first names of all the students in room 107. |
student_1 | select distinct classroom , grade from list | Question: for each classroom report the grade that is taught in it. report just the classroom number and the grade number. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each classroom report the grade that is taught in it. report just the classroom number and the grade number. |
student_1 | select distinct classroom , grade from list | Question: what are the grade number and classroom number of each class in the list? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the grade number and classroom number of each class in the list? |
student_1 | select distinct grade from list where classroom = 103 | Question: which grade is studying in classroom 103? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which grade is studying in classroom 103? |
student_1 | select distinct grade from list where classroom = 103 | Question: find the grade taught in classroom 103. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the grade taught in classroom 103. |
student_1 | select distinct grade from list where classroom = 105 | Question: find the grade studying in room 105. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the grade studying in room 105. |
student_1 | select distinct grade from list where classroom = 105 | Question: which grade is studying in room 105? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which grade is studying in room 105? |
student_1 | select distinct classroom from list where grade = 4 | Question: which classrooms are used by grade 4? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which classrooms are used by grade 4? |
student_1 | select distinct classroom from list where grade = 4 | Question: find the classrooms in which grade 4 is studying. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the classrooms in which grade 4 is studying. |
student_1 | select distinct classroom from list where grade = 5 | Question: which classrooms are used by grade 5? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which classrooms are used by grade 5? |
student_1 | select distinct classroom from list where grade = 5 | Question: show me the classrooms grade 5 is using. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | show me the classrooms grade 5 is using. |
student_1 | select distinct t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where grade = 5 | Question: find the last names of the teachers that teach fifth grade. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the last names of the teachers that teach fifth grade. |
student_1 | 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? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the last names of the teachers who teach grade 5? |
student_1 | 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 the teachers that teach first grade. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the first names of the teachers that teach first grade. |
student_1 | 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? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the first names of the teachers who teach grade 1? |
student_1 | select firstname from teachers where classroom = 110 | Question: find the first names of all the teachers that teach in classroom 110. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the first names of all the teachers that teach in classroom 110. |
student_1 | select firstname from teachers where classroom = 110 | Question: which teachers teach in classroom 110? give me their first names. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which teachers teach in classroom 110? give me their first names. |
student_1 | select lastname from teachers where classroom = 109 | Question: find the last names of teachers teaching in classroom 109. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the last names of teachers teaching in classroom 109. |
student_1 | select lastname from teachers where classroom = 109 | Question: which teachers teach in classroom 109? give me their last names. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which teachers teach in classroom 109? give me their last names. |
student_1 | select distinct firstname , lastname from teachers | Question: report the first name and last name of all the teachers. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | report the first name and last name of all the teachers. |
student_1 | select distinct firstname , lastname from teachers | Question: what are the first name and last name of all the teachers? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the first name and last name of all the teachers? |
student_1 | select distinct firstname , lastname from list | Question: report the first name and last name of all the students. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | report the first name and last name of all the students. |
student_1 | select distinct firstname , lastname from list | Question: show each student's first name and last name. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | show each student's first name and last name. |
student_1 | 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 otha moyer. output the first and last names of the students. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find all students taught by otha moyer. output the first and last names of the students. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which students study under the teacher named otha moyer? give me the first and last names of the students. |
student_1 | 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 all students taught by marrotte kirk. output first and last names of students. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find all students taught by marrotte kirk. output first and last names of students. |
student_1 | 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? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which are the first and last names of the students taught by marrotte kirk? |
student_1 | 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 first and last name of all the teachers that teach evelina bromley. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the first and last name of all the teachers that teach evelina bromley. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which teachers teach the student named evelina bromley? give me the first and last name of the teachers. |
student_1 | 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: find the last names of all the teachers that teach gell tami. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the last names of all the teachers that teach gell tami. |
student_1 | 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? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the last names of the teachers who teach the student called gell tami? |
student_1 | 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 loria ondersma teaches? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | how many students does loria ondersma teaches? |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | count the number of students the teacher loria ondersma teaches. |
student_1 | select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = 'kawa' and t2.lastname = 'gordon' | Question: how many students does kawa gordon teaches? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | how many students does kawa gordon teaches? |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the number of students taught by the teacher kawa gordon. |
student_1 | select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = 'tarring' and t2.lastname = 'leia' | Question: find the number of students taught by tarring leia. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the number of students taught by tarring leia. |
student_1 | 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? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | how many students are taught by teacher tarring leia? |
student_1 | 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 chrissy nabozny have? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | how many teachers does the student named chrissy nabozny have? |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the number of teachers who teach the student called chrissy nabozny. |
student_1 | select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = 'madlock' and t1.lastname = 'ray' | Question: how many teachers does the student named madlock ray have? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | how many teachers does the student named madlock ray have? |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the number of teachers who teach the student called madlock ray. |
student_1 | 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 all first-grade students who are not taught by otha moyer. report their first and last names. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find all first-grade students who are not taught by otha moyer. report their first and last names. |
student_1 | 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? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | what are the first and last names of the first-grade students who are not taught by teacher otha moyer? |
student_1 | 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: find the last names of the students in third grade that are not taught by covin jerome. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the last names of the students in third grade that are not taught by covin jerome. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which students in third grade are not taught by teacher covin jerome? give me the last names of the students. |
student_1 | select grade , count(distinct classroom) , count(*) from list group by grade | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | 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. |
student_1 | select classroom , count(distinct grade) from list group by classroom | Question: for each classroom, report the classroom number and the number of grades using it. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each classroom, report the classroom number and the number of grades using it. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each classroom, show the classroom number and count the number of distinct grades that use the room. |
student_1 | select classroom from list group by classroom order by count(*) desc limit 1 | Question: which classroom has the most students? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which classroom has the most students? |
student_1 | select classroom from list group by classroom order by count(*) desc limit 1 | Question: find the classroom that the most students use. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the classroom that the most students use. |
student_1 | select classroom , count(*) from list group by classroom | Question: report the number of students in each classroom. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | report the number of students in each classroom. |
student_1 | select classroom , count(*) from list group by classroom | Question: for each classroom, show the classroom number and find how many students are using it. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each classroom, show the classroom number and find how many students are using it. |
student_1 | select classroom , count(*) from list where grade = '0' group by classroom | Question: for each grade 0 classroom, report the total number of students. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each grade 0 classroom, report the total number of students. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each grade 0 classroom, return the classroom number and the count of students. |
student_1 | select classroom , count(*) from list where grade = '4' group by classroom | Question: report the total number of students for each fourth-grade classroom. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | report the total number of students for each fourth-grade classroom. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | for each fourth-grade classroom, show the classroom number and the total number of students using it. |
student_1 | 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 name of the teacher who teaches the largest number of students. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the name of the teacher who teaches the largest number of students. |
student_1 | 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. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | which teacher teaches the most students? give me the first name and last name of the teacher. |
student_1 | select count(*) , classroom from list group by classroom | Question: find the number of students in one classroom. | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | find the number of students in one classroom. |
student_1 | select count(*) , classroom from list group by classroom | Question: how many students does one classroom have? | Tables: list -> LastName, FirstName, Grade, Classroom. teachers -> LastName, FirstName, Classroom. | Joins: | how many students does one classroom have? |
company_employee | select count(*) from company where headquarters = 'usa' | Question: how many companies are headquartered in the us? | Tables: people -> People_ID, Age, Name, Nationality, Graduation_College. company -> Company_ID, Name, Headquarters, Industry, Sales_in_Billion, Profits_in_Billion, Assets_in_Billion, Market_Value_in_Billion. employment -> Company_ID, People_ID, Year_working. |... | how many companies are headquartered in the us? |
company_employee | select name from company order by sales_in_billion asc | Question: list the names of companies by ascending number of sales. | Tables: people -> People_ID, Age, Name, Nationality, Graduation_College. company -> Company_ID, Name, Headquarters, Industry, Sales_in_Billion, Profits_in_Billion, Assets_in_Billion, Market_Value_in_Billion. employment -> Company_ID, People_ID, Year_... | list the names of companies by ascending number of sales. |
company_employee | select headquarters , industry from company | Question: what are the headquarters and industries of all companies? | Tables: people -> People_ID, Age, Name, Nationality, Graduation_College. company -> Company_ID, Name, Headquarters, Industry, Sales_in_Billion, Profits_in_Billion, Assets_in_Billion, Market_Value_in_Billion. employment -> Company_ID, People_ID, Year... | what are the headquarters and industries of all companies? |
company_employee | select name from company where industry = 'banking' or industry = 'retailing' | Question: show the names of companies in the banking or retailing industry? | Tables: people -> People_ID, Age, Name, Nationality, Graduation_College. company -> Company_ID, Name, Headquarters, Industry, Sales_in_Billion, Profits_in_Billion, Assets_in_Billion, Market_Value_in_Billion. employment -> Company_ID, People_I... | show the names of companies in the banking or retailing industry? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.