Input:
[INST] Here is a database schema:
grapes :
ID [ INT ] primary_key
Grape [ TEXT ]
Color [ TEXT ]

appellations :
No [ INT ] primary_key
Appelation [ TEXT ]
County [ TEXT ]
State [ TEXT ]
Area [ TEXT ]
isAVA [ TEXT ]

wine :
No [ INT ]
Grape [ TEXT ] wine.Grape = grapes.Grape
Winery [ TEXT ]
Appelation [ TEXT ] wine.Appelation = appellations.Appelation
State [ TEXT ]
Name [ TEXT ]
Year [ INT ]
Price [ INT ]
Score [ INT ]
Cases [ INT ]
Drink [ TEXT ]

Please write me a SQL statement that answers the following question: Find the average price of wines that are not produced from Sonoma county. [/INST]

Output: SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  'Sonoma');


Input:
[INST] Here is a database schema:
grapes :
ID [ INT ] primary_key
Grape [ TEXT ]
Color [ TEXT ]

appellations :
No [ INT ] primary_key
Appelation [ TEXT ]
County [ TEXT ]
State [ TEXT ]
Area [ TEXT ]
isAVA [ TEXT ]

wine :
No [ INT ]
Grape [ TEXT ] wine.Grape = grapes.Grape
Winery [ TEXT ]
Appelation [ TEXT ] wine.Appelation = appellations.Appelation
State [ TEXT ]
Name [ TEXT ]
Year [ INT ]
Price [ INT ]
Score [ INT ]
Cases [ INT ]
Drink [ TEXT ]

Please write me a SQL statement that answers the following question: What is the average price for wines not produced in Sonoma county? [/INST]

Output: SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  'Sonoma');


Input:
[INST] Here is a database schema:
grapes :
ID [ INT ] primary_key
Grape [ TEXT ]
Color [ TEXT ]

appellations :
No [ INT ] primary_key
Appelation [ TEXT ]
County [ TEXT ]
State [ TEXT ]
Area [ TEXT ]
isAVA [ TEXT ]

wine :
No [ INT ]
Grape [ TEXT ] wine.Grape = grapes.Grape
Winery [ TEXT ]
Appelation [ TEXT ] wine.Appelation = appellations.Appelation
State [ TEXT ]
Name [ TEXT ]
Year [ INT ]
Price [ INT ]
Score [ INT ]
Cases [ INT ]
Drink [ TEXT ]

Please write me a SQL statement that answers the following question: Find the county where produces the most number of wines with score higher than 90. [/INST]

Output: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T2.Score  >  90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
grapes :
ID [ INT ] primary_key
Grape [ TEXT ]
Color [ TEXT ]

appellations :
No [ INT ] primary_key
Appelation [ TEXT ]
County [ TEXT ]
State [ TEXT ]
Area [ TEXT ]
isAVA [ TEXT ]

wine :
No [ INT ]
Grape [ TEXT ] wine.Grape = grapes.Grape
Winery [ TEXT ]
Appelation [ TEXT ] wine.Appelation = appellations.Appelation
State [ TEXT ]
Name [ TEXT ]
Year [ INT ]
Price [ INT ]
Score [ INT ]
Cases [ INT ]
Drink [ TEXT ]

Please write me a SQL statement that answers the following question: What is the county that produces the most wines scoring higher than 90? [/INST]

Output: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T2.Score  >  90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: How many train stations are there? [/INST]

Output: SELECT count(*) FROM station;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the name, location, and number of platforms for all stations. [/INST]

Output: SELECT name ,  LOCATION ,  number_of_platforms FROM station;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: What are all locations of train stations? [/INST]

Output: SELECT DISTINCT LOCATION FROM station;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the names and total passengers for all train stations not in London. [/INST]

Output: SELECT name ,  total_passengers FROM station WHERE LOCATION != 'London';


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the names and main services for train stations that have the top three total number of passengers. [/INST]

Output: SELECT name ,  main_services FROM station ORDER BY total_passengers DESC LIMIT 3;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: What is the average and maximum number of total passengers for train stations in London or Glasgow? [/INST]

Output: SELECT avg(total_passengers) ,  max(total_passengers) FROM station WHERE LOCATION  =  'London' OR LOCATION  =  'Glasgow';


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show all locations and the total number of platforms and passengers for all train stations in each location. [/INST]

