human
Schema:
Apartment_Buildings (building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone)
Apartments (apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count)
Apartment_Facilities (apt_id, facility_code)
Guests (guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth)
Apartment_Bookings (apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date)
View_Unit_Status (apt_id, apt_booking_id, status_date, available_yn)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the booking start and end dates of the apartments with more than 2 bedrooms?
assistant
SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2
human
Show the apartment type codes and apartment numbers in the buildings managed by 'Kyle'.
assistant
SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = 'Kyle'
human
What is the booking status code of the apartment with apartment number 'Suite 634'?
assistant
SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = 'Suite 634'
human
Show the addresses of the buildings that have apartments with more than 2 bathrooms.
assistant
SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2
human
Show the short names of the buildings managed by 'Emma'.
assistant
SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma'
human
What are the address and phone number of the buildings managed by 'Brenden'?
assistant
SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden" ;