sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the average ROM size of phones produced by the company named "Nokia Corporation"?
SQL: SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T2.Company_name = "Nokia Corporation";
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.
SQL: SELECT T2.Hardware_Model_name ,  T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB  >  32;
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.
SQL: SELECT Hardware_Model_name ,  Company_name FROM phone WHERE Accreditation_type LIKE 'Full';
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760".
SQL: SELECT T1.Char_cells ,  T1.Pixels ,  T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = "LG-P760";
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the hardware model name and company name for the phone whose screen mode type is "Graphics."
SQL: SELECT T2.Hardware_Model_name ,  T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type  =  "Graphics";
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.
SQL: SELECT Company_name ,  count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1;
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the name of the company that produced more than one phone model.
SQL: SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*)  >  1;
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the maximum, minimum and average number of used kb in screen mode.
SQL: SELECT max(used_kb) , min(used_kb) , avg(used_kb) FROM screen_mode;
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the name of the phone model launched in year 2002 and with the highest RAM size.
SQL: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1;
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the wifi and screen mode type of the hardware model named "LG-P760"?
SQL: SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = "LG-P760";
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32.
SQL: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = "Text" OR T1.RAM_MiB  >  32;
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics."
SQL: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type  =  "Graphics" OR t2.Company_name  =  "Nokia Corporation"
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text.
SQL: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name  =  "Nokia Corporation" AND T1.Type != "Text";
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.
SQL: SELECT DISTINCT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15;
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the number of phones for each accreditation type.
SQL: SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many phones belongs to each accreditation type?
SQL: SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the accreditation level that more than 3 phones use.
SQL: SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*)  >  3
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the details for all chip models.
SQL: SELECT * FROM chip_model
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many models do not have the wifi function?
SQL: SELECT count(*) FROM chip_model WHERE wifi  =  'No'
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Count the number of chip model that do not have wifi.
SQL: SELECT count(*) FROM chip_model WHERE wifi  =  'No'
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List all the model names sorted by their launch year.
SQL: SELECT model_name FROM chip_model ORDER BY launch_year
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the average ram mib size of the chip models that are never used by any phone.
SQL: SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the names of the chip models that are not used by any phone with full accreditation type.
SQL: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type  =  'Full'
-- Language PostgreSQL
        -- Tables: 
             -- Table: chip model 
columns : [['model name', 'text'], ['launch year', 'number'], ['ram mib', 'number'], ['rom mib', 'number'], ['slots', 'text'], ['wifi', 'text'], ['bluetooth', 'text']]

 -- Table: screen mode 
columns : [['graphics mode', 'number'], ['char cells', 'text'], ['pixels', 'text'], ['hardware colours', 'number'], ['used kb', 'number'], ['map', 'text'], ['type', 'text']]

 -- Table: phone 
columns : [['company name', 'text'], ['hardware model name', 'text'], ['accreditation type', 'text'], ['accreditation level', 'text'], ['date', 'text'], ['chip model', 'text'], ['screen mode', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.
SQL: SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Full'
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many countries are there in total?
SQL: SELECT count(*) FROM country
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Count the number of countries.
SQL: SELECT count(*) FROM country
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the country name and capital of all countries.
SQL: SELECT Country_name ,  Capital FROM country
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names and capitals of each country?
SQL: SELECT Country_name ,  Capital FROM country
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show all official native languages that contain the word "English".
SQL: SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the official native languages that contain the string "English".
SQL: SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show all distinct positions of matches.
SQL: SELECT DISTINCT POSITION FROM match_season
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the different positions for match season?
SQL: SELECT DISTINCT POSITION FROM match_season
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the players from college UCLA.
SQL: SELECT Player FROM match_season WHERE College  =  "UCLA"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Who are the players from UCLA?
SQL: SELECT Player FROM match_season WHERE College  =  "UCLA"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the distinct position of players from college UCLA or Duke.
SQL: SELECT DISTINCT POSITION FROM match_season WHERE College  =  "UCLA" OR College  =  "Duke"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the different positions of players from UCLA or Duke colleges?
SQL: SELECT DISTINCT POSITION FROM match_season WHERE College  =  "UCLA" OR College  =  "Duke"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the draft pick numbers and draft classes of players whose positions are defenders.
SQL: SELECT Draft_Pick_Number ,  Draft_Class FROM match_season WHERE POSITION  =  "Defender"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the draft pick numbers and draft classes for players who play the Defender position?
SQL: SELECT Draft_Pick_Number ,  Draft_Class FROM match_season WHERE POSITION  =  "Defender"
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many distinct teams are involved in match seasons?
SQL: SELECT count(DISTINCT Team) FROM match_season
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Count the number of different teams involved in match season.
SQL: SELECT count(DISTINCT Team) FROM match_season
-- Language PostgreSQL
        -- Tables: 
             -- Table: country 
columns : [['country id', 'number'], ['country name', 'text'], ['capital', 'text'], ['official native language', 'text']]

 -- Table: team 
columns : [['team id', 'number'], ['name', 'text']]

 -- Table: match season 
columns : [['season', 'number'], ['player', 'text'], ['position', 'text'], ['country', 'number'], ['team', 'number'], ['draft pick number', 'number'], ['draft class', 'text'], ['college', 'text']]

 -- Table: player 
columns : [['player id', 'number'], ['player', 'text'], ['years played', 'text'], ['total wl', 'text'], ['singles wl', 'text'], ['doubles wl', 'text'], ['team', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the players and the years played.
SQL: SELECT Player ,  Years_Played FROM player