Output: SELECT LOCATION ,  sum(number_of_platforms) ,  sum(total_passengers) FROM station GROUP BY LOCATION;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers. [/INST]

Output: SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms  >=  15 AND total_passengers  >  25;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show all locations which don't have a train station with at least 15 platforms. [/INST]

Output: SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms  >=  15;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the location with most number of train stations. [/INST]

Output: SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the name, time, and service for all trains. [/INST]

Output: SELECT name ,  TIME ,  service FROM train;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the number of trains [/INST]

Output: SELECT count(*) FROM train;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the name and service for all trains in order by time. [/INST]

Output: SELECT name ,  service FROM train ORDER BY TIME;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the station name and number of trains in each station. [/INST]

Output: SELECT T2.name ,  count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: show the train name and station name for each train. [/INST]

Output: SELECT T2.name ,  T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show all train names and times in stations in London in descending order by train time. [/INST]

Output: SELECT T3.name ,  T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id WHERE T2.location  =  'London' ORDER BY T3.time DESC;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the station name with greatest number of trains. [/INST]

Output: SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show the station name with at least two trains. [/INST]

Output: SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id HAVING count(*)  >=  2;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show all locations with only 1 station. [/INST]

Output: SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*)  =  1;


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Show station names without any trains. [/INST]

Output: SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station);


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: What are the names of the stations which serve both "Ananthapuri Express" and "Guruvayur Express" trains? [/INST]

Output: SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id WHERE T3.Name  =  "Ananthapuri Express" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id WHERE T3.Name  =  "Guruvayur Express";


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: Find the names of the trains that do not pass any station located in London. [/INST]

Output: SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id  =  T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id  =  T4.station_id WHERE t4.location  =  "London");


Input:
[INST] Here is a database schema:
station :
Station_ID [ INT ] primary_key
Name [ TEXT ]
Annual_entry_exit [ INT ]
Annual_interchanges [ INT ]
Total_Passengers [ INT ]
Location [ TEXT ]
Main_Services [ TEXT ]
Number_of_Platforms [ INT ]

train :
Train_ID [ INT ] primary_key
Name [ TEXT ]
Time [ TEXT ]
Service [ TEXT ]

train_station :
Train_ID [ INT ] primary_key train_station.Train_ID = train.Train_ID
Station_ID [ INT ] train_station.Station_ID = station.Station_ID

Please write me a SQL statement that answers the following question: List the names and locations of all stations ordered by their yearly entry exit and interchange amounts. [/INST]

Output: SELECT name ,  LOCATION FROM station ORDER BY Annual_entry_exit ,  Annual_interchanges;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: List all vehicle id [/INST]

Output: SELECT vehicle_id FROM Vehicles;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What are the ids of all vehicles? [/INST]

Output: SELECT vehicle_id FROM Vehicles;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many vehicle in total? [/INST]

Output: SELECT count(*) FROM Vehicles;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many vehicles exist? [/INST]

Output: SELECT count(*) FROM Vehicles;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: Show the detail of vehicle with id 1. [/INST]

Output: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What are the details of the car with id 1? [/INST]

Output: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: List the first name middle name and last name of all staff. [/INST]

Output: SELECT first_name ,  middle_name ,  last_name FROM Staff;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What are the first, middle, and last names of all staff? [/INST]

Output: SELECT first_name ,  middle_name ,  last_name FROM Staff;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the birthday of the staff member with first name as Janessa and last name as Sawayn? [/INST]

Output: SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the date of birth for the staff member named Janessa Sawayn? [/INST]

Output: SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: When did the staff member with first name as Janessa and last name as Sawayn join the company? [/INST]

Output: SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: When did the staff member named Janessa Sawayn join the company? [/INST]

Output: SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: When did the staff member with first name as Janessa and last name as Sawayn leave the company? [/INST]

Output: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: When did the staff member Janessa Sawayn leave the company? [/INST]

Output: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many staff have the first name Ludie? [/INST]

Output: SELECT count(*) FROM Staff WHERE first_name = "Ludie";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many employees have a first name of Ludie? [/INST]

Output: SELECT count(*) FROM Staff WHERE first_name = "Ludie";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the nickname of staff with first name as Janessa and last name as Sawayn? [/INST]

Output: SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the nickname of the employee named Janessa Sawayn? [/INST]

Output: SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many staff in total? [/INST]

