db_id
stringlengths 3
31
| query
stringlengths 18
577
| question
stringlengths 3
224
| schema
stringlengths 177
6.14k
| primary_keys
stringlengths 16
545
| foreign_keys
stringlengths 16
1.48k
|
---|---|---|---|---|---|
train_station | SELECT name , LOCATION , number_of_platforms FROM station | Show the name, location, and number of platforms for all stations. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT DISTINCT LOCATION FROM station | What are all locations of train stations? | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT name , total_passengers FROM station WHERE LOCATION != 'London' | Show the names and total passengers for all train stations not in London. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT name , main_services FROM station ORDER BY total_passengers DESC LIMIT 3 | Show the names and main services for train stations that have the top three total number of passengers. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT avg(total_passengers) , max(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow' | What is the average and maximum number of total passengers for train stations in London or Glasgow? | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT LOCATION , sum(number_of_platforms) , sum(total_passengers) FROM station GROUP BY LOCATION | Show all locations and the total number of platforms and passengers for all train stations in each location. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25 | Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15 | Show all locations which don't have a train station with at least 15 platforms. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1 | Show the location with most number of train stations. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT name , TIME , service FROM train | Show the name, time, and service for all trains. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT count(*) FROM train | Show the number of trains | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT name , service FROM train ORDER BY TIME | Show the name and service for all trains in order by time. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT T2.name , count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id | Show the station name and number of trains in each station. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT T2.name , T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id | show the train name and station name for each train. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT T3.name , T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T2.location = 'London' ORDER BY T3.time DESC | Show all train names and times in stations in London in descending order by train time. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1 | Show the station name with greatest number of trains. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id HAVING count(*) >= 2 | Show the station name with at least two trains. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*) = 1 | Show all locations with only 1 station. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station) | Show station names without any trains. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = "Ananthapuri Express" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = "Guruvayur Express" | What are the names of the stations which serve both "Ananthapuri Express" and "Guruvayur Express" trains? | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = "London") | Find the names of the trains that do not pass any station located in London. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
train_station | SELECT name , LOCATION FROM station ORDER BY Annual_entry_exit , Annual_interchanges | List the names and locations of all stations ordered by their yearly entry exit and interchange amounts. | [Schema (values) (types)]: | train_station | station : station_id (text) , name (number) , annual_entry_exit (text) , annual_interchanges (number) , total_passengers (number) , location (number) , main_services (text) , number_of_platforms (text) | train : train_id (text) , name (number) , time (text) , service (number) | train_station : train_id (text) , station_id (number); | [Primary Keys]: station : station_id, train : train_id, train_station : train_id | [Foreign Keys]: train_station : station_id = station : station_id | train_station : train_id = train : train_id |
driving_school | SELECT vehicle_id FROM Vehicles; | List all vehicle id | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT vehicle_id FROM Vehicles; | What are the ids of all vehicles? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Vehicles; | How many vehicle in total? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Vehicles; | How many vehicles exist? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1; | Show the detail of vehicle with id 1. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1; | What are the details of the car with id 1? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT first_name , middle_name , last_name FROM Staff; | List the first name middle name and last name of all staff. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT first_name , middle_name , last_name FROM Staff; | What are the first, middle, and last names of all staff? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | What is the birthday of the staff member with first name as Janessa and last name as Sawayn? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | What is the date of birth for the staff member named Janessa Sawayn? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | When did the staff member with first name as Janessa and last name as Sawayn join the company? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | When did the staff member named Janessa Sawayn join the company? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | When did the staff member with first name as Janessa and last name as Sawayn leave the company? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | When did the staff member Janessa Sawayn leave the company? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Staff WHERE first_name = "Ludie"; | How many staff have the first name Ludie? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Staff WHERE first_name = "Ludie"; | How many employees have a first name of Ludie? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | What is the nickname of staff with first name as Janessa and last name as Sawayn? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"; | What is the nickname of the employee named Janessa Sawayn? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Staff; | How many staff in total? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Staff; | How many employees are there? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | Which city does staff with first name as Janessa and last name as Sawayn live? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | In what city does Janessa Sawayn live? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | Which country and state does staff with first name as Janessa and last name as Sawayn lived? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | In which country and state does Janessa Sawayn live? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin"; | How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin"; | How long is the total lesson time took by the customer named Rylan Goodwin? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | What is the zip code of staff with first name as Janessa and last name as Sawayn lived? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | What is the zip code of the hosue of the employee named Janessa Sawayn? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia"; | How many staff live in state Georgia? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia"; | How many employees live in Georgia? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort"; | Find out the first name and last name of staff lived in city Damianfort. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort"; | What is the first and last name of all employees who live in the city Damianfort? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1; | Which city lives most of staffs? List the city name and number of staffs. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1; | In which city do the most employees live and how many of them live there? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4; | List the states which have between 2 to 4 staffs living there. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4; | What are the names of the states that have 2 to 4 employees living there? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT first_name , last_name FROM Customers; | List the first name and last name of all customers. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT first_name , last_name FROM Customers; | What are the first and last names for all customers? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT email_address , date_of_birth FROM Customers WHERE first_name = "Carole" | List email address and birthday of customer whose first name as Carole. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT email_address , date_of_birth FROM Customers WHERE first_name = "Carole" | What are the email addresses and date of births for all customers who have a first name of Carole? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000; | List phone number and email address of customer with more than 2000 outstanding balance. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000; | What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = "Marina" OR last_name = "Kohler" | What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = "Marina" OR last_name = "Kohler" | What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer' | When are the birthdays of customer who are classified as 'Good Customer' status? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer' | What is the date of birth of every customer whose status code is 'Good Customer'? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard"; | When did customer with first name as Carole and last name as Bernhard became a customer? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard"; | When did Carole Bernhard first become a customer? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Customers; | How many customers in total? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Customers; | How many customers are there? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code; | List all customer status codes and the number of customers having each status code. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code; | For each customer status code, how many customers are classified that way? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1; | Which customer status code has least number of customers? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1; | What is the status code with the least number of customers? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" AND T1.lesson_status_code = "Completed"; | How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" AND T1.lesson_status_code = "Completed"; | How many lessons did the customer Ryan Goodwin complete? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers; | What is maximum, minimum and average amount of outstanding of customer? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers; | What is the maximum, minimum, and average amount of money outsanding for all customers? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000; | List the first name and last name of customers have the amount of outstanding between 1000 and 3000. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000; | What are the first and last names of all customers with between 1000 and 3000 dollars outstanding? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt"; | List first name and last name of customers lived in city Lockmanfurt. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt"; | What are the first and last names of all customers who lived in Lockmanfurt? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" | Which country does customer with first name as Carole and last name as Bernhard lived in? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" | What is the country in which the customer Carole Bernhard lived? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" | What is zip code of customer with first name as Carole and last name as Bernhard? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" | What is the zip code of the customer Carole Bernhard? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1; | Which city does has most number of customers? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1; | What is the city with the most customers? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard" | How much in total does customer with first name as Carole and last name as Bernhard paid? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard" | What is the total amount of moeny paid by the customer Carole Bernhard? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments ); | List the number of customers that did not have any payment history. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments ); | How many customers have no payment histories? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2; | List first name and last name of customers that have more than 2 payments. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2; | What are the first and last names of all customers with more than 2 payments? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code; | List all payment methods and number of payments using each payment methods. | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code; | For each payment method, how many payments were made? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Lessons WHERE lesson_status_code = "Cancelled"; | How many lessons were in cancelled state? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
driving_school | SELECT count(*) FROM Lessons WHERE lesson_status_code = "Cancelled"; | How many lessons have been cancelled? | [Schema (values) (types)]: | driving_school | Addresses : address_id (text) , line_1_number_building (number) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (text) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (text) , date_joined_staff (number) , date_left_staff (number) | Vehicles : vehicle_id (text) , vehicle_details (number) | Customers : customer_id (text) , customer_address_id (number) , customer_status_code (text) , date_became_customer (text) , date_of_birth (text) , first_name (text) , last_name (text) , amount_outstanding (number) , email_address (number) , phone_number (text) , cell_mobile_phone_number (text) | Customer_Payments : customer_id (text) , datetime_payment (number) , payment_method_code (text) , amount_payment (text) | Lessons : lesson_id (text) , customer_id (number) , lesson_status_code (text) , staff_id (text) , vehicle_id (text) , lesson_date (text) , lesson_time (text) , price (number); | [Primary Keys]: addresses : address_id, staff : staff_id, vehicles : vehicle_id, customers : customer_id, customer_payments : customer_id, lessons : lesson_id | [Foreign Keys]: 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.