db_id
stringlengths
4
31
text
stringlengths
370
4.84k
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name, location, and number of platforms for all stations. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select name , location , number_of_platforms from station
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are all locations of train stations? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select distinct location from station
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names and total passengers for all train stations not in London. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select name , total_passengers from station where location != 'London'
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names and main services for train stations that have the top three total number of passengers. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select name , main_services from station order by total_passengers desc limit 3
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average and maximum number of total passengers for train stations in London or Glasgow? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select avg ( total_passengers ) , max ( total_passengers ) from station where location = 'London' or location = 'Glasgow'
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all locations and the total number of platforms and passengers for all train stations in each location. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select location , sum ( number_of_platforms ) , sum ( total_passengers ) from station group by location
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select distinct location from station where number_of_platforms >= 15 and total_passengers > 25
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all locations which don't have a train station with at least 15 platforms. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select location from station except select location from station where number_of_platforms >= 15
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the location with most number of train stations. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select location from station group by location order by count ( * ) desc limit 1
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name, time, and service for all trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select name , time , service from train
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the number of trains | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select count ( * ) from train
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name and service for all trains in order by time. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select name , service from train order by time asc
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the station name and number of trains in each station. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select station.name , count ( * ) from train_station join station on train_station.station_id = station.station_id group by train_station.station_id
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: show the train name and station name for each train. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select station.name , train.name from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all train names and times in stations in London in descending order by train time. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select train.name , train.time from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id where station.location = 'London' order by train.time desc
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the station name with greatest number of trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select station.name from train_station join station on train_station.station_id = station.station_id group by train_station.station_id order by count ( * ) desc limit 1
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the station name with at least two trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select station.name from train_station join station on train_station.station_id = station.station_id group by train_station.station_id having count ( * ) >= 2
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all locations with only 1 station. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select location from station group by location having count ( * ) = 1
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show station names without any trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select name from station where station_id not in ( select station_id from train_station )
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the stations which serve both "Ananthapuri Express" and "Guruvayur Express" trains? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select station.name from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id where train.name = 'Ananthapuri Express' intersect select station.name from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id where train.name = 'Guruvayur Express'
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of the trains that do not pass any station located in London. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select train.name from train_station join train on train_station.train_id = train.train_id where train_station.station_id not in ( select station.station_id from train_station join station on train_station.station_id = station.station_id where station.location = 'London' )
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names and locations of all stations ordered by their yearly entry exit and interchange amounts. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select name , location from station order by annual_entry_exit asc , annual_interchanges
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all vehicle id | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select vehicle_id from vehicles
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of all vehicles? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select vehicle_id from vehicles
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many vehicle in total? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from vehicles
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many vehicles exist? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from vehicles
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the detail of vehicle with id 1. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select vehicle_details from vehicles where vehicle_id = 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details of the car with id 1? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select vehicle_details from vehicles where vehicle_id = 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the first name middle name and last name of all staff. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select first_name , middle_name , last_name from staff
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first, middle, and last names of all staff? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select first_name , middle_name , last_name from staff
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the birthday of the staff member with first name as Janessa and last name as Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_of_birth from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the date of birth for the staff member named Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_of_birth from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did the staff member with first name as Janessa and last name as Sawayn join the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_joined_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did the staff member named Janessa Sawayn join the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_joined_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did the staff member with first name as Janessa and last name as Sawayn leave the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_left_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did the staff member Janessa Sawayn leave the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_left_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many staff have the first name Ludie? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from staff where first_name = 'Ludie'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many employees have a first name of Ludie? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from staff where first_name = 'Ludie'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the nickname of staff with first name as Janessa and last name as Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select nickname from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the nickname of the employee named Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select nickname from staff where first_name = 'Janessa' and last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many staff in total? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from staff
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many employees are there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from staff
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which city does staff with first name as Janessa and last name as Sawayn live? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.city from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: In what city does Janessa Sawayn live? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.city from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which country and state does staff with first name as Janessa and last name as Sawayn lived? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.country , addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: In which country and state does Janessa Sawayn live? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.country , addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select sum ( lessons.lesson_time ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How long is the total lesson time took by the customer named Rylan Goodwin? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select sum ( lessons.lesson_time ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the zip code of staff with first name as Janessa and last name as Sawayn lived? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.zip_postcode from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the zip code of the hosue of the employee named Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.zip_postcode from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many staff live in state Georgia? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from addresses where state_province_county = 'Georgia'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many employees live in Georgia? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from addresses where state_province_county = 'Georgia'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find out the first name and last name of staff lived in city Damianfort. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select staff.first_name , staff.last_name from addresses join staff on addresses.address_id = staff.staff_address_id where addresses.city = 'Damianfort'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the first and last name of all employees who live in the city Damianfort? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select staff.first_name , staff.last_name from addresses join staff on addresses.address_id = staff.staff_address_id where addresses.city = 'Damianfort'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which city lives most of staffs? List the city name and number of staffs. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.city , count ( * ) from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.city order by count ( * ) desc limit 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: In which city do the most employees live and how many of them live there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.city , count ( * ) from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.city order by count ( * ) desc limit 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the states which have between 2 to 4 staffs living there. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.state_province_county having count ( * ) between 2 and 4
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the states that have 2 to 4 employees living there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.state_province_county having count ( * ) between 2 and 4
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the first name and last name of all customers. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select first_name , last_name from customers
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first and last names for all customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select first_name , last_name from customers
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List email address and birthday of customer whose first name as Carole. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select email_address , date_of_birth from customers where first_name = 'Carole'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the email addresses and date of births for all customers who have a first name of Carole? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select email_address , date_of_birth from customers where first_name = 'Carole'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List phone number and email address of customer with more than 2000 outstanding balance. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select phone_number , email_address from customers where amount_outstanding > 2000
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select phone_number , email_address from customers where amount_outstanding > 2000
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customer_status_code , cell_mobile_phone_number , email_address from customers where first_name = 'Marina' or last_name = 'Kohler'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customer_status_code , cell_mobile_phone_number , email_address from customers where first_name = 'Marina' or last_name = 'Kohler'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When are the birthdays of customer who are classified as 'Good Customer' status? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_of_birth from customers where customer_status_code = 'Good Customer'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the date of birth of every customer whose status code is 'Good Customer'? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_of_birth from customers where customer_status_code = 'Good Customer'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did customer with first name as Carole and last name as Bernhard became a customer? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_became_customer from customers where first_name = 'Carole' and last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did Carole Bernhard first become a customer? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select date_became_customer from customers where first_name = 'Carole' and last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many customers in total? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from customers
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many customers are there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from customers
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all customer status codes and the number of customers having each status code. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customer_status_code , count ( * ) from customers group by customer_status_code
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each customer status code, how many customers are classified that way? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customer_status_code , count ( * ) from customers group by customer_status_code
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which customer status code has least number of customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customer_status_code from customers group by customer_status_code order by count ( * ) asc limit 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the status code with the least number of customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customer_status_code from customers group by customer_status_code order by count ( * ) asc limit 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin' and lessons.lesson_status_code = 'Completed'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many lessons did the customer Ryan Goodwin complete? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin' and lessons.lesson_status_code = 'Completed'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is maximum, minimum and average amount of outstanding of customer? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select max ( amount_outstanding ) , min ( amount_outstanding ) , avg ( amount_outstanding ) from customers
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the maximum, minimum, and average amount of money outsanding for all customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select max ( amount_outstanding ) , min ( amount_outstanding ) , avg ( amount_outstanding ) from customers
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the first name and last name of customers have the amount of outstanding between 1000 and 3000. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select first_name , last_name from customers where amount_outstanding between 1000 and 3000
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first and last names of all customers with between 1000 and 3000 dollars outstanding? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select first_name , last_name from customers where amount_outstanding between 1000 and 3000
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List first name and last name of customers lived in city Lockmanfurt. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customers.first_name , customers.last_name from customers join addresses on customers.customer_address_id = addresses.address_id where addresses.city = 'Lockmanfurt'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first and last names of all customers who lived in Lockmanfurt? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customers.first_name , customers.last_name from customers join addresses on customers.customer_address_id = addresses.address_id where addresses.city = 'Lockmanfurt'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which country does customer with first name as Carole and last name as Bernhard lived in? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.country from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the country in which the customer Carole Bernhard lived? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.country from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is zip code of customer with first name as Carole and last name as Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.zip_postcode from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the zip code of the customer Carole Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.zip_postcode from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which city does has most number of customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.city from customers join addresses on customers.customer_address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the city with the most customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select addresses.city from customers join addresses on customers.customer_address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How much in total does customer with first name as Carole and last name as Bernhard paid? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select sum ( customer_payments.amount_payment ) from customer_payments join customers on customer_payments.customer_id = customers.customer_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total amount of moeny paid by the customer Carole Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select sum ( customer_payments.amount_payment ) from customer_payments join customers on customer_payments.customer_id = customers.customer_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the number of customers that did not have any payment history. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from customers where customer_id not in ( select customer_id from customer_payments )
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many customers have no payment histories? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from customers where customer_id not in ( select customer_id from customer_payments )
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List first name and last name of customers that have more than 2 payments. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customers.first_name , customers.last_name from customer_payments join customers on customer_payments.customer_id = customers.customer_id group by customer_payments.customer_id having count ( * ) > 2
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first and last names of all customers with more than 2 payments? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select customers.first_name , customers.last_name from customer_payments join customers on customer_payments.customer_id = customers.customer_id group by customer_payments.customer_id having count ( * ) > 2
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all payment methods and number of payments using each payment methods. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select payment_method_code , count ( * ) from customer_payments group by payment_method_code
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each payment method, how many payments were made? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select payment_method_code , count ( * ) from customer_payments group by payment_method_code
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many lessons were in cancelled state? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from lessons where lesson_status_code = 'Cancelled'
driving_school
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many lessons have been cancelled? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | ### Response: select count ( * ) from lessons where lesson_status_code = 'Cancelled'