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 are the ids of all vehicles?
SQL: SELECT vehicle_id FROM Vehicles;
-- 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 vehicle in total?
SQL: SELECT count(*) FROM Vehicles;
-- 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 vehicles exist?
SQL: SELECT count(*) FROM Vehicles;
-- 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: Show the detail of vehicle with id 1.
SQL: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 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: What are the details of the car with id 1?
SQL: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 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 first name middle name and last name of all staff.
SQL: SELECT first_name ,  middle_name ,  last_name FROM Staff;
-- 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, middle, and last names of all staff?
SQL: SELECT first_name ,  middle_name ,  last_name FROM Staff;
-- 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 birthday of the staff member with first name as Janessa and last name as Sawayn?
SQL: SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND 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: What is the date of birth for the staff member named Janessa Sawayn?
SQL: SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND 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: When did the staff member with first name as Janessa and last name as Sawayn join the company?
SQL: SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND 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: When did the staff member named Janessa Sawayn join the company?
SQL: SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND 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: When did the staff member with first name as Janessa and last name as Sawayn leave the company?
SQL: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND 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: When did the staff member Janessa Sawayn leave the company?
SQL: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND 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 have the first name Ludie?
SQL: SELECT count(*) FROM Staff WHERE first_name = "Ludie";
-- 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 have a first name of Ludie?
SQL: SELECT count(*) FROM Staff WHERE first_name = "Ludie";
-- 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 nickname of staff with first name as Janessa and last name as Sawayn?
SQL: SELECT nickname FROM Staff WHERE first_name = "Janessa" AND 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: What is the nickname of the employee named Janessa Sawayn?
SQL: SELECT nickname FROM Staff WHERE first_name = "Janessa" AND 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 in total?
SQL: SELECT count(*) FROM Staff;
-- 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 are there?
SQL: SELECT count(*) FROM Staff;
-- 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 does staff with first name as Janessa and last name as Sawayn live?
SQL: SELECT T1.city 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: In what city does Janessa Sawayn live?
SQL: SELECT T1.city 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: Which country and state does staff with first name as Janessa and last name as Sawayn lived?
SQL: SELECT T1.country ,  T1.state_province_county 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: In which country and state does Janessa Sawayn live?
SQL: SELECT T1.country ,  T1.state_province_county 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 long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?
SQL: SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin";
-- 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 long is the total lesson time took by the customer named Rylan Goodwin?
SQL: SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin";
-- 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 staff with first name as Janessa and last name as Sawayn lived?
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";