sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: What is the zip code of the hosue of the employee named Janessa Sawayn?
SQL: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 staff live in state Georgia?
SQL: SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 employees live in Georgia?
SQL: SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: Find out the first name and last name of staff lived in city Damianfort.
SQL: SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort";
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: What is the first and last name of all employees who live in the city Damianfort?
SQL: SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort";
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: Which city lives most of staffs? List the city name and number of staffs.
SQL: SELECT T1.city ,  count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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: In which city do the most employees live and how many of them live there?
SQL: SELECT T1.city ,  count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: List the states which have between 2 to 4 staffs living there.
SQL: SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 of the states that have 2 to 4 employees living there?
SQL: SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: List the first name and last name of all customers.
SQL: SELECT first_name ,  last_name FROM Customers;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 first and last names for all customers?
SQL: SELECT first_name ,  last_name FROM Customers;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: List email address and birthday of customer whose first name as Carole.
SQL: SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole"
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 email addresses and date of births for all customers who have a first name of Carole?
SQL: SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole"
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: List phone number and email address of customer with more than 2000 outstanding balance.
SQL: SELECT phone_number ,  email_address FROM Customers WHERE amount_outstanding  >  2000;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?
SQL: SELECT phone_number ,  email_address FROM Customers WHERE amount_outstanding  >  2000;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?
SQL: SELECT customer_status_code ,  cell_mobile_phone_number ,  email_address FROM Customers WHERE first_name = "Marina" OR last_name  =  "Kohler"
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?
SQL: SELECT customer_status_code ,  cell_mobile_phone_number ,  email_address FROM Customers WHERE first_name = "Marina" OR last_name  =  "Kohler"
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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: When are the birthdays of customer who are classified as 'Good Customer' status?
SQL: SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer'
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: What is the date of birth of every customer whose status code is 'Good Customer'?
SQL: SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer'
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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: When did customer with first name as Carole and last name as Bernhard became a customer?
SQL: SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard";
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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: When did Carole Bernhard first become a customer?
SQL: SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard";
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 in total?
SQL: SELECT count(*) FROM Customers;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', '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 are there?
SQL: SELECT count(*) FROM Customers;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: List all customer status codes and the number of customers having each status code.
SQL: SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: For each customer status code, how many customers are classified that way?
SQL: SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;
-- Language PostgreSQL
        -- Tables: 
             -- Table: addresses 
columns : [['address id', 'number'], ['line 1 number building', 'text'], ['city', 'text'], ['zip postcode', 'text'], ['state province county', 'text'], ['country', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['staff address id', 'number'], ['nickname', 'text'], ['first name', 'text'], ['middle name', 'text'], ['last name', 'text'], ['date of birth', 'time'], ['date joined staff', 'time'], ['date left staff', 'time']]

 -- Table: vehicles 
columns : [['vehicle id', 'number'], ['vehicle details', 'text']]

 -- Table: customers 
columns : [['customer id', 'number'], ['customer address id', 'number'], ['customer status code', 'text'], ['date became customer', 'time'], ['date of birth', 'time'], ['first name', 'text'], ['last name', 'text'], ['amount outstanding', 'number'], ['email address', 'text'], ['phone number', 'text'], ['cell mobile phone number', 'text']]

 -- Table: customer payments 
columns : [['customer id', 'number'], ['datetime payment', 'time'], ['payment method code', 'text'], ['amount payment', 'number']]

 -- Table: lessons 
columns : [['lesson id', 'number'], ['customer id', 'number'], ['lesson status code', 'text'], ['staff id', 'number'], ['vehicle id', 'number'], ['lesson date', 'time'], ['lesson time', 'text'], ['price', 'number']]

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



Question: Which customer status code has least number of customers?
SQL: SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;