Output: SELECT count(*) FROM Staff;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many employees are there? [/INST]

Output: SELECT count(*) FROM Staff;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: Which city does staff with first name as Janessa and last name as Sawayn live? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: In what city does Janessa Sawayn live? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: Which country and state does staff with first name as Janessa and last name as Sawayn lived? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: In which country and state does Janessa Sawayn live? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How long is the total lesson time took by the customer named Rylan Goodwin? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the zip code of staff with first name as Janessa and last name as Sawayn lived? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the zip code of the hosue of the employee named Janessa Sawayn? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many staff live in state Georgia? [/INST]

Output: SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many employees live in Georgia? [/INST]

Output: SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: Find out the first name and last name of staff lived in city Damianfort. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the first and last name of all employees who live in the city Damianfort? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: Which city lives most of staffs? List the city name and number of staffs. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: In which city do the most employees live and how many of them live there? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: List the states which have between 2 to 4 staffs living there. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What are the names of the states that have 2 to 4 employees living there? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: List the first name and last name of all customers. [/INST]

Output: SELECT first_name ,  last_name FROM Customers;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What are the first and last names for all customers? [/INST]

Output: SELECT first_name ,  last_name FROM Customers;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: List email address and birthday of customer whose first name as Carole. [/INST]

Output: SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What are the email addresses and date of births for all customers who have a first name of Carole? [/INST]

Output: SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: List phone number and email address of customer with more than 2000 outstanding balance. [/INST]

Output: SELECT phone_number ,  email_address FROM Customers WHERE amount_outstanding  >  2000;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000? [/INST]

Output: SELECT phone_number ,  email_address FROM Customers WHERE amount_outstanding  >  2000;


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina? [/INST]

Output: SELECT customer_status_code ,  cell_mobile_phone_number ,  email_address FROM Customers WHERE first_name = "Marina" OR last_name  =  "Kohler";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following 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? [/INST]

Output: SELECT customer_status_code ,  cell_mobile_phone_number ,  email_address FROM Customers WHERE first_name = "Marina" OR last_name  =  "Kohler";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: When are the birthdays of customer who are classified as 'Good Customer' status? [/INST]

Output: SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer';


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: What is the date of birth of every customer whose status code is 'Good Customer'? [/INST]

Output: SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer';


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: When did customer with first name as Carole and last name as Bernhard became a customer? [/INST]

Output: SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: When did Carole Bernhard first become a customer? [/INST]

Output: SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard";


Input:
[INST] Here is a database schema:
Addresses :
address_id [ INT ] primary_key
line_1_number_building [ TEXT ]
city [ TEXT ]
zip_postcode [ TEXT ]
state_province_county [ TEXT ]
country [ TEXT ]

Staff :
staff_id [ INT ] primary_key
staff_address_id [ INT ] Staff.staff_address_id = Addresses.address_id
nickname [ TEXT ]
first_name [ TEXT ]
middle_name [ TEXT ]
last_name [ TEXT ]
date_of_birth [ TEXT ]
date_joined_staff [ TEXT ]
date_left_staff [ TEXT ]

Vehicles :
vehicle_id [ INT ] primary_key
vehicle_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_address_id [ INT ] Customers.customer_address_id = Addresses.address_id
customer_status_code [ TEXT ]
date_became_customer [ TEXT ]
date_of_birth [ TEXT ]
first_name [ TEXT ]
last_name [ TEXT ]
amount_outstanding [ INT ]
email_address [ TEXT ]
phone_number [ TEXT ]
cell_mobile_phone_number [ TEXT ]

Customer_Payments :
customer_id [ INT ] primary_key Customer_Payments.customer_id = Customers.customer_id
datetime_payment [ TEXT ]
payment_method_code [ TEXT ]
amount_payment [ INT ]

Lessons :
lesson_id [ INT ] primary_key
customer_id [ INT ] Lessons.customer_id = Customers.customer_id
lesson_status_code [ TEXT ]
staff_id [ INT ] Lessons.staff_id = Staff.staff_id
vehicle_id [ INT ] Lessons.vehicle_id = Vehicles.vehicle_id
lesson_date [ TEXT ]
lesson_time [ TEXT ]
price [ INT ]

Please write me a SQL statement that answers the following question: How many customers in total? [/INST]

Output: SELECT count(*) FROM Customers;