input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT avg(bedroom_count) FROM Apartments;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT avg(bedroom_count) FROM Apartments;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number , room_count FROM Apartments;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number , room_count FROM Apartments;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT avg(room_count) FROM Apartments WHERE apt_type_code = "Studio";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT avg(room_count) FROM Apartments WHERE apt_type_code = "Studio";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT guest_first_name , guest_last_name FROM Guests;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT guest_first_name , guest_last_name FROM Guests;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT date_of_birth FROM Guests WHERE gender_code = "Male";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT date_of_birth FROM Guests WHERE gender_code = "Male";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.apt_number , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.apt_number , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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.apt_type_code = "Duplex";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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.apt_type_code = "Duplex";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = "Confirmed";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = "Confirmed";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = "Columbus Square";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = "Columbus Square";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
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";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT booking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT booking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number FROM Apartments ORDER BY room_count ASC;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number FROM Apartments ORDER BY room_count ASC;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities);
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities);
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional";
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT count(*) FROM game WHERE season > 2007;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT Date FROM game ORDER BY home_team DESC;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT season , home_team , away_team FROM game;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT max(home_games) , min(home_games) , avg(home_games) FROM stadium;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT average_attendance FROM stadium WHERE capacity_percentage > 100;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT player , number_of_matches , SOURCE FROM injury_accident WHERE injury != 'Knee problem';
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel';
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T1.id , T1.score , T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING count(*) >= 2;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T1.season , T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem';
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT count(DISTINCT SOURCE) FROM injury_accident;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident );
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player =...
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT name , average_attendance , total_attendance FROM stadium EXCEPT SELECT T2.name , T2.average_attendance , T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT name FROM stadium WHERE name LIKE "%Bank%";
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T1.id , count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id;
Tables: stadium, game, injury_accident Columns: stadium.id, stadium.name, stadium.Home_Games, stadium.Average_Attendance, stadium.Total_Attendance, stadium.Capacity_Percentage, game.stadium_id, game.id, game.Season, game.Date, game.Home_team, game.Away_team, game.Score, game.Competition, injury_accident.game_id, injury...
SELECT T1.date , T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id ORDER BY T1.season DESC;
Tables: Player_Attributes, sqlite_sequence, Player, League, Country, Team, Team_Attributes Columns: Player_Attributes.id, Player_Attributes.player_fifa_api_id, Player_Attributes.player_api_id, Player_Attributes.date, Player_Attributes.overall_rating, Player_Attributes.potential, Player_Attributes.preferred_foot, Player...
SELECT T1.name , T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id;
Tables: Player_Attributes, sqlite_sequence, Player, League, Country, Team, Team_Attributes Columns: Player_Attributes.id, Player_Attributes.player_fifa_api_id, Player_Attributes.player_api_id, Player_Attributes.date, Player_Attributes.overall_rating, Player_Attributes.potential, Player_Attributes.preferred_foot, Player...
SELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = "England";
Tables: Player_Attributes, sqlite_sequence, Player, League, Country, Team, Team_Attributes Columns: Player_Attributes.id, Player_Attributes.player_fifa_api_id, Player_Attributes.player_api_id, Player_Attributes.date, Player_Attributes.overall_rating, Player_Attributes.potential, Player_Attributes.preferred_foot, Player...
SELECT avg(weight) FROM Player;
Tables: Player_Attributes, sqlite_sequence, Player, League, Country, Team, Team_Attributes Columns: Player_Attributes.id, Player_Attributes.player_fifa_api_id, Player_Attributes.player_api_id, Player_Attributes.date, Player_Attributes.overall_rating, Player_Attributes.potential, Player_Attributes.preferred_foot, Player...
SELECT max(weight) , min(weight) FROM Player;
Tables: Player_Attributes, sqlite_sequence, Player, League, Country, Team, Team_Attributes Columns: Player_Attributes.id, Player_Attributes.player_fifa_api_id, Player_Attributes.player_api_id, Player_Attributes.date, Player_Attributes.overall_rating, Player_Attributes.potential, Player_Attributes.preferred_foot, Player...
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > ( SELECT avg(overall_rating) FROM Player_Attributes );
Tables: Player_Attributes, sqlite_sequence, Player, League, Country, Team, Team_Attributes Columns: Player_Attributes.id, Player_Attributes.player_fifa_api_id, Player_Attributes.player_api_id, Player_Attributes.date, Player_Attributes.overall_rating, Player_Attributes.potential, Player_Attributes.preferred_foot, Player...
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = ( SELECT max(overall_rating) FROM Player_Attributes);
Tables: Player_Attributes, sqlite_sequence, Player, League, Country, Team, Team_Attributes Columns: Player_Attributes.id, Player_Attributes.player_fifa_api_id, Player_Attributes.player_api_id, Player_Attributes.date, Player_Attributes.overall_rating, Player_Attributes.potential, Player_Attributes.preferred_foot, Player...
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = "right";