input stringlengths 667 7.62k | output stringlengths 41 600 | db_id stringlengths 3 31 | query stringlengths 18 577 | question stringlengths 3 224 | schema stringlengths 177 6.14k | primary_keys stringlengths 16 545 | foreign_keys stringlengths 16 1.48k |
|---|---|---|---|---|---|---|---|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of ships in ascending order of tonnage.</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship ORDER BY Tonnage ASC</SQL_QUERY> | ship_mission | SELECT Name FROM ship ORDER BY Tonnage ASC | List the name of ships in ascending order of tonnage. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>what are the names of the ships ordered by ascending tonnage?</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship ORDER BY Tonnage ASC</SQL_QUERY> | ship_mission | SELECT Name FROM ship ORDER BY Tonnage ASC | what are the names of the ships ordered by ascending tonnage? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the type and nationality of ships?</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE , Nationality FROM ship</SQL_QUERY> | ship_mission | SELECT TYPE , Nationality FROM ship | What are the type and nationality of ships? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the types and nationalities of every ship?</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE , Nationality FROM ship</SQL_QUERY> | ship_mission | SELECT TYPE , Nationality FROM ship | What are the types and nationalities of every ship? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of ships whose nationality is not "United States".</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship WHERE Nationality != "United States"</SQL_QUERY> | ship_mission | SELECT Name FROM ship WHERE Nationality != "United States" | List the name of ships whose nationality is not "United States". | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the ships that are not from the United States?</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship WHERE Nationality != "United States"</SQL_QUERY> | ship_mission | SELECT Name FROM ship WHERE Nationality != "United States" | What are the names of the ships that are not from the United States? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the name of ships whose nationality is either United States or United Kingdom.</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom"</SQL_QUERY> | ship_mission | SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom" | Show the name of ships whose nationality is either United States or United Kingdom. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the ships that are from either the US or the UK?</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom"</SQL_QUERY> | ship_mission | SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom" | What are the names of the ships that are from either the US or the UK? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the ship with the largest tonnage?</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1</SQL_QUERY> | ship_mission | SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1 | What is the name of the ship with the largest tonnage? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the ship with the largest amount of tonnage called?</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1</SQL_QUERY> | ship_mission | SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1 | What is the ship with the largest amount of tonnage called? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show different types of ships and the number of ships of each type.</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE</SQL_QUERY> | ship_mission | SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE | Show different types of ships and the number of ships of each type. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each type, how many ships are there?</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE</SQL_QUERY> | ship_mission | SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE | For each type, how many ships are there? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Please show the most common type of ships.</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY> | ship_mission | SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | Please show the most common type of ships. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the most common type of ships?</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY> | ship_mission | SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | What is the most common type of ships? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the nations that have more than two ships.</question>
[SQL]:
| <SQL_QUERY>SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2</SQL_QUERY> | ship_mission | SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2 | List the nations that have more than two ships. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the nations that have more than two ships?</question>
[SQL]:
| <SQL_QUERY>SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2</SQL_QUERY> | ship_mission | SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2 | What are the nations that have more than two ships? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show different types of ships and the average tonnage of ships of each type.</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE</SQL_QUERY> | ship_mission | SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE | Show different types of ships and the average tonnage of ships of each type. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each type, what is the average tonnage?</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE</SQL_QUERY> | ship_mission | SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE | For each type, what is the average tonnage? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show codes and fates of missions, and names of ships involved.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID</SQL_QUERY> | ship_mission | SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID | Show codes and fates of missions, and names of ships involved. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the mission codes, fates, and names of the ships involved?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID</SQL_QUERY> | ship_mission | SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID | What are the mission codes, fates, and names of the ships involved? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show names of ships involved in a mission launched after 1928.</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928</SQL_QUERY> | 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 | Show names of ships involved in a mission launched after 1928. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of ships that were involved in a mission launched after 1928?</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928</SQL_QUERY> | 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 | What are the names of ships that were involved in a mission launched after 1928? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the distinct fate of missions that involve ships with nationality "United States"</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = "United States"</SQL_QUERY> | 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" | Show the distinct fate of missions that involve ships with nationality "United States" | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different fates of the mission that involved ships from the United States?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = "United States"</SQL_QUERY> | 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" | What are the different fates of the mission that involved ships from the United States? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of ships that are not involved in any mission</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)</SQL_QUERY> | ship_mission | SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission) | List the name of ships that are not involved in any mission | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the ships that are not involved in any missions?</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)</SQL_QUERY> | ship_mission | SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission) | What are the names of the ships that are not involved in any missions? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000</SQL_QUERY> | ship_mission | SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000 | Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number);</schema>"
<primary_keys>[Primary Keys]: mission : mission_id, ship : ship_id</primary_keys>"
<foreign_keys>[Foreign Keys]: mission : ship_id = ship : ship_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?</question>
[SQL]:
| <SQL_QUERY>SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000</SQL_QUERY> | ship_mission | SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000 | What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000? | [Schema (values) (types)]: | ship_mission | mission : mission_id (text) , ship_id (number) , code (number) , launched_year (text) , location (number) , speed_knots (text) , fate (number) | ship : ship_id (text) , name (number) , type (number) , nationality (text) , tonnage (number); | [Primary Keys]: mission : mission_id, ship : ship_id | [Foreign Keys]: mission : ship_id = ship : ship_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of students in total.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list</SQL_QUERY> | student_1 | SELECT count(*) FROM list | Find the number of students in total. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>How many students are there?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list</SQL_QUERY> | student_1 | SELECT count(*) FROM list | How many students are there? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the last names of students studying in room 111.</question>
[SQL]:
| <SQL_QUERY>SELECT lastname FROM list WHERE classroom = 111</SQL_QUERY> | student_1 | SELECT lastname FROM list WHERE classroom = 111 | Find the last names of students studying in room 111. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the last names of students in room 111?</question>
[SQL]:
| <SQL_QUERY>SELECT lastname FROM list WHERE classroom = 111</SQL_QUERY> | student_1 | SELECT lastname FROM list WHERE classroom = 111 | What are the last names of students in room 111? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first names of students studying in room 108.</question>
[SQL]:
| <SQL_QUERY>SELECT firstname FROM list WHERE classroom = 108</SQL_QUERY> | student_1 | SELECT firstname FROM list WHERE classroom = 108 | Find the first names of students studying in room 108. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first names of students in room 108?</question>
[SQL]:
| <SQL_QUERY>SELECT firstname FROM list WHERE classroom = 108</SQL_QUERY> | student_1 | SELECT firstname FROM list WHERE classroom = 108 | What are the first names of students in room 108? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first names of students studying in room 107?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT firstname FROM list WHERE classroom = 107</SQL_QUERY> | student_1 | SELECT DISTINCT firstname FROM list WHERE classroom = 107 | What are the first names of students studying in room 107? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>List the first names of all the students in room 107.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT firstname FROM list WHERE classroom = 107</SQL_QUERY> | student_1 | SELECT DISTINCT firstname FROM list WHERE classroom = 107 | List the first names of all the students in room 107. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT classroom , grade FROM list</SQL_QUERY> | student_1 | SELECT DISTINCT classroom , grade FROM list | For each classroom report the grade that is taught in it. Report just the classroom number and the grade number. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the grade number and classroom number of each class in the list?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT classroom , grade FROM list</SQL_QUERY> | student_1 | SELECT DISTINCT classroom , grade FROM list | What are the grade number and classroom number of each class in the list? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which grade is studying in classroom 103?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT grade FROM list WHERE classroom = 103</SQL_QUERY> | student_1 | SELECT DISTINCT grade FROM list WHERE classroom = 103 | Which grade is studying in classroom 103? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the grade taught in classroom 103.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT grade FROM list WHERE classroom = 103</SQL_QUERY> | student_1 | SELECT DISTINCT grade FROM list WHERE classroom = 103 | Find the grade taught in classroom 103. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the grade studying in room 105.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT grade FROM list WHERE classroom = 105</SQL_QUERY> | student_1 | SELECT DISTINCT grade FROM list WHERE classroom = 105 | Find the grade studying in room 105. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which grade is studying in room 105?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT grade FROM list WHERE classroom = 105</SQL_QUERY> | student_1 | SELECT DISTINCT grade FROM list WHERE classroom = 105 | Which grade is studying in room 105? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which classrooms are used by grade 4?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT classroom FROM list WHERE grade = 4</SQL_QUERY> | student_1 | SELECT DISTINCT classroom FROM list WHERE grade = 4 | Which classrooms are used by grade 4? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the classrooms in which grade 4 is studying.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT classroom FROM list WHERE grade = 4</SQL_QUERY> | student_1 | SELECT DISTINCT classroom FROM list WHERE grade = 4 | Find the classrooms in which grade 4 is studying. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which classrooms are used by grade 5?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT classroom FROM list WHERE grade = 5</SQL_QUERY> | student_1 | SELECT DISTINCT classroom FROM list WHERE grade = 5 | Which classrooms are used by grade 5? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Show me the classrooms grade 5 is using.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT classroom FROM list WHERE grade = 5</SQL_QUERY> | student_1 | SELECT DISTINCT classroom FROM list WHERE grade = 5 | Show me the classrooms grade 5 is using. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the last names of the teachers that teach fifth grade.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5</SQL_QUERY> | student_1 | SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5 | Find the last names of the teachers that teach fifth grade. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>what are the last names of the teachers who teach grade 5?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5</SQL_QUERY> | student_1 | SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5 | what are the last names of the teachers who teach grade 5? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first names of the teachers that teach first grade.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1</SQL_QUERY> | student_1 | SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1 | Find the first names of the teachers that teach first grade. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first names of the teachers who teach grade 1?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1</SQL_QUERY> | student_1 | SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1 | What are the first names of the teachers who teach grade 1? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first names of all the teachers that teach in classroom 110.</question>
[SQL]:
| <SQL_QUERY>SELECT firstname FROM teachers WHERE classroom = 110</SQL_QUERY> | student_1 | SELECT firstname FROM teachers WHERE classroom = 110 | Find the first names of all the teachers that teach in classroom 110. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which teachers teach in classroom 110? Give me their first names.</question>
[SQL]:
| <SQL_QUERY>SELECT firstname FROM teachers WHERE classroom = 110</SQL_QUERY> | student_1 | SELECT firstname FROM teachers WHERE classroom = 110 | Which teachers teach in classroom 110? Give me their first names. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the last names of teachers teaching in classroom 109.</question>
[SQL]:
| <SQL_QUERY>SELECT lastname FROM teachers WHERE classroom = 109</SQL_QUERY> | student_1 | SELECT lastname FROM teachers WHERE classroom = 109 | Find the last names of teachers teaching in classroom 109. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which teachers teach in classroom 109? Give me their last names.</question>
[SQL]:
| <SQL_QUERY>SELECT lastname FROM teachers WHERE classroom = 109</SQL_QUERY> | student_1 | SELECT lastname FROM teachers WHERE classroom = 109 | Which teachers teach in classroom 109? Give me their last names. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Report the first name and last name of all the teachers.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT firstname , lastname FROM teachers</SQL_QUERY> | student_1 | SELECT DISTINCT firstname , lastname FROM teachers | Report the first name and last name of all the teachers. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first name and last name of all the teachers?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT firstname , lastname FROM teachers</SQL_QUERY> | student_1 | SELECT DISTINCT firstname , lastname FROM teachers | What are the first name and last name of all the teachers? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Report the first name and last name of all the students.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT firstname , lastname FROM list</SQL_QUERY> | student_1 | SELECT DISTINCT firstname , lastname FROM list | Report the first name and last name of all the students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Show each student's first name and last name.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT firstname , lastname FROM list</SQL_QUERY> | student_1 | SELECT DISTINCT firstname , lastname FROM list | Show each student's first name and last name. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find all students taught by OTHA MOYER. Output the first and last names of the students.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find all students taught by OTHA MOYER. Output the first and last names of the students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find all students taught by MARROTTE KIRK. Output first and last names of students.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find all students taught by MARROTTE KIRK. Output first and last names of students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which are the first and last names of the students taught by MARROTTE KIRK?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Which are the first and last names of the students taught by MARROTTE KIRK? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first and last name of all the teachers that teach EVELINA BROMLEY.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find the first and last name of all the teachers that teach EVELINA BROMLEY. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the last names of all the teachers that teach GELL TAMI.</question>
[SQL]:
| <SQL_QUERY>SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "GELL" AND T1.lastname = "TAMI"</SQL_QUERY> | 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" | Find the last names of all the teachers that teach GELL TAMI. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the last names of the teachers who teach the student called GELL TAMI?</question>
[SQL]:
| <SQL_QUERY>SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "GELL" AND T1.lastname = "TAMI"</SQL_QUERY> | 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" | What are the last names of the teachers who teach the student called GELL TAMI? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>How many students does LORIA ONDERSMA teaches?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA"</SQL_QUERY> | 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" | How many students does LORIA ONDERSMA teaches? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of students the teacher LORIA ONDERSMA teaches.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA"</SQL_QUERY> | 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" | Count the number of students the teacher LORIA ONDERSMA teaches. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>How many students does KAWA GORDON teaches?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON"</SQL_QUERY> | 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" | How many students does KAWA GORDON teaches? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of students taught by the teacher KAWA GORDON.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON"</SQL_QUERY> | 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" | Find the number of students taught by the teacher KAWA GORDON. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of students taught by TARRING LEIA.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA"</SQL_QUERY> | 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" | Find the number of students taught by TARRING LEIA. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>How many students are taught by teacher TARRING LEIA?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA"</SQL_QUERY> | 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" | How many students are taught by teacher TARRING LEIA? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>How many teachers does the student named CHRISSY NABOZNY have?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY"</SQL_QUERY> | 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" | How many teachers does the student named CHRISSY NABOZNY have? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of teachers who teach the student called CHRISSY NABOZNY.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY"</SQL_QUERY> | 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" | Find the number of teachers who teach the student called CHRISSY NABOZNY. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>How many teachers does the student named MADLOCK RAY have?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY"</SQL_QUERY> | 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" | How many teachers does the student named MADLOCK RAY have? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of teachers who teach the student called MADLOCK RAY.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY"</SQL_QUERY> | 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" | Find the number of teachers who teach the student called MADLOCK RAY. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the last names of the students in third grade that are not taught by COVIN JEROME.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find the last names of the students in third grade that are not taught by COVIN JEROME. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<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.</question>
[SQL]:
| <SQL_QUERY>SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade</SQL_QUERY> | student_1 | SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade | For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<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.</question>
[SQL]:
| <SQL_QUERY>SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade</SQL_QUERY> | student_1 | SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade | 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. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>For each classroom, report the classroom number and the number of grades using it.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom | For each classroom, report the classroom number and the number of grades using it. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>For each classroom, show the classroom number and count the number of distinct grades that use the room.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom | For each classroom, show the classroom number and count the number of distinct grades that use the room. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which classroom has the most students?</question>
[SQL]:
| <SQL_QUERY>SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | student_1 | SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1 | Which classroom has the most students? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the classroom that the most students use.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | student_1 | SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1 | Find the classroom that the most students use. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Report the number of students in each classroom.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(*) FROM list GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(*) FROM list GROUP BY classroom | Report the number of students in each classroom. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>For each classroom, show the classroom number and find how many students are using it.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(*) FROM list GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(*) FROM list GROUP BY classroom | For each classroom, show the classroom number and find how many students are using it. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>For each grade 0 classroom, report the total number of students.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom | For each grade 0 classroom, report the total number of students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>For each grade 0 classroom, return the classroom number and the count of students.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom | For each grade 0 classroom, return the classroom number and the count of students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Report the total number of students for each fourth-grade classroom.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(*) FROM list WHERE grade = "4" GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(*) FROM list WHERE grade = "4" GROUP BY classroom | Report the total number of students for each fourth-grade classroom. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>For each fourth-grade classroom, show the classroom number and the total number of students using it.</question>
[SQL]:
| <SQL_QUERY>SELECT classroom , count(*) FROM list WHERE grade = "4" GROUP BY classroom</SQL_QUERY> | student_1 | SELECT classroom , count(*) FROM list WHERE grade = "4" GROUP BY classroom | For each fourth-grade classroom, show the classroom number and the total number of students using it. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of the teacher who teaches the largest number of students.</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | Find the name of the teacher who teaches the largest number of students. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Which teacher teaches the most students? Give me the first name and last name of the teacher.</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | Which teacher teaches the most students? Give me the first name and last name of the teacher. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of students in one classroom.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) , classroom FROM list GROUP BY classroom</SQL_QUERY> | student_1 | SELECT count(*) , classroom FROM list GROUP BY classroom | Find the number of students in one classroom. | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text);</schema>"
<primary_keys>[Primary Keys]: list : lastname, teachers : lastname</primary_keys>"
<foreign_keys>[Foreign Keys]: </foreign_keys>"
Answer the following question with a SQL Statement:<question>How many students does one classroom have?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) , classroom FROM list GROUP BY classroom</SQL_QUERY> | student_1 | SELECT count(*) , classroom FROM list GROUP BY classroom | How many students does one classroom have? | [Schema (values) (types)]: | student_1 | list : lastname (text) , firstname (text) , grade (text) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (text); | [Primary Keys]: list : lastname, teachers : lastname | [Foreign Keys]: |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number);</schema>"
<primary_keys>[Primary Keys]: people : people_id, company : company_id, employment : company_id</primary_keys>"
<foreign_keys>[Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many companies are headquartered in the US?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM company WHERE Headquarters = 'USA'</SQL_QUERY> | company_employee | SELECT count(*) FROM company WHERE Headquarters = 'USA' | How many companies are headquartered in the US? | [Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number); | [Primary Keys]: people : people_id, company : company_id, employment : company_id | [Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number);</schema>"
<primary_keys>[Primary Keys]: people : people_id, company : company_id, employment : company_id</primary_keys>"
<foreign_keys>[Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the names of companies by ascending number of sales.</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM company ORDER BY Sales_in_Billion ASC</SQL_QUERY> | company_employee | SELECT Name FROM company ORDER BY Sales_in_Billion ASC | List the names of companies by ascending number of sales. | [Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number); | [Primary Keys]: people : people_id, company : company_id, employment : company_id | [Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number);</schema>"
<primary_keys>[Primary Keys]: people : people_id, company : company_id, employment : company_id</primary_keys>"
<foreign_keys>[Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the headquarters and industries of all companies?</question>
[SQL]:
| <SQL_QUERY>SELECT Headquarters , Industry FROM company</SQL_QUERY> | company_employee | SELECT Headquarters , Industry FROM company | What are the headquarters and industries of all companies? | [Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number); | [Primary Keys]: people : people_id, company : company_id, employment : company_id | [Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number);</schema>"
<primary_keys>[Primary Keys]: people : people_id, company : company_id, employment : company_id</primary_keys>"
<foreign_keys>[Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the names of companies in the banking or retailing industry?</question>
[SQL]:
| <SQL_QUERY>SELECT Name FROM company WHERE Industry = "Banking" OR Industry = "Retailing"</SQL_QUERY> | company_employee | SELECT Name FROM company WHERE Industry = "Banking" OR Industry = "Retailing" | Show the names of companies in the banking or retailing industry? | [Schema (values) (types)]: | company_employee | people : people_id (text) , age (number) , name (number) , nationality (text) , graduation_college (text) | company : company_id (text) , name (number) , headquarters (number) , industry (text) , sales_in_billion (text) , profits_in_billion (text) , assets_in_billion (number) , market_value_in_billion (text) | employment : company_id (text) , people_id (number) , year_working (number); | [Primary Keys]: people : people_id, company : company_id, employment : company_id | [Foreign Keys]: employment : people_id = people : people_id | employment : company_id = company : company_id |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.