brief_instruction stringlengths 16 224 | instruction stringlengths 687 8.77k | output stringlengths 18 577 |
|---|---|---|
Return the total and minimum enrollments across all schools. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return the total and minimum enrollments across all schools.` to a syntactically-correct PostgreSQL query.
| SELECT sum(enrollment) , min(enrollment) FROM university |
Find the total student enrollment for different affiliation type schools. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the total student enrollment for different affiliation type schools.` to a syntactically-correct PostgreSQL query.
| SELECT sum(enrollment) , affiliation FROM university GROUP BY affiliation |
What are the total enrollments of universities of each affiliation type? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the total enrollments of universities of each affiliation type?` to a syntactically-correct PostgreSQL query.
| SELECT sum(enrollment) , affiliation FROM university GROUP BY affiliation |
How many schools do not participate in the basketball match? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many schools do not participate in the basketball match?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match) |
Count the number of universities that do not participate in the baketball match. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of universities that do not participate in the baketball match.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match) |
Find the schools that were either founded after 1850 or public. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the schools that were either founded after 1850 or public.` to a syntactically-correct PostgreSQL query.
| SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' |
What are the schools that were either founded before 1850 or are public? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the schools that were either founded before 1850 or are public?` to a syntactically-correct PostgreSQL query.
| SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' |
Find how many different affiliation types there are. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find how many different affiliation types there are.` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT affiliation) FROM university |
Count the number of different affiliation types. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of different affiliation types.` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT affiliation) FROM university |
Find how many school locations have the word 'NY'. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find how many school locations have the word 'NY'.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM university WHERE LOCATION LIKE "%NY%" |
How many universities have a location that contains NY? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many universities have a location that contains NY?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM university WHERE LOCATION LIKE "%NY%" |
Find the team names of the universities whose enrollments are smaller than the average enrollment size. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the team names of the universities whose enrollments are smaller than the average enrollment size.` to a syntactically-correct PostgreSQL query.
| SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university) |
What are the names of teams from universities that have a below average enrollment? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of teams from universities that have a below average enrollment?` to a syntactically-correct PostgreSQL query.
| SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university) |
Find the number of universities that have over a 20000 enrollment size for each affiliation type. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the number of universities that have over a 20000 enrollment size for each affiliation type.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation |
What are the different affiliations, and how many schools with each have an enrollment size of above 20000? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the different affiliations, and how many schools with each have an enrollment size of above 20000?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation |
Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.` to a syntactically-correct PostgreSQL query.
| SELECT sum(Enrollment) , affiliation FROM university WHERE founded > 1850 GROUP BY affiliation |
What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?` to a syntactically-correct PostgreSQL query.
| SELECT sum(Enrollment) , affiliation FROM university WHERE founded > 1850 GROUP BY affiliation |
What is the maximum enrollment across all schools? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the maximum enrollment across all schools?` to a syntactically-correct PostgreSQL query.
| SELECT max(Enrollment) FROM university |
Return the maximum enrollment across all schools. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return the maximum enrollment across all schools.` to a syntactically-correct PostgreSQL query.
| SELECT max(Enrollment) FROM university |
List all information regarding the basketball match. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List all information regarding the basketball match.` to a syntactically-correct PostgreSQL query.
| SELECT * FROM basketball_match |
What is all the information about the basketball match? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is all the information about the basketball match?` to a syntactically-correct PostgreSQL query.
| SELECT * FROM basketball_match |
List names of all teams in the basketball competition, ordered by all home scores in descending order. |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List names of all teams in the basketball competition, ordered by all home scores in descending order.` to a syntactically-correct PostgreSQL query.
| SELECT team_name FROM basketball_match ORDER BY All_Home DESC |
What are the names of all the teams in the basketball competition, sorted by all home scores in descending order? |
-- Language PostgreSQL
-- Tables:
-- Table: basketball match
columns : [['team id', 'number'], ['school id', 'number'], ['team name', 'text'], ['acc regular season', 'text'], ['acc percent', 'text'], ['acc home', 'text'], ['acc road', 'text'], ['all games', 'text'], ['all games percent', 'number'], ['all home', 'text'], ['all road', 'text'], ['all neutral', 'text']]
-- Table: university
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['founded', 'number'], ['affiliation', 'text'], ['enrollment', 'number'], ['nickname', 'text'], ['primary conference', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?` to a syntactically-correct PostgreSQL query.
| SELECT team_name FROM basketball_match ORDER BY All_Home DESC |
the names of models that launched between 2002 and 2004. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `the names of models that launched between 2002 and 2004.` to a syntactically-correct PostgreSQL query.
| SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004; |
Which model has the least amount of RAM? List the model name and the amount of RAM. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Which model has the least amount of RAM? List the model name and the amount of RAM.` to a syntactically-correct PostgreSQL query.
| SELECT Model_name , RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC LIMIT 1; |
What are the chip model and screen mode of the phone with hardware model name "LG-P760"? |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the chip model and screen mode of the phone with hardware model name "LG-P760"?` to a syntactically-correct PostgreSQL query.
| SELECT chip_model , screen_mode FROM phone WHERE Hardware_Model_name = "LG-P760"; |
How many phone hardware models are produced by the company named "Nokia Corporation"? |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many phone hardware models are produced by the company named "Nokia Corporation"?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM phone WHERE Company_name = "Nokia Corporation"; |
What is maximum and minimum RAM size of phone produced by company named "Nokia Corporation"? |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is maximum and minimum RAM size of phone produced by company named "Nokia Corporation"?` to a syntactically-correct PostgreSQL query.
| SELECT max(T1.RAM_MiB) , min(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = "Nokia Corporation"; |
What is the average ROM size of phones produced by the company named "Nokia Corporation"? |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the average ROM size of phones produced by the company named "Nokia Corporation"?` to a syntactically-correct PostgreSQL query.
| SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = "Nokia Corporation"; |
List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.` to a syntactically-correct PostgreSQL query.
| SELECT T2.Hardware_Model_name , T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32; |
Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.` to a syntactically-correct PostgreSQL query.
| SELECT Hardware_Model_name , Company_name FROM phone WHERE Accreditation_type LIKE 'Full'; |
Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760". |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760".` to a syntactically-correct PostgreSQL query.
| SELECT T1.Char_cells , T1.Pixels , T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = "LG-P760"; |
List the hardware model name and company name for the phone whose screen mode type is "Graphics." |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the hardware model name and company name for the phone whose screen mode type is "Graphics."` to a syntactically-correct PostgreSQL query.
| SELECT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = "Graphics"; |
Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.` to a syntactically-correct PostgreSQL query.
| SELECT Company_name , count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1; |
List the name of the company that produced more than one phone model. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the name of the company that produced more than one phone model.` to a syntactically-correct PostgreSQL query.
| SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*) > 1; |
List the maximum, minimum and average number of used kb in screen mode. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the maximum, minimum and average number of used kb in screen mode.` to a syntactically-correct PostgreSQL query.
| SELECT max(used_kb) , min(used_kb) , avg(used_kb) FROM screen_mode; |
List the name of the phone model launched in year 2002 and with the highest RAM size. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the name of the phone model launched in year 2002 and with the highest RAM size.` to a syntactically-correct PostgreSQL query.
| SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1; |
What are the wifi and screen mode type of the hardware model named "LG-P760"? |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the wifi and screen mode type of the hardware model named "LG-P760"?` to a syntactically-correct PostgreSQL query.
| SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = "LG-P760"; |
List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32.` to a syntactically-correct PostgreSQL query.
| SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = "Text" OR T1.RAM_MiB > 32; |
List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics." |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics."` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = "Graphics" OR t2.Company_name = "Nokia Corporation" |
List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = "Nokia Corporation" AND T1.Type != "Text"; |
List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15; |
Find the number of phones for each accreditation type. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the number of phones for each accreditation type.` to a syntactically-correct PostgreSQL query.
| SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type |
How many phones belongs to each accreditation type? |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many phones belongs to each accreditation type?` to a syntactically-correct PostgreSQL query.
| SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type |
Find the accreditation level that more than 3 phones use. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the accreditation level that more than 3 phones use.` to a syntactically-correct PostgreSQL query.
| SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*) > 3 |
Find the details for all chip models. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the details for all chip models.` to a syntactically-correct PostgreSQL query.
| SELECT * FROM chip_model |
How many models do not have the wifi function? |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many models do not have the wifi function?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM chip_model WHERE wifi = 'No' |
Count the number of chip model that do not have wifi. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of chip model that do not have wifi.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM chip_model WHERE wifi = 'No' |
List all the model names sorted by their launch year. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List all the model names sorted by their launch year.` to a syntactically-correct PostgreSQL query.
| SELECT model_name FROM chip_model ORDER BY launch_year |
Find the average ram mib size of the chip models that are never used by any phone. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the average ram mib size of the chip models that are never used by any phone.` to a syntactically-correct PostgreSQL query.
| SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone) |
Find the names of the chip models that are not used by any phone with full accreditation type. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the names of the chip models that are not used by any phone with full accreditation type.` to a syntactically-correct PostgreSQL query.
| SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full' |
Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types. |
-- Language PostgreSQL
-- Tables:
-- Table: chip model
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]
-- Table: screen mode
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]
-- Table: phone
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.` to a syntactically-correct PostgreSQL query.
| SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full' |
How many countries are there in total? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many countries are there in total?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM country |
Count the number of countries. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of countries.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM country |
Show the country name and capital of all countries. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the country name and capital of all countries.` to a syntactically-correct PostgreSQL query.
| SELECT Country_name , Capital FROM country |
What are the names and capitals of each country? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names and capitals of each country?` to a syntactically-correct PostgreSQL query.
| SELECT Country_name , Capital FROM country |
Show all official native languages that contain the word "English". |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show all official native languages that contain the word "English".` to a syntactically-correct PostgreSQL query.
| SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%" |
What are the official native languages that contain the string "English". |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the official native languages that contain the string "English".` to a syntactically-correct PostgreSQL query.
| SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%" |
Show all distinct positions of matches. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show all distinct positions of matches.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT POSITION FROM match_season |
What are the different positions for match season? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the different positions for match season?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT POSITION FROM match_season |
Show the players from college UCLA. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the players from college UCLA.` to a syntactically-correct PostgreSQL query.
| SELECT Player FROM match_season WHERE College = "UCLA" |
Who are the players from UCLA? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Who are the players from UCLA?` to a syntactically-correct PostgreSQL query.
| SELECT Player FROM match_season WHERE College = "UCLA" |
Show the distinct position of players from college UCLA or Duke. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the distinct position of players from college UCLA or Duke.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke" |
What are the different positions of players from UCLA or Duke colleges? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the different positions of players from UCLA or Duke colleges?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke" |
Show the draft pick numbers and draft classes of players whose positions are defenders. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the draft pick numbers and draft classes of players whose positions are defenders.` to a syntactically-correct PostgreSQL query.
| SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = "Defender" |
What are the draft pick numbers and draft classes for players who play the Defender position? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the draft pick numbers and draft classes for players who play the Defender position?` to a syntactically-correct PostgreSQL query.
| SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = "Defender" |
How many distinct teams are involved in match seasons? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many distinct teams are involved in match seasons?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT Team) FROM match_season |
Count the number of different teams involved in match season. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of different teams involved in match season.` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT Team) FROM match_season |
Show the players and the years played. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the players and the years played.` to a syntactically-correct PostgreSQL query.
| SELECT Player , Years_Played FROM player |
Who are the different players and how many years has each played? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Who are the different players and how many years has each played?` to a syntactically-correct PostgreSQL query.
| SELECT Player , Years_Played FROM player |
Show all team names. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show all team names.` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM Team |
What are the names of all teams? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of all teams?` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM Team |
Show the season, the player, and the name of the country that player belongs to. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the season, the player, and the name of the country that player belongs to.` to a syntactically-correct PostgreSQL query.
| SELECT T2.Season , T2.Player , T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country |
For each player, what are their name, season, and country that they belong to? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `For each player, what are their name, season, and country that they belong to?` to a syntactically-correct PostgreSQL query.
| SELECT T2.Season , T2.Player , T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country |
Which players are from Indonesia? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Which players are from Indonesia?` to a syntactically-correct PostgreSQL query.
| SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia" |
Who are the players from Indonesia? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Who are the players from Indonesia?` to a syntactically-correct PostgreSQL query.
| SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia" |
What are the distinct positions of the players from a country whose capital is Dublin? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the distinct positions of the players from a country whose capital is Dublin?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin" |
Give the different positions of players who play for the country with the capital Dublin. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Give the different positions of players who play for the country with the capital Dublin.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin" |
What are the official languages of the countries of players from Maryland or Duke college? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the official languages of the countries of players from Maryland or Duke college?` to a syntactically-correct PostgreSQL query.
| SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke" |
Return the official native languages of countries who have players from Maryland or Duke colleges. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return the official native languages of countries who have players from Maryland or Duke colleges.` to a syntactically-correct PostgreSQL query.
| SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke" |
How many distinct official languages are there among countries of players whose positions are defenders. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many distinct official languages are there among countries of players whose positions are defenders.` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender" |
Count the number of different official languages corresponding to countries that players who play Defender are from. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of different official languages corresponding to countries that players who play Defender are from.` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender" |
Show the season, the player, and the name of the team that players belong to. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the season, the player, and the name of the team that players belong to.` to a syntactically-correct PostgreSQL query.
| SELECT T1.Season , T1.Player , T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id |
Who are the different players, what season do they play in, and what is the name of the team they are on? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Who are the different players, what season do they play in, and what is the name of the team they are on?` to a syntactically-correct PostgreSQL query.
| SELECT T1.Season , T1.Player , T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id |
Show the positions of the players from the team with name "Ryley Goldner". |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the positions of the players from the team with name "Ryley Goldner".` to a syntactically-correct PostgreSQL query.
| SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner" |
Return the positions of players on the team Ryley Goldner. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return the positions of players on the team Ryley Goldner.` to a syntactically-correct PostgreSQL query.
| SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner" |
How many distinct colleges are associated with players from the team with name "Columbus Crew". |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many distinct colleges are associated with players from the team with name "Columbus Crew".` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" |
Count the number of different colleges that players who play for Columbus Crew are from. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of different colleges that players who play for Columbus Crew are from.` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" |
Show the players and years played for players from team "Columbus Crew". |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the players and years played for players from team "Columbus Crew".` to a syntactically-correct PostgreSQL query.
| SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" |
What are the players who played for Columbus Crew, and how many years did each play for? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the players who played for Columbus Crew, and how many years did each play for?` to a syntactically-correct PostgreSQL query.
| SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" |
Show the position of players and the corresponding number of players. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the position of players and the corresponding number of players.` to a syntactically-correct PostgreSQL query.
| SELECT POSITION , COUNT(*) FROM match_season GROUP BY POSITION |
How many players played each position? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many players played each position?` to a syntactically-correct PostgreSQL query.
| SELECT POSITION , COUNT(*) FROM match_season GROUP BY POSITION |
Show the country names and the corresponding number of players. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the country names and the corresponding number of players.` to a syntactically-correct PostgreSQL query.
| SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name |
How many players are from each country? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many players are from each country?` to a syntactically-correct PostgreSQL query.
| SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name |
Return all players sorted by college in ascending alphabetical order. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return all players sorted by college in ascending alphabetical order.` to a syntactically-correct PostgreSQL query.
| SELECT player FROM match_season ORDER BY College ASC |
What are all the players who played in match season, sorted by college in ascending alphabetical order? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are all the players who played in match season, sorted by college in ascending alphabetical order?` to a syntactically-correct PostgreSQL query.
| SELECT player FROM match_season ORDER BY College ASC |
Show the most common position of players in match seasons. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the most common position of players in match seasons.` to a syntactically-correct PostgreSQL query.
| SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1 |
What is the position that is most common among players in match seasons? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the position that is most common among players in match seasons?` to a syntactically-correct PostgreSQL query.
| SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1 |
Show the top 3 most common colleges of players in match seasons. |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the top 3 most common colleges of players in match seasons.` to a syntactically-correct PostgreSQL query.
| SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3 |
What are the three colleges from which the most players are from? |
-- Language PostgreSQL
-- Tables:
-- Table: country
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]
-- Table: team
columns : [['team id', 'number'], ['name', 'text']]
-- Table: match season
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]
-- Table: player
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the three colleges from which the most players are from?` to a syntactically-correct PostgreSQL query.
| SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.