sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer details', 'text']]

 -- Table: properties 
columns : [['property id', 'number'], ['property type code', 'text'], ['property address', 'text'], ['other details', 'text']]

 -- Table: residents 
columns : [['resident id', 'number'], ['property id', 'number'], ['date moved in', 'time'], ['date moved out', 'time'], ['other details', 'text']]

 -- Table: organizations 
columns : [['organization id', 'number'], ['parent organization id', 'number'], ['organization details', 'text']]

 -- Table: services 
columns : [['service id', 'number'], ['organization id', 'number'], ['service type code', 'text'], ['service details', 'text']]

 -- Table: residents services 
columns : [['resident id', 'number'], ['service id', 'number'], ['date moved in', 'time'], ['property id', 'number'], ['date requested', 'time'], ['date provided', 'time'], ['other details', 'text']]

 -- Table: things 
columns : [['thing id', 'number'], ['organization id', 'number'], ['type of thing code', 'text'], ['service type code', 'text'], ['service details', 'text']]

 -- Table: customer events 
columns : [['customer event id', 'number'], ['customer id', 'number'], ['date moved in', 'time'], ['property id', 'number'], ['resident id', 'number'], ['thing id', 'number']]

 -- Table: customer event notes 
columns : [['customer event note id', 'number'], ['customer event id', 'number'], ['service type code', 'text'], ['resident id', 'number'], ['property id', 'number'], ['date moved in', 'time']]

 -- Table: timed status of things 
columns : [['thing id', 'number'], ['date and date', 'time'], ['status of thing code', 'text']]

 -- Table: timed locations of things 
columns : [['thing id', 'number'], ['date and time', 'time'], ['location code', '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.



Question: How many customers did not have any event?
SQL: SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer details', 'text']]

 -- Table: properties 
columns : [['property id', 'number'], ['property type code', 'text'], ['property address', 'text'], ['other details', 'text']]

 -- Table: residents 
columns : [['resident id', 'number'], ['property id', 'number'], ['date moved in', 'time'], ['date moved out', 'time'], ['other details', 'text']]

 -- Table: organizations 
columns : [['organization id', 'number'], ['parent organization id', 'number'], ['organization details', 'text']]

 -- Table: services 
columns : [['service id', 'number'], ['organization id', 'number'], ['service type code', 'text'], ['service details', 'text']]

 -- Table: residents services 
columns : [['resident id', 'number'], ['service id', 'number'], ['date moved in', 'time'], ['property id', 'number'], ['date requested', 'time'], ['date provided', 'time'], ['other details', 'text']]

 -- Table: things 
columns : [['thing id', 'number'], ['organization id', 'number'], ['type of thing code', 'text'], ['service type code', 'text'], ['service details', 'text']]

 -- Table: customer events 
columns : [['customer event id', 'number'], ['customer id', 'number'], ['date moved in', 'time'], ['property id', 'number'], ['resident id', 'number'], ['thing id', 'number']]

 -- Table: customer event notes 
columns : [['customer event note id', 'number'], ['customer event id', 'number'], ['service type code', 'text'], ['resident id', 'number'], ['property id', 'number'], ['date moved in', 'time']]

 -- Table: timed status of things 
columns : [['thing id', 'number'], ['date and date', 'time'], ['status of thing code', 'text']]

 -- Table: timed locations of things 
columns : [['thing id', 'number'], ['date and time', 'time'], ['location code', '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.



Question: What are the distinct move in dates of the residents?
SQL: SELECT DISTINCT date_moved_in FROM residents
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: How many schools are there?
SQL: SELECT count(*) FROM school
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Count the number of schools.
SQL: SELECT count(*) FROM school
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: List the locations of schools in ascending order of enrollment.
SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What is the list of school locations sorted in ascending order of school enrollment?
SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: List the locations of schools in descending order of founded year.
SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What is the list of school locations sorted in descending order of school foundation year?
SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What are the enrollments of schools whose denomination is not "Catholic"?
SQL: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: List the enrollment for each school that does not have "Catholic" as denomination.
SQL: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What is the average enrollment of schools?
SQL: SELECT avg(Enrollment) FROM school
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Take the average of the school enrollment.
SQL: SELECT avg(Enrollment) FROM school
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What are the teams of the players, sorted in ascending alphabetical order?
SQL: SELECT Team FROM player ORDER BY Team ASC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Find the team of each player and sort them in ascending alphabetical order.
SQL: SELECT Team FROM player ORDER BY Team ASC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: How many different positions of players are there?
SQL: SELECT count(DISTINCT POSITION) FROM player
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Count the number of distinct player positions.
SQL: SELECT count(DISTINCT POSITION) FROM player
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Find the team of the player of the highest age.
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Which team has the oldest player?
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: List the teams of the players with the top 5 largest ages.
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What are the teams that have the 5 oldest players?
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: For each player, show the team and the location of school they belong to.
SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What are the team and the location of school each player belongs to?
SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Show the locations of schools that have more than 1 player.
SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*)  >  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Which schools have more than 1 player? Give me the school locations.
SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*)  >  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Show the denomination of the school that has the most players.
SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What is the denomination of the school the most players belong to?
SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Show locations and nicknames of schools.
SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What are the location and nickname of each school?
SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Please show different denominations and the corresponding number of schools.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: For each denomination, return the denomination and the count of schools with that denomination.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Please show different denominations and the corresponding number of schools in descending order.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: List the school color of the school that has the largest enrollment.
SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: What is the school color of the school with the largest enrollment?
SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: List the locations of schools that do not have any player.
SQL: SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
-- Language PostgreSQL
        -- Tables: 
             -- Table: school 
columns : [['school id', 'number'], ['school', 'text'], ['location', 'text'], ['enrollment', 'number'], ['founded', 'number'], ['denomination', 'text'], ['boys or girls', 'text'], ['day or boarding', 'text'], ['year entered competition', 'number'], ['school colors', 'text']]

 -- Table: school details 
columns : [['school id', 'number'], ['nickname', 'text'], ['colors', 'text'], ['league', 'text'], ['class', 'text'], ['division', 'text']]

 -- Table: school performance 
columns : [['school id', 'number'], ['school year', 'text'], ['class a', 'text'], ['class aa', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['team', 'text'], ['age', 'number'], ['position', 'text'], ['school id', '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.



Question: Which schools do not have any player? Give me the school locations.
SQL: SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)