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

Convert text to sql: What are the first names of all students who live in the dorm with the most amenities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ where _ in ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select student.fname from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid in ( select lives_in.dormid from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid group by dorm.dormid order by count ( * ) desc limit 1 )
### Instruction:

Convert text to sql: Find the name and capacity of the dorm with least number of amenities. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select dorm.dorm_name , dorm.student_capacity from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid group by has_amenity.dormid order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What is the name and capacity of the dorm with the fewest amount of amenities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select dorm.dorm_name , dorm.student_capacity from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid group by has_amenity.dormid order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Find the name of dorms that do not have amenity TV Lounge. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ except select _ from _ where _ | select dorm_name from dorm except select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge'
### Instruction:

Convert text to sql: What are the names of the dorm that does not have a TV Lounge? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ except select _ from _ where _ | select dorm_name from dorm except select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge'
### Instruction:

Convert text to sql: Find the first and last name of students who are living in the dorms that have amenity TV Lounge. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ where _ in ( select _ from _ where _ ) | select student.fname , student.lname from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )
### Instruction:

Convert text to sql: What are the first and last names of all students who are living in a dorm with a TV Lounge? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ where _ in ( select _ from _ where _ ) | select student.fname , student.lname from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )
### Instruction:

Convert text to sql: Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ where _ not in ( select _ from _ where _ ) | select student.fname , student.age from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid not in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )
### Instruction:

Convert text to sql: What is the first name and age of every student who lives in a dorm with a TV Lounge? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ where _ not in ( select _ from _ where _ ) | select student.fname , student.age from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid not in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )
### Instruction:

Convert text to sql: Find the name of amenities of the dorm where the student with last name Smith is living in. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ where _ | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid join lives_in on lives_in.dormid = dorm.dormid join student on student.stuid = lives_in.stuid where student.lname = 'Smith'
### Instruction:

Convert text to sql: What are the amenities in the dorm that a student who has the last name of Smith lives in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | 

### Response:

select _ from _ where _ | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid join lives_in on lives_in.dormid = dorm.dormid join student on student.stuid = lives_in.stuid where student.lname = 'Smith'
### Instruction:

Convert text to sql: How many customers are there? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from customers
### Instruction:

Convert text to sql: Count the number of customers. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from customers
### Instruction:

Convert text to sql: Find the emails and phone numbers of all the customers, ordered by email address and phone number. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ order by _ asc , _ | select email_address , phone_number from customers order by email_address asc , phone_number
### Instruction:

Convert text to sql: What are the emails and phone numbers of all customers, sorted by email address and phone number? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ order by _ asc , _ | select email_address , phone_number from customers order by email_address asc , phone_number
### Instruction:

Convert text to sql: Which city has the least number of customers whose type code is "Good Credit Rating"? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ where _ group by _ order by count ( _ ) asc limit _ | select town_city from customers where customer_type_code = 'Good Credit Rating' group by town_city order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Return the city with the customer type code "Good Credit Rating" that had the fewest customers. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ where _ group by _ order by count ( _ ) asc limit _ | select town_city from customers where customer_type_code = 'Good Credit Rating' group by town_city order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: List the name of all products along with the number of complaints that they have received. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from products join complaints on products.product_id = complaints.product_id group by products.product_name
### Instruction:

Convert text to sql: What are all the different product names, and how many complains has each received? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from products join complaints on products.product_id = complaints.product_id group by products.product_name
### Instruction:

Convert text to sql: Find the emails of customers who has filed a complaints of the product with the most complaints. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select customers.email_address from customers join complaints on customers.customer_id = complaints.customer_id group by customers.customer_id order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select customers.email_address from customers join complaints on customers.customer_id = complaints.customer_id group by customers.customer_id order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Which products has been complained by the customer who has filed least amount of complaints? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select distinct _ from _ group by _ order by count ( _ ) asc limit _ | select distinct products.product_name from products join complaints on products.product_id = complaints.product_id join customers group by customers.customer_id order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Return the names of products that have had complaints filed by the customer who has filed the fewest complaints. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select distinct _ from _ group by _ order by count ( _ ) asc limit _ | select distinct products.product_name from products join complaints on products.product_id = complaints.product_id join customers group by customers.customer_id order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What is the phone number of the customer who has filed the most recent complaint? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ order by _ desc limit _ | select customers.phone_number from customers join complaints on customers.customer_id = complaints.customer_id order by complaints.date_complaint_raised desc limit 1
### Instruction:

Convert text to sql: Return the phone number of the customer who filed the complaint that was raised most recently. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | 

### Response:

select _ from _ order by _ desc limit _ | select customers.phone_number from customers join complaints on customers.customer_id = complaints.customer_id order by complaints.date_complaint_raised desc limit 1