CREATE TABLE Addresses (
    address_id NUMBER PRIMARY KEY,
    line_1_number_building TEXT,
    city TEXT,
    zip_postcode TEXT,
    state_province_county TEXT,
    country TEXT
);
CREATE TABLE Staff (
    staff_id NUMBER PRIMARY KEY,
    staff_address_id NUMBER,
    nickname TEXT,
    first_name TEXT,
    middle_name TEXT,
    last_name TEXT,
    date_of_birth TIME,
    date_joined_staff TIME,
    date_left_staff TIME,
    FOREIGN KEY ("staff_address_id") REFERENCES Addresses("address_id")
);
CREATE TABLE Vehicles (
    vehicle_id NUMBER PRIMARY KEY,
    vehicle_details TEXT
);
CREATE TABLE Customers (
    customer_id NUMBER PRIMARY KEY,
    customer_address_id NUMBER,
    customer_status_code TEXT,
    date_became_customer TIME,
    date_of_birth TIME,
    first_name TEXT,
    last_name TEXT,
    amount_outstanding NUMBER,
    email_address TEXT,
    phone_number TEXT,
    cell_mobile_phone_number TEXT,
    FOREIGN KEY ("customer_address_id") REFERENCES Addresses("address_id")
);
CREATE TABLE Customer_Payments (
    customer_id NUMBER PRIMARY KEY,
    datetime_payment TIME,
    payment_method_code TEXT,
    amount_payment NUMBER,
    FOREIGN KEY ("customer_id") REFERENCES Customers("customer_id")
);
CREATE TABLE Lessons (
    lesson_id NUMBER PRIMARY KEY,
    customer_id NUMBER,
    lesson_status_code TEXT,
    staff_id NUMBER,
    vehicle_id NUMBER,
    lesson_date TIME,
    lesson_time TEXT,
    price NUMBER,
    FOREIGN KEY ("customer_id") REFERENCES Customers("customer_id"),
    FOREIGN KEY ("staff_id") REFERENCES Staff("staff_id"),
    FOREIGN KEY ("vehicle_id") REFERENCES Vehicles("vehicle_id")
);

Question: List all vehicle id
SQL: SELECT vehicle_id FROM Vehicles;

Question: What are the ids of all vehicles?
SQL: SELECT vehicle_id FROM Vehicles;

Question: How many vehicle in total?
SQL: SELECT count(*) FROM Vehicles;

Question: How many vehicles exist?
SQL: SELECT count(*) FROM Vehicles;

Question: Show the detail of vehicle with id 1.
SQL: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;

Question: What are the details of the car with id 1?
SQL: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;

Question: List the first name middle name and last name of all staff.
SQL: SELECT first_name ,  middle_name ,  last_name FROM Staff;

Question: What are the first, middle, and last names of all staff?
SQL: SELECT first_name ,  middle_name ,  last_name FROM Staff;

Question: What is the birthday of the staff member with first name as Janessa and last name as Sawayn?
SQL: SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: What is the date of birth for the staff member named Janessa Sawayn?
SQL: SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: When did the staff member with first name as Janessa and last name as Sawayn join the company?
SQL: SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: When did the staff member named Janessa Sawayn join the company?
SQL: SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: When did the staff member with first name as Janessa and last name as Sawayn leave the company?
SQL: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: When did the staff member Janessa Sawayn leave the company?
SQL: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: How many staff have the first name Ludie?
SQL: SELECT count(*) FROM Staff WHERE first_name = "Ludie";

Question: How many employees have a first name of Ludie?
SQL: SELECT count(*) FROM Staff WHERE first_name = "Ludie";

Question: What is the nickname of staff with first name as Janessa and last name as Sawayn?
SQL: SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: What is the nickname of the employee named Janessa Sawayn?
SQL: SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

Question: How many staff in total?
SQL: SELECT count(*) FROM Staff;

Question: How many employees are there?
SQL: SELECT count(*) FROM Staff;

Question: Which city does staff with first name as Janessa and last name as Sawayn live?
SQL: SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

Question: In what city does Janessa Sawayn live?
SQL: SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

Question: Which country and state does staff with first name as Janessa and last name as Sawayn lived?
SQL: SELECT T1.country ,  T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

Question: In which country and state does Janessa Sawayn live?
SQL: SELECT T1.country ,  T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

Question: How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?
SQL: SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin";

Question: How long is the total lesson time took by the customer named Rylan Goodwin?
SQL: SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin";

Question: What is the zip code of staff with first name as Janessa and last name as Sawayn lived?
SQL: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

Question: What is the zip code of the hosue of the employee named Janessa Sawayn?
SQL: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

Question: How many staff live in state Georgia?
SQL: SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";

Question: How many employees live in Georgia?
SQL: SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";

Question: Find out the first name and last name of staff lived in city Damianfort.
SQL: SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort";

Question: What is the first and last name of all employees who live in the city Damianfort?
SQL: SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort";

Question: Which city lives most of staffs? List the city name and number of staffs.
SQL: SELECT T1.city ,  count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;

Question: In which city do the most employees live and how many of them live there?
SQL: SELECT T1.city ,  count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;

Question: List the states which have between 2 to 4 staffs living there.
SQL: SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;