richardr1126/spider-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: Find the first and last names of people who payed more than the rooms' base prices. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select reservations.firstname , reservations.lastname from reservations join rooms on reservations.room = rooms.roomid where reservations.rate - rooms.baseprice > 0

### Instruction:

Convert text to sql: What are the first and last names of people who payed more than the rooms' base prices? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select reservations.firstname , reservations.lastname from reservations join rooms on reservations.room = rooms.roomid where reservations.rate - rooms.baseprice > 0

### Instruction:

Convert text to sql: How many rooms are there? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select count ( * ) from rooms

### Instruction:

Convert text to sql: What is the total number of rooms available in this inn? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select count ( * ) from rooms

### Instruction:

Convert text to sql: Find the number of rooms with a king bed. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select count ( * ) from rooms where bedtype = 'King'

### Instruction:

Convert text to sql: How many rooms have a king bed? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select count ( * ) from rooms where bedtype = 'King'

### Instruction:

Convert text to sql: Find the number of rooms for each bed type. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select bedtype , count ( * ) from rooms group by bedtype

### Instruction:

Convert text to sql: What are the number of rooms for each bed type? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select bedtype , count ( * ) from rooms group by bedtype
### Instruction:

Convert text to sql: Find the name of the room with the maximum occupancy. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms order by maxoccupancy desc limit 1

### Instruction:

Convert text to sql: What is the name of the room that can accommodate the most people? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms order by maxoccupancy desc limit 1

### Instruction:

Convert text to sql: Find the id and name of the most expensive base price room. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomid , roomname from rooms order by baseprice desc limit 1

### Instruction:

Convert text to sql: Which room has the highest base price? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomid , roomname from rooms order by baseprice desc limit 1

### Instruction:

Convert text to sql: List the type of bed and name of all traditional rooms. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname , bedtype from rooms where decor = 'traditional'

### Instruction:

Convert text to sql: What are the bed type and name of all the rooms with traditional decor? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname , bedtype from rooms where decor = 'traditional'

### Instruction:

Convert text to sql: Find the number of rooms with king bed for each decor type. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select decor , count ( * ) from rooms where bedtype = 'King' group by decor

### Instruction:

Convert text to sql: How many rooms have king beds? Report the number for each decor type. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select decor , count ( * ) from rooms where bedtype = 'King' group by decor
### Instruction:

Convert text to sql: Find the average and minimum price of the rooms in different decor. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select decor , avg ( baseprice ) , min ( baseprice ) from rooms group by decor

### Instruction:

Convert text to sql: What is the average minimum and price of the rooms for each different decor. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select decor , avg ( baseprice ) , min ( baseprice ) from rooms group by decor

### Instruction:

Convert text to sql: List the name of all rooms sorted by their prices. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms order by baseprice asc

### Instruction:

Convert text to sql: Sort all the rooms according to the price. Just report the room names. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms order by baseprice asc

### Instruction:

Convert text to sql: Find the number of rooms with price higher than 120 for different decor. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select decor , count ( * ) from rooms where baseprice > 120 group by decor

### Instruction:

Convert text to sql: How many rooms cost more than 120, for each different decor? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select decor , count ( * ) from rooms where baseprice > 120 group by decor

### Instruction:

Convert text to sql: For each bed type, find the average room price. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select bedtype , avg ( baseprice ) from rooms group by bedtype
### Instruction:

Convert text to sql: What is the average base price of rooms, for each bed type? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select bedtype , avg ( baseprice ) from rooms group by bedtype

### Instruction:

Convert text to sql: List the name of rooms with king or queen bed. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms where bedtype = 'King' or bedtype = 'Queen'

### Instruction:

Convert text to sql: What are the names of rooms that have either king or queen bed? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms where bedtype = 'King' or bedtype = 'Queen'

### Instruction:

Convert text to sql: How many different types of beds are there? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select count ( distinct bedtype ) from rooms

### Instruction:

Convert text to sql: Find the number of distinct bed types available in this inn. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select count ( distinct bedtype ) from rooms

### Instruction:

Convert text to sql: Find the name and id of the top 3 expensive rooms. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomid , roomname from rooms order by baseprice desc limit 3

### Instruction:

Convert text to sql: What are the name and id of the three highest priced rooms? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomid , roomname from rooms order by baseprice desc limit 3

### Instruction:

Convert text to sql: Find the name of rooms whose price is higher than the average price. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms where baseprice > ( select avg ( baseprice ) from rooms )
### Instruction:

Convert text to sql: Find the name of rooms whose base price is between 120 and 150. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms where baseprice between 120 and 150

### Instruction:

Convert text to sql: Which rooms cost between 120 and 150? Give me the room names. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select roomname from rooms where baseprice between 120 and 150

### Instruction:

Convert text to sql: Find the name of rooms booked by some customers whose first name contains ROY. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid where firstname like '%ROY%'

### Instruction:

Convert text to sql: What are the name of rooms booked by customers whose first name has "ROY" in part? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | 

### Response:

select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid where firstname like '%ROY%'
### Instruction:

Convert text to sql: what are the details of the cmi masters that have the cross reference code 'Tax'? | 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_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | 

### Response:

select customer_master_index.cmi_details from customer_master_index join cmi_cross_references on customer_master_index.master_customer_id = cmi_cross_references.master_customer_id where cmi_cross_references.source_system_code = 'Tax'

### Instruction:

Convert text to sql: 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. | 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_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | 

### Response:

select cmi_cross_references.cmi_cross_ref_id , cmi_cross_references.source_system_code from cmi_cross_references join council_tax on cmi_cross_references.cmi_cross_ref_id = council_tax.cmi_cross_ref_id group by cmi_cross_references.cmi_cross_ref_id having count ( * ) >= 1
### Instruction:

Convert text to sql: How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n | 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_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | 

### Response:

select cmi_cross_references.cmi_cross_ref_id , cmi_cross_references.master_customer_id , count ( * ) from business_rates join cmi_cross_references on business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id group by cmi_cross_references.cmi_cross_ref_id

### Instruction:

Convert text to sql: What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id. | 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_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | 

### Response:

select cmi_cross_references.source_system_code , benefits_overpayments.council_tax_id from cmi_cross_references join benefits_overpayments on cmi_cross_references.cmi_cross_ref_id = benefits_overpayments.cmi_cross_ref_id order by benefits_overpayments.council_tax_id asc
### Instruction:

Convert text to sql: Wat is the tax source system code and master customer id of the taxes related to each parking fine id? | 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_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | 

### Response:

select cmi_cross_references.source_system_code , cmi_cross_references.master_customer_id , parking_fines.council_tax_id from cmi_cross_references join parking_fines on cmi_cross_references.cmi_cross_ref_id = parking_fines.cmi_cross_ref_id

### Instruction:

Convert text to sql: What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'? | 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_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | 

### Response:

select rent_arrears.council_tax_id from rent_arrears join cmi_cross_references on rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id join customer_master_index on customer_master_index.master_customer_id = cmi_cross_references.master_customer_id where customer_master_index.cmi_details != 'Schmidt ,  Kertzmann and Lubowitz'