id int64 0 8.66k | db_id stringclasses 146
values | schema stringclasses 146
values | question stringlengths 3 224 | output stringlengths 18 577 |
|---|---|---|---|---|
2,600 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What kind of decor has the least number of reservations? | SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1; |
2,601 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What is the least popular kind of decor? | SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1; |
2,602 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids. | SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids; |
2,603 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | How many times the number of adults and kids staying in a room reached the maximum capacity of the room? | SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids; |
2,604 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the first and last names of people who payed more than the rooms' base prices. | SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0 |
2,605 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the first and last names of people who payed more than the rooms' base prices? | SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0 |
2,606 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | How many rooms are there? | SELECT count(*) FROM Rooms; |
2,607 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What is the total number of rooms available in this inn? | SELECT count(*) FROM Rooms; |
2,608 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the number of rooms with a king bed. | SELECT count(*) FROM Rooms WHERE bedType = "King"; |
2,609 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | How many rooms have a king bed? | SELECT count(*) FROM Rooms WHERE bedType = "King"; |
2,610 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the number of rooms for each bed type. | SELECT bedType , count(*) FROM Rooms GROUP BY bedType; |
2,611 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the number of rooms for each bed type? | SELECT bedType , count(*) FROM Rooms GROUP BY bedType; |
2,612 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the name of the room with the maximum occupancy. | SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1; |
2,613 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What is the name of the room that can accommodate the most people? | SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1; |
2,614 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the id and name of the most expensive base price room. | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1; |
2,615 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Which room has the highest base price? | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1; |
2,616 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | List the type of bed and name of all traditional rooms. | SELECT roomName , bedType FROM Rooms WHERE decor = "traditional"; |
2,617 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the bed type and name of all the rooms with traditional decor? | SELECT roomName , bedType FROM Rooms WHERE decor = "traditional"; |
2,618 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the number of rooms with king bed for each decor type. | SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor; |
2,619 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | How many rooms have king beds? Report the number for each decor type. | SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor; |
2,620 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the average and minimum price of the rooms in different decor. | SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor; |
2,621 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What is the average minimum and price of the rooms for each different decor. | SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor; |
2,622 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | List the name of all rooms sorted by their prices. | SELECT roomName FROM Rooms ORDER BY basePrice; |
2,623 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Sort all the rooms according to the price. Just report the room names. | SELECT roomName FROM Rooms ORDER BY basePrice; |
2,624 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the number of rooms with price higher than 120 for different decor. | SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor; |
2,625 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | How many rooms cost more than 120, for each different decor? | SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor; |
2,626 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | For each bed type, find the average room price. | SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType; |
2,627 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What is the average base price of rooms, for each bed type? | SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType; |
2,628 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | List the name of rooms with king or queen bed. | SELECT roomName FROM Rooms WHERE bedType = "King" OR bedType = "Queen"; |
2,629 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the names of rooms that have either king or queen bed? | SELECT roomName FROM Rooms WHERE bedType = "King" OR bedType = "Queen"; |
2,630 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | How many different types of beds are there? | SELECT count(DISTINCT bedType) FROM Rooms; |
2,631 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the number of distinct bed types available in this inn. | SELECT count(DISTINCT bedType) FROM Rooms; |
2,632 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the name and id of the top 3 expensive rooms. | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3; |
2,633 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the name and id of the three highest priced rooms? | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3; |
2,634 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the name of rooms whose price is higher than the average price. | SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms ); |
2,635 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the name of rooms that cost more than the average. | SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms ); |
2,636 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the number of rooms that do not have any reservation. | SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations) |
2,637 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | How many rooms have not had any reservation yet? | SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations) |
2,638 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Return the name and number of reservations made for each of the rooms. | SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room |
2,639 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | For each room, find its name and the number of times reservations were made for it. | SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room |
2,640 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the names of rooms that have been reserved for more than 60 times. | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60 |
2,641 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the names of rooms whose reservation frequency exceeds 60 times? | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60 |
2,642 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the name of rooms whose base price is between 120 and 150. | SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150 |
2,643 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Which rooms cost between 120 and 150? Give me the room names. | SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150 |
2,644 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | Find the name of rooms booked by some customers whose first name contains ROY. | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%' |
2,645 | inn_1 | CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
);
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckO... | What are the name of rooms booked by customers whose first name has "ROY" in part? | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%' |
2,646 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | what are the details of the cmi masters that have the cross reference code 'Tax'? | SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax' |
2,647 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code. | SELECT T1.cmi_cross_ref_id , T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*) >= 1 |
2,648 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n | SELECT T2.cmi_cross_ref_id , T2.master_customer_id , count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id |
2,649 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id. | SELECT T1.source_system_code , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id |
2,650 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | Wat is the tax source system code and master customer id of the taxes related to each parking fine id? | SELECT T1.source_system_code , T1.master_customer_id , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id |
2,651 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'? | SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details != 'Schmidt , Kertzmann and Lubowitz' |
2,652 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'? | SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax' |
2,653 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | How many different source system code for the cmi cross references are there? | SELECT count(DISTINCT source_system_code) FROM CMI_cross_references |
2,654 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | List all information about customer master index, and sort them by details in descending order. | SELECT * FROM customer_master_index ORDER BY cmi_details DESC |
2,655 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | List the council tax ids and their related cmi cross references of all the parking fines. | SELECT council_tax_id , cmi_cross_ref_id FROM parking_fines |
2,656 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | How many council taxes are collected for renting arrears ? | SELECT count(*) FROM rent_arrears |
2,657 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'? | SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman' |
2,658 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | Which cmi cross reference id is not related to any parking taxes? | SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines |
2,659 | local_govt_mdm | CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(
255
),
PRIMARY KEY (
master_customer_id
)
);
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(
15
) NOT NULL,
PRIMARY ... | Which distinct source system code includes the substring 'en'? | SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%' |
2,660 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | How many parties are there? | SELECT count(*) FROM party |
2,661 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Count the number of parties. | SELECT count(*) FROM party |
2,662 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | List the themes of parties in ascending order of number of hosts. | SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC |
2,663 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | What are the themes of parties ordered by the number of hosts in ascending manner? | SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC |
2,664 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | What are the themes and locations of parties? | SELECT Party_Theme , LOCATION FROM party |
2,665 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Give me the theme and location of each party. | SELECT Party_Theme , LOCATION FROM party |
2,666 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the first year and last year of parties with theme "Spring" or "Teqnology". | SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" |
2,667 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | What are the first year and last year of the parties whose theme is "Spring" or "Teqnology"? | SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" |
2,668 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | What is the average number of hosts for parties? | SELECT avg(Number_of_hosts) FROM party |
2,669 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Compute the average number of hosts for parties. | SELECT avg(Number_of_hosts) FROM party |
2,670 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | What is the location of the party with the most hosts? | SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1 |
2,671 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Which party had the most hosts? Give me the party location. | SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1 |
2,672 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show different nationalities along with the number of hosts of each nationality. | SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality |
2,673 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | How many hosts does each nationality have? List the nationality and the count. | SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality |
2,674 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the most common nationality of hosts. | SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 |
2,675 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Which nationality has the most hosts? | SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 |
2,676 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the nations that have both hosts older than 45 and hosts younger than 35. | SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 |
2,677 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Which nations have both hosts of age above 45 and hosts of age below 35? | SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 |
2,678 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the themes of parties and the names of the party hosts. | SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID |
2,679 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | For each party, return its theme and the name of its host. | SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID |
2,680 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the locations of parties and the names of the party hosts in ascending order of the age of the host. | SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age |
2,681 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host. | SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age |
2,682 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the locations of parties with hosts older than 50. | SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50 |
2,683 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Which parties have hosts of age above 50? Give me the party locations. | SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50 |
2,684 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the host names for parties with number of hosts greater than 20. | SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 |
2,685 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Which parties have more than 20 hosts? Give me the host names for these parties. | SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 |
2,686 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | Show the name and the nationality of the oldest host. | SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1 |
2,687 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | What are the name and the nationality of the host of the highest age? | SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1 |
2,688 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | List the names of hosts who did not serve as a host of any party in our record. | SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host) |
2,689 | party_host | CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY (
"Party_ID"
)
);
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY (
"Host_ID"
)
);
CREATE TABLE "party_h... | What are the names of hosts who did not host any party in our record? | SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host) |
2,690 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | How many regions do we have? | SELECT count(*) FROM region |
2,691 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | Count the number of regions. | SELECT count(*) FROM region |
2,692 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | Show all region code and region name sorted by the codes. | SELECT region_code , region_name FROM region ORDER BY region_code |
2,693 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | What are the codes and names for all regions, sorted by codes? | SELECT region_code , region_name FROM region ORDER BY region_code |
2,694 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | List all region names in alphabetical order. | SELECT region_name FROM region ORDER BY region_name |
2,695 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | What are the names of the regions in alphabetical order? | SELECT region_name FROM region ORDER BY region_name |
2,696 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | Show names for all regions except for Denmark. | SELECT region_name FROM region WHERE region_name != 'Denmark' |
2,697 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | Return the names of all regions other than Denmark. | SELECT region_name FROM region WHERE region_name != 'Denmark' |
2,698 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | How many storms had death records? | SELECT count(*) FROM storm WHERE Number_Deaths > 0 |
2,699 | storm_record | CREATE TABLE "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY (
"Storm_ID"
)
);
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY (
"Region_id"
)
);
CREATE TABLE `aff... | Count the number of storms in which at least 1 person died. | SELECT count(*) FROM storm WHERE Number_Deaths > 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.