messages
listlengths
3
3
system
stringclasses
1 value
user
stringlengths
326
8.38k
assistant
stringlengths
18
577
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT avg(bedroom_count) FROM Apartments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT avg(bedroom_count) FROM Apartments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number , room_count FROM Apartments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number , room_count FROM Apartments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT avg(room_count) FROM Apartments WHERE apt_type_code = "Studio"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT avg(room_count) FROM Apartments WHERE apt_type_code = "Studio"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT guest_first_name , guest_last_name FROM Guests
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT guest_first_name , guest_last_name FROM Guests
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT date_of_birth FROM Guests WHERE gender_code = "Male"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT date_of_birth FROM Guests WHERE gender_code = "Male"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT booking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT booking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number FROM Apartments ORDER BY room_count ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number FROM Apartments ORDER BY room_count ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Apartment_Buildings ( building_id INTEGER NOT NULL, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80), PRIMARY KEY (building_id), UNIQUE (building_id) )...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT count(*) FROM game WHERE season > 2007
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT Date FROM game ORDER BY home_team DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT season , home_team , away_team FROM game
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT max(home_games) , min(home_games) , avg(home_games) FROM stadium
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT average_attendance FROM stadium WHERE capacity_percentage > 100
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT player , number_of_matches , SOURCE FROM injury_accident WHERE injury != 'Knee problem'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT count(DISTINCT SOURCE) FROM injury_accident
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
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 =...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT name FROM stadium WHERE name LIKE "%Bank%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
SELECT T1.id , count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium\" (\n\"id\" int,\n\"name\" text,\n\"Ho...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "stadium" ( "id" int, "name" text, "Home_Games" int, "Average_Attendance" real, "Total_Attendance" real, "Capacity_Percentage" real, primary key ("id") ) CREATE TABLE "game" ( "stadium_id" int, "id" int, "Season" int, "Date" text, "Home_team" text, "Away_team" text, "Score" text, "Comp...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"Player_Attributes\" (\n\t`id`\tINTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "Player_Attributes" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `player_fifa_api_id` INTEGER, `player_api_id` INTEGER, `date` TEXT, `overall_rating` INTEGER, `potential` INTEGER, `preferred_foot` TEXT, `attacking_work_rate` TEXT, `defensive_work_rate` TEXT, `crossing` INTEGER, ...
SELECT T1.name , T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"Player_Attributes\" (\n\t`id`\tINTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "Player_Attributes" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `player_fifa_api_id` INTEGER, `player_api_id` INTEGER, `date` TEXT, `overall_rating` INTEGER, `potential` INTEGER, `preferred_foot` TEXT, `attacking_work_rate` TEXT, `defensive_work_rate` TEXT, `crossing` INTEGER, ...
SELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = "England"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"Player_Attributes\" (\n\t`id`\tINTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "Player_Attributes" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `player_fifa_api_id` INTEGER, `player_api_id` INTEGER, `date` TEXT, `overall_rating` INTEGER, `potential` INTEGER, `preferred_foot` TEXT, `attacking_work_rate` TEXT, `defensive_work_rate` TEXT, `crossing` INTEGER, ...
SELECT avg(weight) FROM Player
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"Player_Attributes\" (\n\t`id`\tINTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "Player_Attributes" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `player_fifa_api_id` INTEGER, `player_api_id` INTEGER, `date` TEXT, `overall_rating` INTEGER, `potential` INTEGER, `preferred_foot` TEXT, `attacking_work_rate` TEXT, `defensive_work_rate` TEXT, `crossing` INTEGER, ...
SELECT max(weight) , min(weight) FROM Player
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"Player_Attributes\" (\n\t`id`\tINTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "Player_Attributes" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `player_fifa_api_id` INTEGER, `player_api_id` INTEGER, `date` TEXT, `overall_rating` INTEGER, `potential` INTEGER, `preferred_foot` TEXT, `attacking_work_rate` TEXT, `defensive_work_rate` TEXT, `crossing` INTEGER, ...
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 )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"Player_Attributes\" (\n\t`id`\tINTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "Player_Attributes" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `player_fifa_api_id` INTEGER, `player_api_id` INTEGER, `date` TEXT, `overall_rating` INTEGER, `potential` INTEGER, `preferred_foot` TEXT, `attacking_work_rate` TEXT, `defensive_work_rate` TEXT, `crossing` INTEGER, ...
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)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"Player_Attributes\" (\n\t`id`\tINTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "Player_Attributes" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `player_fifa_api_id` INTEGER, `player_api_id` INTEGER, `date` TEXT, `overall_rating` INTEGER, `potential` INTEGER, `preferred_foot` TEXT, `attacking_work_rate` TEXT, `defensive_work_rate` TEXT, `crossing` INTEGER, ...
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"