brief_instruction
stringlengths
16
224
instruction
stringlengths
687
8.77k
output
stringlengths
18
577
Find all the distinct district names ordered by city area in descending.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find all the distinct district names ordered by city area in descending.` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
What are the different district names in order of descending city area?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the different district names in order of descending city area?` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
Find the list of page size which have more than 3 product listed
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the list of page size which have more than 3 product listed` to a syntactically-correct PostgreSQL query.
SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*) > 3
What is the maximum page size for everything that has more than 3 products listed?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the maximum page size for everything that has more than 3 products listed?` to a syntactically-correct PostgreSQL query.
SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*) > 3
Find the name and population of district with population between 200000 and 2000000
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the name and population of district with population between 200000 and 2000000` to a syntactically-correct PostgreSQL query.
SELECT District_name , City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?` to a syntactically-correct PostgreSQL query.
SELECT District_name , City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
Find the name all districts with city area greater than 10 or population larger than 100000
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the name all districts with city area greater than 10 or population larger than 100000` to a syntactically-correct PostgreSQL query.
SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000
What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?` to a syntactically-correct PostgreSQL query.
SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000
Which district has the largest population?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Which district has the largest population?` to a syntactically-correct PostgreSQL query.
SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
What is the name of the district with the most residents?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the name of the district with the most residents?` to a syntactically-correct PostgreSQL query.
SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
Which district has the least area?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Which district has the least area?` to a syntactically-correct PostgreSQL query.
SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1
What is the name of the district with the smallest area?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the name of the district with the smallest area?` to a syntactically-correct PostgreSQL query.
SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1
Find the total population of the top 3 districts with the largest area.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the total population of the top 3 districts with the largest area.` to a syntactically-correct PostgreSQL query.
SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3
What is the total number of residents for the districts with the 3 largest areas?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the total number of residents for the districts with the 3 largest areas?` to a syntactically-correct PostgreSQL query.
SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3
Find all types of store and number of them.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find all types of store and number of them.` to a syntactically-correct PostgreSQL query.
SELECT TYPE , count(*) FROM store GROUP BY TYPE
For each type of store, how many of them are there?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `For each type of store, how many of them are there?` to a syntactically-correct PostgreSQL query.
SELECT TYPE , count(*) FROM store GROUP BY TYPE
Find the names of all stores in Khanewal District.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the names of all stores in Khanewal District.` to a syntactically-correct PostgreSQL query.
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = "Khanewal District"
What are the names of all the stores located in Khanewal District?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the names of all the stores located in Khanewal District?` to a syntactically-correct PostgreSQL query.
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = "Khanewal District"
Find all the stores in the district with the most population.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find all the stores in the district with the most population.` to a syntactically-correct PostgreSQL query.
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
What are the names of all the stores in the largest district by population?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the names of all the stores in the largest district by population?` to a syntactically-correct PostgreSQL query.
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
Which city is the headquarter of the store named "Blackville" in?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Which city is the headquarter of the store named "Blackville" in?` to a syntactically-correct PostgreSQL query.
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = "Blackville"
What city is the headquarter of the store Blackville?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What city is the headquarter of the store Blackville?` to a syntactically-correct PostgreSQL query.
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = "Blackville"
Find the number of stores in each city.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the number of stores in each city.` to a syntactically-correct PostgreSQL query.
SELECT t3.headquartered_city , count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city
How many stores are headquarted in each city?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `How many stores are headquarted in each city?` to a syntactically-correct PostgreSQL query.
SELECT t3.headquartered_city , count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city
Find the city with the most number of stores.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the city with the most number of stores.` to a syntactically-correct PostgreSQL query.
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1
What is the city with the most number of flagship stores?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the city with the most number of flagship stores?` to a syntactically-correct PostgreSQL query.
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1
What is the average pages per minute color?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the average pages per minute color?` to a syntactically-correct PostgreSQL query.
SELECT avg(pages_per_minute_color) FROM product
What is the average number of pages per minute color?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the average number of pages per minute color?` to a syntactically-correct PostgreSQL query.
SELECT avg(pages_per_minute_color) FROM product
What products are available at store named "Miramichi"?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What products are available at store named "Miramichi"?` to a syntactically-correct PostgreSQL query.
SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = "Miramichi"
What products are sold at the store named Miramichi?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What products are sold at the store named Miramichi?` to a syntactically-correct PostgreSQL query.
SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = "Miramichi"
Find products with max page size as "A4" and pages per minute color smaller than 5.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find products with max page size as "A4" and pages per minute color smaller than 5.` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 5
What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 5
Find products with max page size as "A4" or pages per minute color smaller than 5.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find products with max page size as "A4" or pages per minute color smaller than 5.` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE max_page_size = "A4" OR pages_per_minute_color < 5
What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE max_page_size = "A4" OR pages_per_minute_color < 5
Find all the product whose name contains the word "Scanner".
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find all the product whose name contains the word "Scanner".` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE product LIKE "%Scanner%"
What are all of the products whose name includes the substring "Scanner"?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are all of the products whose name includes the substring "Scanner"?` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE product LIKE "%Scanner%"
Find the most prominent max page size among all the products.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the most prominent max page size among all the products.` to a syntactically-correct PostgreSQL query.
SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
What is the most common maximum page size?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the most common maximum page size?` to a syntactically-correct PostgreSQL query.
SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
Find the name of the products that are not using the most frequently-used max page size.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the name of the products that are not using the most frequently-used max page size.` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
What are the names of all products that are not the most frequently-used maximum page size?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the names of all products that are not the most frequently-used maximum page size?` to a syntactically-correct PostgreSQL query.
SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
Find the total population of the districts where the area is bigger than the average city area.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the total population of the districts where the area is bigger than the average city area.` to a syntactically-correct PostgreSQL query.
SELECT sum(city_population) FROM district WHERE city_area > (SELECT avg(city_area) FROM district)
What is the total population for all the districts that have an area larger tahn the average city area?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What is the total population for all the districts that have an area larger tahn the average city area?` to a syntactically-correct PostgreSQL query.
SELECT sum(city_population) FROM district WHERE city_area > (SELECT avg(city_area) FROM district)
Find the names of districts where have both city mall and village store type stores.
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `Find the names of districts where have both city mall and village store type stores.` to a syntactically-correct PostgreSQL query.
SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "City Mall" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "Village Store"
What are the names of the districts that have both mall and village store style shops?
-- Language PostgreSQL -- Tables: -- Table: product columns : [['product id', 'number'], ['product', 'text'], ['dimensions', 'text'], ['dpi', 'number'], ['pages per minute color', 'number'], ['max page size', 'text'], ['interface', 'text']] -- Table: store columns : [['store id', 'number'], ['store name', 'text'], ['type', 'text'], ['area size', 'number'], ['number of product category', 'number'], ['ranking', 'number']] -- Table: district columns : [['district id', 'number'], ['district name', 'text'], ['headquartered city', 'text'], ['city population', 'number'], ['city area', 'number']] -- Table: store product columns : [['store id', 'number'], ['product id', 'number']] -- Table: store district columns : [['store id', 'number'], ['district 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. Translate `What are the names of the districts that have both mall and village store style shops?` to a syntactically-correct PostgreSQL query.
SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "City Mall" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "Village Store"
What is the total enrollment number of all colleges?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 total enrollment number of all colleges?` to a syntactically-correct PostgreSQL query.
SELECT sum(enr) FROM College
How many students are enrolled in college?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 students are enrolled in college?` to a syntactically-correct PostgreSQL query.
SELECT sum(enr) FROM College
What is the average enrollment number?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 enrollment number?` to a syntactically-correct PostgreSQL query.
SELECT avg(enr) FROM College
How many students, on average, does each college have enrolled?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 students, on average, does each college have enrolled?` to a syntactically-correct PostgreSQL query.
SELECT avg(enr) FROM College
How many colleges in total?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 colleges in total?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM College
How many different colleges are there?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 different colleges are there?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM College
How many players have more than 1000 hours of training?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 players have more than 1000 hours of training?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM Player WHERE HS > 1000
How many different players trained for more than 1000 hours?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 different players trained for more than 1000 hours?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM Player WHERE HS > 1000
How many colleges has more than 15000 students?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 colleges has more than 15000 students?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM College WHERE enr > 15000
What is the number of colleges with a student population greater than 15000?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 number of colleges with a student population greater than 15000?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM College WHERE enr > 15000
What is the average training hours of all players?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 training hours of all players?` to a syntactically-correct PostgreSQL query.
SELECT avg(HS) FROM Player
How many hours do the players train on average?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 hours do the players train on average?` to a syntactically-correct PostgreSQL query.
SELECT avg(HS) FROM Player
Find the name and training hours of players whose hours are below 1500.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 and training hours of players whose hours are below 1500.` to a syntactically-correct PostgreSQL query.
SELECT pName , HS FROM Player WHERE HS < 1500
What are the names and number of hours spent training for each player who trains for less than 1500 hours?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 and number of hours spent training for each player who trains for less than 1500 hours?` to a syntactically-correct PostgreSQL query.
SELECT pName , HS FROM Player WHERE HS < 1500
How many different colleges do attend the tryout test?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 different colleges do attend the tryout test?` to a syntactically-correct PostgreSQL query.
SELECT count(DISTINCT cName) FROM tryout
How many different colleges were represented at tryouts?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 different colleges were represented at tryouts?` to a syntactically-correct PostgreSQL query.
SELECT count(DISTINCT cName) FROM tryout
What are the unique types of player positions in the tryout?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 unique types of player positions in the tryout?` to a syntactically-correct PostgreSQL query.
SELECT count(DISTINCT pPos) FROM tryout
What are the different types of player positions?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 types of player positions?` to a syntactically-correct PostgreSQL query.
SELECT count(DISTINCT pPos) FROM tryout
How many students got accepted after the tryout?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 students got accepted after the tryout?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM tryout WHERE decision = 'yes'
How many students received a yes from tryouts?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 students received a yes from tryouts?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM tryout WHERE decision = 'yes'
How many students whose are playing the role of goalie?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 students whose are playing the role of goalie?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM tryout WHERE pPos = 'goalie'
What is the number of students playing as a goalie?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 number of students playing as a goalie?` to a syntactically-correct PostgreSQL query.
SELECT count(*) FROM tryout WHERE pPos = 'goalie'
Find the max, average and min training hours of all players.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 max, average and min training hours of all players.` to a syntactically-correct PostgreSQL query.
SELECT avg(HS) , max(HS) , min(HS) FROM Player
What is the average, maximum, and minimum for the number of hours spent training?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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, maximum, and minimum for the number of hours spent training?` to a syntactically-correct PostgreSQL query.
SELECT avg(HS) , max(HS) , min(HS) FROM Player
What is average enrollment of colleges in the state FL?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 average enrollment of colleges in the state FL?` to a syntactically-correct PostgreSQL query.
SELECT avg(enr) FROM College WHERE state = 'FL'
What is average number of students enrolled in Florida colleges?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 average number of students enrolled in Florida colleges?` to a syntactically-correct PostgreSQL query.
SELECT avg(enr) FROM College WHERE state = 'FL'
What are the names of players whose training hours is between 500 and 1500?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 players whose training hours is between 500 and 1500?` to a syntactically-correct PostgreSQL query.
SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
What are the names of players who train between 500 and 1500 hours?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 players who train between 500 and 1500 hours?` to a syntactically-correct PostgreSQL query.
SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
Find the players whose names contain letter 'a'.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 players whose names contain letter 'a'.` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
Who are the players that have names containing the letter a?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 `Who are the players that have names containing the letter a?` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.` to a syntactically-correct PostgreSQL query.
SELECT cName , enr FROM College WHERE enr > 10000 AND state = "LA"
What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?` to a syntactically-correct PostgreSQL query.
SELECT cName , enr FROM College WHERE enr > 10000 AND state = "LA"
List all information about college sorted by enrollment number in the ascending order.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 about college sorted by enrollment number in the ascending order.` to a syntactically-correct PostgreSQL query.
SELECT * FROM College ORDER BY enr
What information do you have on colleges sorted by increasing enrollment numbers?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 information do you have on colleges sorted by increasing enrollment numbers?` to a syntactically-correct PostgreSQL query.
SELECT * FROM College ORDER BY enr
List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 colleges whose enrollment is greater 18000 sorted by the college's name.` to a syntactically-correct PostgreSQL query.
SELECT cName FROM College WHERE enr > 18000 ORDER BY cName
What is the name of every college in alphabetical order that has more than 18000 students enrolled?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 name of every college in alphabetical order that has more than 18000 students enrolled?` to a syntactically-correct PostgreSQL query.
SELECT cName FROM College WHERE enr > 18000 ORDER BY cName
Find the name of players whose card is yes in the descending order of training hours.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 players whose card is yes in the descending order of training hours.` to a syntactically-correct PostgreSQL query.
SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC
What are the name of the players who received a card in descending order of the hours of training?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 name of the players who received a card in descending order of the hours of training?` to a syntactically-correct PostgreSQL query.
SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC
Find the name of different colleges involved in the tryout in alphabetical order.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 different colleges involved in the tryout in alphabetical order.` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT cName FROM tryout ORDER BY cName
What are the different names of the colleges involved in the tryout in alphabetical order?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 names of the colleges involved in the tryout in alphabetical order?` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT cName FROM tryout ORDER BY cName
Which position is most popular among players in the tryout?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 position is most popular among players in the tryout?` to a syntactically-correct PostgreSQL query.
SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1
What was the most popular position at tryouts?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 was the most popular position at tryouts?` to a syntactically-correct PostgreSQL query.
SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1
Find the number of students who participate in the tryout for each college ordered by descending count.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 students who participate in the tryout for each college ordered by descending count.` to a syntactically-correct PostgreSQL query.
SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC
How many students participated in tryouts for each college by descennding count?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 students participated in tryouts for each college by descennding count?` to a syntactically-correct PostgreSQL query.
SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC
What is minimum hours of the students playing in different position?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 minimum hours of the students playing in different position?` to a syntactically-correct PostgreSQL query.
SELECT min(T2.HS) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos
For each position, what is the minimum time students spent practicing?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 `For each position, what is the minimum time students spent practicing?` to a syntactically-correct PostgreSQL query.
SELECT min(T2.HS) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos
What are the names of schools with the top 3 largest size?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 schools with the top 3 largest size?` to a syntactically-correct PostgreSQL query.
SELECT cName FROM college ORDER BY enr DESC LIMIT 3
What are the names of the schools with the top 3 largest class sizes?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 the schools with the top 3 largest class sizes?` to a syntactically-correct PostgreSQL query.
SELECT cName FROM college ORDER BY enr DESC LIMIT 3
What is the name of school that has the smallest enrollment in each state?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 name of school that has the smallest enrollment in each state?` to a syntactically-correct PostgreSQL query.
SELECT cName , state , min(enr) FROM college GROUP BY state
What is the name of the school with smallest enrollment size per state?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 name of the school with smallest enrollment size per state?` to a syntactically-correct PostgreSQL query.
SELECT cName , state , min(enr) FROM college GROUP BY state
Find the states where have some college students in tryout.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 states where have some college students in tryout.` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName
What are the different states that have students trying out?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 states that have students trying out?` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName
Find the states where have some college students in tryout and their decisions are yes.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 states where have some college students in tryout and their decisions are yes.` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
What are the different states that had students successfully try out?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 states that had students successfully try out?` to a syntactically-correct PostgreSQL query.
SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
Find the name and college of students whose decisions are yes in the tryout.
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 and college of students whose decisions are yes in the tryout.` to a syntactically-correct PostgreSQL query.
SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?
-- Language PostgreSQL -- Tables: -- Table: college columns : [['college name', 'text'], ['state', 'text'], ['enrollment', 'number']] -- Table: player columns : [['player id', 'number'], ['player name', 'text'], ['yes card', 'text'], ['training hours', 'number']] -- Table: tryout columns : [['player id', 'number'], ['college name', 'text'], ['player position', 'text'], ['decision', '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 players who received a yes during tryouts, and also what are the names of their colleges?` to a syntactically-correct PostgreSQL query.
SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'