sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 number of accounts.
SQL: SELECT count(*) FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 accounts are there?
SQL: SELECT count(*) FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 customers have opened an account?
SQL: SELECT count(DISTINCT customer_id) FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 customers who have an account.
SQL: SELECT count(DISTINCT customer_id) FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 id, the date of account opened, the account name, and other account detail for all accounts.
SQL: SELECT account_id ,  date_account_opened ,  account_name ,  other_account_details FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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, date opened, name, and other details for all accounts?
SQL: SELECT account_id ,  date_account_opened ,  account_name ,  other_account_details FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.
SQL: SELECT T1.account_id ,  T1.date_account_opened ,  T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  'Meaghan'
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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, names, dates of opening, and other details for accounts corresponding to the customer with the first name "Meaghan"?
SQL: SELECT T1.account_id ,  T1.date_account_opened ,  T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  'Meaghan'
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.
SQL: SELECT T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  "Meaghan" AND T2.customer_last_name  =  "Keeling"
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 other details for accounts corresponding to the customer named Meaghan Keeling?
SQL: SELECT T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  "Meaghan" AND T2.customer_last_name  =  "Keeling"
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 first name and last name for the customer with account name 900.
SQL: SELECT T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.account_name  =  "900"
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 full names of customers with the account name 900?
SQL: SELECT T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.account_name  =  "900"
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 customers don't have an account?
SQL: SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 customers who do not have an account.
SQL: SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 unique first names, last names, and phone numbers for all customers with any account.
SQL: SELECT DISTINCT T1.customer_first_name ,  T1.customer_last_name ,  T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id  =  T2.customer_id
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 distinct first names, last names, and phone numbers for customers with accounts?
SQL: SELECT DISTINCT T1.customer_first_name ,  T1.customer_last_name ,  T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id  =  T2.customer_id
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 customer ids who don't have an account.
SQL: SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 customer ids for customers who do not have an account?
SQL: SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
-- Language PostgreSQL
        -- Tables: 
             -- Table: customers 
columns : [['customer id', 'number'], ['customer first name', 'text'], ['customer middle initial', 'text'], ['customer last name', 'text'], ['gender', 'text'], ['email address', 'text'], ['login name', 'text'], ['login password', 'text'], ['phone number', 'text'], ['town city', 'text'], ['state county province', 'text'], ['country', 'text']]

 -- Table: orders 
columns : [['order id', 'number'], ['customer id', 'number'], ['date order placed', 'time'], ['order details', 'text']]

 -- Table: invoices 
columns : [['invoice number', 'number'], ['order id', 'number'], ['invoice date', 'time']]

 -- Table: accounts 
columns : [['account id', 'number'], ['customer id', 'number'], ['date account opened', 'time'], ['account name', 'text'], ['other account details', 'text']]

 -- Table: product categories 
columns : [['production type code', 'text'], ['product type description', 'text'], ['vat rating', 'number']]

 -- Table: products 
columns : [['product id', 'number'], ['parent product id', 'number'], ['production type code', 'text'], ['unit price', 'number'], ['product name', 'text'], ['product color', 'text'], ['product size', 'text']]

 -- Table: financial transactions 
columns : [['transaction id', 'number'], ['account id', 'number'], ['invoice number', 'number'], ['transaction type', 'text'], ['transaction date', 'time'], ['transaction amount', 'number'], ['transaction comment', 'text'], ['other transaction details', 'text']]

 -- Table: order items 
columns : [['order item id', 'number'], ['order id', 'number'], ['product id', 'number'], ['product quantity', 'text'], ['other order item details', 'text']]

 -- Table: invoice line items 
columns : [['order item id', 'number'], ['invoice number', 'number'], ['product id', 'number'], ['product title', 'text'], ['product quantity', 'text'], ['product price', 'number'], ['derived product cost', 'number'], ['derived vat payable', 'number'], ['derived total cost', '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 accounts does each customer have? List the number and customer id.
SQL: SELECT count(*) ,  customer_id FROM Accounts GROUP BY customer_id