sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 entry name of the most expensive catalog (in USD)?
SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 entry name of the catalog with the highest price (in USD).
SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 level name of the cheapest catalog (in USD)?
SQL: SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 level name of the catalog with the lowest price (in USD).
SQL: SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 average and minimum price (in Euro) of all products?
SQL: SELECT avg(price_in_euros) ,  min(price_in_euros) FROM catalog_contents
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Give me the average and minimum price (in Euro) of the products.
SQL: SELECT avg(price_in_euros) ,  min(price_in_euros) FROM catalog_contents
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 product with the highest height? Give me the catalog entry name.
SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Which catalog content has the highest height? Give me the catalog entry name.
SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 product that has the smallest capacity.
SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Which catalog content has the smallest capacity? Return the catalog entry name.
SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 all the products whose stock number starts with "2".
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%"
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Which catalog contents have a product stock number that starts from "2"? Show the catalog entry names.
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%"
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 catalog entries with level number 8.
SQL: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.catalog_level_number  =  "8"
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 names of catalog entries with level number 8?
SQL: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.catalog_level_number  =  "8"
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 products with length smaller than 3 or height greater than 5.
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH  <  3 OR width  >  5
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Which catalog contents have length below 3 or above 5? Find the catalog entry names.
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH  <  3 OR width  >  5
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 and attribute ID of the attribute definitions with attribute value 0.
SQL: SELECT t1.attribute_name ,  t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id  =  t2.attribute_id WHERE t2.attribute_value  =  0
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.
SQL: SELECT t1.attribute_name ,  t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id  =  t2.attribute_id WHERE t2.attribute_value  =  0
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 and capacity of products with price greater than 700 (in USD).
SQL: SELECT catalog_entry_name ,  capacity FROM Catalog_Contents WHERE price_in_dollars  >  700
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.
SQL: SELECT catalog_entry_name ,  capacity FROM Catalog_Contents WHERE price_in_dollars  >  700
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 dates on which more than one revisions were made.
SQL: SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*)  >  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: On which days more than one revisions were made on catalogs.
SQL: SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*)  >  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 products are there in the records?
SQL: SELECT count(*) FROM catalog_contents
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 total number of catalog contents.
SQL: SELECT count(*) FROM catalog_contents
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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: Name all the products with next entry ID greater than 8.
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id  >  8
-- Language PostgreSQL
        -- Tables: 
             -- Table: attribute definitions 
columns : [['attribute id', 'number'], ['attribute name', 'text'], ['attribute data type', 'text']]

 -- Table: catalogs 
columns : [['catalog id', 'number'], ['catalog name', 'text'], ['catalog publisher', 'text'], ['date of publication', 'time'], ['date of latest revision', 'time']]

 -- Table: catalog structure 
columns : [['catalog level number', 'number'], ['catalog id', 'number'], ['catalog level name', 'text']]

 -- Table: catalog contents 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['parent entry id', 'number'], ['previous entry id', 'number'], ['next entry id', 'number'], ['catalog entry name', 'text'], ['product stock number', 'text'], ['price in dollars', 'number'], ['price in euros', 'number'], ['price in pounds', 'number'], ['capacity', 'text'], ['length', 'text'], ['height', 'text'], ['width', 'text']]

 -- Table: catalog contents additional attributes 
columns : [['catalog entry id', 'number'], ['catalog level number', 'number'], ['attribute id', 'number'], ['attribute value', '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 catalog entry names of the products with next entry ID above 8?
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id  >  8
-- Language PostgreSQL
        -- Tables: 
             -- Table: flight 
columns : [['flight number', 'number'], ['origin', 'text'], ['destination', 'text'], ['distance', 'number'], ['departure date', 'time'], ['arrival date', 'time'], ['price', 'number'], ['airline id', 'number']]

 -- Table: aircraft 
columns : [['airline id', 'number'], ['name', 'text'], ['distance', 'number']]

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

 -- Table: certificate 
columns : [['employee id', 'number'], ['airline id', 'number']]

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



Question: How many aircrafts do we have?
SQL: SELECT count(*) FROM Aircraft
-- Language PostgreSQL
        -- Tables: 
             -- Table: flight 
columns : [['flight number', 'number'], ['origin', 'text'], ['destination', 'text'], ['distance', 'number'], ['departure date', 'time'], ['arrival date', 'time'], ['price', 'number'], ['airline id', 'number']]

 -- Table: aircraft 
columns : [['airline id', 'number'], ['name', 'text'], ['distance', 'number']]

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

 -- Table: certificate 
columns : [['employee id', 'number'], ['airline id', 'number']]

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



Question: How many aircrafts exist in the database?
SQL: SELECT count(*) FROM Aircraft
-- Language PostgreSQL
        -- Tables: 
             -- Table: flight 
columns : [['flight number', 'number'], ['origin', 'text'], ['destination', 'text'], ['distance', 'number'], ['departure date', 'time'], ['arrival date', 'time'], ['price', 'number'], ['airline id', 'number']]

 -- Table: aircraft 
columns : [['airline id', 'number'], ['name', 'text'], ['distance', 'number']]

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

 -- Table: certificate 
columns : [['employee id', 'number'], ['airline id', 'number']]

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



Question: Show name and distance for all aircrafts.
SQL: SELECT name ,  distance FROM Aircraft
-- Language PostgreSQL
        -- Tables: 
             -- Table: flight 
columns : [['flight number', 'number'], ['origin', 'text'], ['destination', 'text'], ['distance', 'number'], ['departure date', 'time'], ['arrival date', 'time'], ['price', 'number'], ['airline id', 'number']]

 -- Table: aircraft 
columns : [['airline id', 'number'], ['name', 'text'], ['distance', 'number']]

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

 -- Table: certificate 
columns : [['employee id', 'number'], ['airline id', 'number']]

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



Question: What are the names and distances for all airplanes?
SQL: SELECT name ,  distance FROM Aircraft
-- Language PostgreSQL
        -- Tables: 
             -- Table: flight 
columns : [['flight number', 'number'], ['origin', 'text'], ['destination', 'text'], ['distance', 'number'], ['departure date', 'time'], ['arrival date', 'time'], ['price', 'number'], ['airline id', 'number']]

 -- Table: aircraft 
columns : [['airline id', 'number'], ['name', 'text'], ['distance', 'number']]

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

 -- Table: certificate 
columns : [['employee id', 'number'], ['airline id', 'number']]

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



Question: Show ids for all aircrafts with more than 1000 distance.
SQL: SELECT aid FROM Aircraft WHERE distance  >  1000
-- Language PostgreSQL
        -- Tables: 
             -- Table: flight 
columns : [['flight number', 'number'], ['origin', 'text'], ['destination', 'text'], ['distance', 'number'], ['departure date', 'time'], ['arrival date', 'time'], ['price', 'number'], ['airline id', 'number']]

 -- Table: aircraft 
columns : [['airline id', 'number'], ['name', 'text'], ['distance', 'number']]

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

 -- Table: certificate 
columns : [['employee id', 'number'], ['airline id', 'number']]

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



Question: What are the ids of all aircrafts that can cover a distance of more than 1000?
SQL: SELECT aid FROM Aircraft WHERE distance  >  1000