db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
inn_1
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;
Question: what kind of decor has the least number of reservations? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what kind of decor has the least number of reservations?
inn_1
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;
Question: what is the least popular kind of decor? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what is the least popular kind of decor?
inn_1
select count(*) from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t2.maxoccupancy = t1.adults + t1.kids;
Question: 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. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Ki...
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.
inn_1
select count(*) from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t2.maxoccupancy = t1.adults + t1.kids;
Question: how many times the number of adults and kids staying in a room reached the maximum capacity of the room? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Room...
how many times the number of adults and kids staying in a room reached the maximum capacity of the room?
inn_1
select t1.firstname , t1.lastname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t1.rate - t2.baseprice > 0
Question: find the first and last names of people who payed more than the rooms' base prices. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the first and last names of people who payed more than the rooms' base prices.
inn_1
select t1.firstname , t1.lastname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t1.rate - t2.baseprice > 0
Question: what are the first and last names of people who payed more than the rooms' base prices? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the first and last names of people who payed more than the rooms' base prices?
inn_1
select count(*) from rooms;
Question: how many rooms are there? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
how many rooms are there?
inn_1
select count(*) from rooms;
Question: what is the total number of rooms available in this inn? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what is the total number of rooms available in this inn?
inn_1
select count(*) from rooms where bedtype = 'king';
Question: find the number of rooms with a king bed. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the number of rooms with a king bed.
inn_1
select count(*) from rooms where bedtype = 'king';
Question: how many rooms have a king bed? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
how many rooms have a king bed?
inn_1
select bedtype , count(*) from rooms group by bedtype;
Question: find the number of rooms for each bed type. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the number of rooms for each bed type.
inn_1
select bedtype , count(*) from rooms group by bedtype;
Question: what are the number of rooms for each bed type? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the number of rooms for each bed type?
inn_1
select roomname from rooms order by maxoccupancy desc limit 1;
Question: find the name of the room with the maximum occupancy. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the name of the room with the maximum occupancy.
inn_1
select roomname from rooms order by maxoccupancy desc limit 1;
Question: what is the name of the room that can accommodate the most people? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what is the name of the room that can accommodate the most people?
inn_1
select roomid , roomname from rooms order by baseprice desc limit 1;
Question: find the id and name of the most expensive base price room. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the id and name of the most expensive base price room.
inn_1
select roomid , roomname from rooms order by baseprice desc limit 1;
Question: which room has the highest base price? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
which room has the highest base price?
inn_1
select roomname , bedtype from rooms where decor = 'traditional';
Question: list the type of bed and name of all traditional rooms. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
list the type of bed and name of all traditional rooms.
inn_1
select roomname , bedtype from rooms where decor = 'traditional';
Question: what are the bed type and name of all the rooms with traditional decor? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the bed type and name of all the rooms with traditional decor?
inn_1
select decor , count(*) from rooms where bedtype = 'king' group by decor;
Question: find the number of rooms with king bed for each decor type. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the number of rooms with king bed for each decor type.
inn_1
select decor , count(*) from rooms where bedtype = 'king' group by decor;
Question: how many rooms have king beds? report the number for each decor type. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
how many rooms have king beds? report the number for each decor type.
inn_1
select decor , avg(baseprice) , min(baseprice) from rooms group by decor;
Question: find the average and minimum price of the rooms in different decor. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the average and minimum price of the rooms in different decor.
inn_1
select decor , avg(baseprice) , min(baseprice) from rooms group by decor;
Question: what is the average minimum and price of the rooms for each different decor. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what is the average minimum and price of the rooms for each different decor.
inn_1
select roomname from rooms order by baseprice;
Question: list the name of all rooms sorted by their prices. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
list the name of all rooms sorted by their prices.
inn_1
select roomname from rooms order by baseprice;
Question: sort all the rooms according to the price. just report the room names. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
sort all the rooms according to the price. just report the room names.
inn_1
select decor , count(*) from rooms where baseprice > 120 group by decor;
Question: find the number of rooms with price higher than 120 for different decor. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the number of rooms with price higher than 120 for different decor.
inn_1
select decor , count(*) from rooms where baseprice > 120 group by decor;
Question: how many rooms cost more than 120, for each different decor? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
how many rooms cost more than 120, for each different decor?
inn_1
select bedtype , avg(baseprice) from rooms group by bedtype;
Question: for each bed type, find the average room price. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
for each bed type, find the average room price.
inn_1
select bedtype , avg(baseprice) from rooms group by bedtype;
Question: what is the average base price of rooms, for each bed type? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what is the average base price of rooms, for each bed type?
inn_1
select roomname from rooms where bedtype = 'king' or bedtype = 'queen';
Question: list the name of rooms with king or queen bed. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
list the name of rooms with king or queen bed.
inn_1
select roomname from rooms where bedtype = 'king' or bedtype = 'queen';
Question: what are the names of rooms that have either king or queen bed? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the names of rooms that have either king or queen bed?
inn_1
select count(distinct bedtype) from rooms;
Question: how many different types of beds are there? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
how many different types of beds are there?
inn_1
select count(distinct bedtype) from rooms;
Question: find the number of distinct bed types available in this inn. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the number of distinct bed types available in this inn.
inn_1
select roomid , roomname from rooms order by baseprice desc limit 3;
Question: find the name and id of the top 3 expensive rooms. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the name and id of the top 3 expensive rooms.
inn_1
select roomid , roomname from rooms order by baseprice desc limit 3;
Question: what are the name and id of the three highest priced rooms? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the name and id of the three highest priced rooms?
inn_1
select roomname from rooms where baseprice > ( select avg(baseprice) from rooms );
Question: find the name of rooms whose price is higher than the average price. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the name of rooms whose price is higher than the average price.
inn_1
select roomname from rooms where baseprice > ( select avg(baseprice) from rooms );
Question: what are the name of rooms that cost more than the average. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the name of rooms that cost more than the average.
inn_1
select count(*) from rooms where roomid not in (select distinct room from reservations)
Question: find the number of rooms that do not have any reservation. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the number of rooms that do not have any reservation.
inn_1
select count(*) from rooms where roomid not in (select distinct room from reservations)
Question: how many rooms have not had any reservation yet? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
how many rooms have not had any reservation yet?
inn_1
select t2.roomname , count(*) , t1.room from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room
Question: return the name and number of reservations made for each of the rooms. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
return the name and number of reservations made for each of the rooms.
inn_1
select t2.roomname , count(*) , t1.room from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room
Question: for each room, find its name and the number of times reservations were made for it. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
for each room, find its name and the number of times reservations were made for it.
inn_1
select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room having count(*) > 60
Question: find the names of rooms that have been reserved for more than 60 times. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the names of rooms that have been reserved for more than 60 times.
inn_1
select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room having count(*) > 60
Question: what are the names of rooms whose reservation frequency exceeds 60 times? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the names of rooms whose reservation frequency exceeds 60 times?
inn_1
select roomname from rooms where baseprice between 120 and 150
Question: find the name of rooms whose base price is between 120 and 150. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the name of rooms whose base price is between 120 and 150.
inn_1
select roomname from rooms where baseprice between 120 and 150
Question: which rooms cost between 120 and 150? give me the room names. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
which rooms cost between 120 and 150? give me the room names.
inn_1
select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where firstname like '%roy%'
Question: find the name of rooms booked by some customers whose first name contains roy. | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
find the name of rooms booked by some customers whose first name contains roy.
inn_1
select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where firstname like '%roy%'
Question: what are the name of rooms booked by customers whose first name has 'roy' in part? | Tables: Rooms -> RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor. Reservations -> Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids. | Joins: Reservations.Room = Rooms.RoomId,
what are the name of rooms booked by customers whose first name has 'roy' in part?
local_govt_mdm
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'
Question: what are the details of the cmi masters that have the cross reference code 'tax'? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business_Rates -> business_ra...
what are the details of the cmi masters that have the cross reference code 'tax'?
local_govt_mdm
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
Question: 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. | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council...
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.
local_govt_mdm
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
Question: how many business rates are related to each cmi cross reference? list cross reference id, master customer id and the n | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_...
how many business rates are related to each cmi cross reference? list cross reference id, master customer id and the n
local_govt_mdm
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
Question: what is the tax source system code related to the benefits and overpayments? list the code and the benifit id, order by benifit id. | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_i...
what is the tax source system code related to the benefits and overpayments? list the code and the benifit id, order by benifit id.
local_govt_mdm
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
Question: wat is the tax source system code and master customer id of the taxes related to each parking fine id? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business...
wat is the tax source system code and master customer id of the taxes related to each parking fine id?
local_govt_mdm
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'
Question: what are the renting arrears tax ids related to the customer master index whose detail is not 'schmidt, kertzmann and lubowitz'? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, ...
what are the renting arrears tax ids related to the customer master index whose detail is not 'schmidt, kertzmann and lubowitz'?
local_govt_mdm
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'
Question: what are the register ids of electoral registries that have the cross reference source system code 'electoral' or 'tax'? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cros...
what are the register ids of electoral registries that have the cross reference source system code 'electoral' or 'tax'?
local_govt_mdm
select count(distinct source_system_code) from cmi_cross_references
Question: how many different source system code for the cmi cross references are there? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business_Rates -> business_rates_...
how many different source system code for the cmi cross references are there?
local_govt_mdm
select * from customer_master_index order by cmi_details desc
Question: list all information about customer master index, and sort them by details in descending order. | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business_Rates ...
list all information about customer master index, and sort them by details in descending order.
local_govt_mdm
select council_tax_id , cmi_cross_ref_id from parking_fines
Question: list the council tax ids and their related cmi cross references of all the parking fines. | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business_Rates -> bus...
list the council tax ids and their related cmi cross references of all the parking fines.
local_govt_mdm
select count(*) from rent_arrears
Question: how many council taxes are collected for renting arrears ? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business_Rates -> business_rates_id, cmi_cross_ref_i...
how many council taxes are collected for renting arrears ?
local_govt_mdm
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'
Question: what are the distinct cross reference source system codes which are related to the master customer details 'gottlieb, becker and wyman'? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_...
what are the distinct cross reference source system codes which are related to the master customer details 'gottlieb, becker and wyman'?
local_govt_mdm
select cmi_cross_ref_id from cmi_cross_references except select cmi_cross_ref_id from parking_fines
Question: which cmi cross reference id is not related to any parking taxes? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business_Rates -> business_rates_id, cmi_cros...
which cmi cross reference id is not related to any parking taxes?
local_govt_mdm
select distinct source_system_code from cmi_cross_references where source_system_code like '%en%'
Question: which distinct source system code includes the substring 'en'? | Tables: Customer_Master_Index -> master_customer_id, cmi_details. CMI_Cross_References -> cmi_cross_ref_id, master_customer_id, source_system_code. Council_Tax -> council_tax_id, cmi_cross_ref_id. Business_Rates -> business_rates_id, cmi_cross_r...
which distinct source system code includes the substring 'en'?
party_host
select count(*) from party
Question: how many parties are there? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Host_ID,
how many parties are there?
party_host
select count(*) from party
Question: count the number of parties. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Host_ID,
count the number of parties.
party_host
select party_theme from party order by number_of_hosts asc
Question: list the themes of parties in ascending order of number of hosts. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.H...
list the themes of parties in ascending order of number of hosts.
party_host
select party_theme from party order by number_of_hosts asc
Question: what are the themes of parties ordered by the number of hosts in ascending manner? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party...
what are the themes of parties ordered by the number of hosts in ascending manner?
party_host
select party_theme , location from party
Question: what are the themes and locations of parties? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Host_I...
what are the themes and locations of parties?
party_host
select party_theme , location from party
Question: give me the theme and location of each party. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Host_I...
give me the theme and location of each party.
party_host
select first_year , last_year from party where party_theme = 'spring' or party_theme = 'teqnology'
Question: show the first year and last year of parties with theme 'spring' or 'teqnology'. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_I...
show the first year and last year of parties with theme 'spring' or 'teqnology'.
party_host
select first_year , last_year from party where party_theme = 'spring' or party_theme = 'teqnology'
Question: what are the first year and last year of the parties whose theme is 'spring' or 'teqnology'? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = p...
what are the first year and last year of the parties whose theme is 'spring' or 'teqnology'?
party_host
select avg(number_of_hosts) from party
Question: what is the average number of hosts for parties? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Hos...
what is the average number of hosts for parties?
party_host
select avg(number_of_hosts) from party
Question: compute the average number of hosts for parties. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Hos...
compute the average number of hosts for parties.
party_host
select location from party order by number_of_hosts desc limit 1
Question: what is the location of the party with the most hosts? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = ho...
what is the location of the party with the most hosts?
party_host
select location from party order by number_of_hosts desc limit 1
Question: which party had the most hosts? give me the party location. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID...
which party had the most hosts? give me the party location.
party_host
select nationality , count(*) from host group by nationality
Question: show different nationalities along with the number of hosts of each nationality. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_I...
show different nationalities along with the number of hosts of each nationality.
party_host
select nationality , count(*) from host group by nationality
Question: how many hosts does each nationality have? list the nationality and the count. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID,...
how many hosts does each nationality have? list the nationality and the count.
party_host
select nationality from host group by nationality order by count(*) desc limit 1
Question: show the most common nationality of hosts. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Host_ID,
show the most common nationality of hosts.
party_host
select nationality from host group by nationality order by count(*) desc limit 1
Question: which nationality has the most hosts? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = host.Host_ID,
which nationality has the most hosts?
party_host
select nationality from host where age > 45 intersect select nationality from host where age < 35
Question: show the nations that have both hosts older than 45 and hosts younger than 35. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID,...
show the nations that have both hosts older than 45 and hosts younger than 35.
party_host
select nationality from host where age > 45 intersect select nationality from host where age < 35
Question: which nations have both hosts of age above 45 and hosts of age below 35? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party...
which nations have both hosts of age above 45 and hosts of age below 35?
party_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
Question: show the themes of parties and the names of the party hosts. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_I...
show the themes of parties and the names of the party hosts.
party_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
Question: for each party, return its theme and the name of its host. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID ...
for each party, return its theme and the name of its host.
party_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
Question: show the locations of parties and the names of the party hosts in ascending order of the age of the host. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host...
show the locations of parties and the names of the party hosts in ascending order of the age of the host.
party_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
Question: for each party, find its location and the name of its host. sort the result in ascending order of the age of the host. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Join...
for each party, find its location and the name of its host. sort the result in ascending order of the age of the host.
party_host
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
Question: show the locations of parties with hosts older than 50. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = h...
show the locations of parties with hosts older than 50.
party_host
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
Question: which parties have hosts of age above 50? give me the party locations. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_h...
which parties have hosts of age above 50? give me the party locations.
party_host
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
Question: show the host names for parties with number of hosts greater than 20. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_ho...
show the host names for parties with number of hosts greater than 20.
party_host
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
Question: which parties have more than 20 hosts? give me the host names for these parties. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_I...
which parties have more than 20 hosts? give me the host names for these parties.
party_host
select name , nationality from host order by age desc limit 1
Question: show the name and the nationality of the oldest host. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_host.Host_ID = hos...
show the name and the nationality of the oldest host.
party_host
select name , nationality from host order by age desc limit 1
Question: what are the name and the nationality of the host of the highest age? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_ho...
what are the name and the nationality of the host of the highest age?
party_host
select name from host where host_id not in (select host_id from party_host)
Question: list the names of hosts who did not serve as a host of any party in our record. | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID...
list the names of hosts who did not serve as a host of any party in our record.
party_host
select name from host where host_id not in (select host_id from party_host)
Question: what are the names of hosts who did not host any party in our record? | Tables: party -> Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts. host -> Host_ID, Name, Nationality, Age. party_host -> Party_ID, Host_ID, Is_Main_in_Charge. | Joins: party_host.Party_ID = party.Party_ID, party_ho...
what are the names of hosts who did not host any party in our record?
storm_record
select count(*) from region
Question: how many regions do we have? | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm_ID, affected_region.Region_i...
how many regions do we have?
storm_record
select count(*) from region
Question: count the number of regions. | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm_ID, affected_region.Region_i...
count the number of regions.
storm_record
select region_code , region_name from region order by region_code
Question: show all region code and region name sorted by the codes. | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm...
show all region code and region name sorted by the codes.
storm_record
select region_code , region_name from region order by region_code
Question: what are the codes and names for all regions, sorted by codes? | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm....
what are the codes and names for all regions, sorted by codes?
storm_record
select region_name from region order by region_name
Question: list all region names in alphabetical order. | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm_ID, affected...
list all region names in alphabetical order.
storm_record
select region_name from region order by region_name
Question: what are the names of the regions in alphabetical order? | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm_...
what are the names of the regions in alphabetical order?
storm_record
select region_name from region where region_name != 'denmark'
Question: show names for all regions except for denmark. | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm_ID, affect...
show names for all regions except for denmark.
storm_record
select region_name from region where region_name != 'denmark'
Question: return the names of all regions other than denmark. | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm_ID, a...
return the names of all regions other than denmark.
storm_record
select count(*) from storm where number_deaths > 0
Question: how many storms had death records? | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Storm_ID, affected_region.Re...
how many storms had death records?
storm_record
select count(*) from storm where number_deaths > 0
Question: count the number of storms in which at least 1 person died. | Tables: storm -> Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths. region -> Region_id, Region_code, Region_name. affected_region -> Region_id, Storm_ID, Number_city_affected. | Joins: affected_region.Storm_ID = storm.Sto...
count the number of storms in which at least 1 person died.