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

Convert text to sql: Of complaints with the type code "Product Failure", how many had each different status code? | 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 complaint_status_code , count ( * ) from complaints where complaint_type_code = 'Product Failure' group by complaint_status_code

### Instruction:

Convert text to sql: What is first names of the top 5 staff who have handled 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 staff.first_name from staff join complaints on staff.staff_id = complaints.staff_id group by complaints.staff_id order by count ( * ) asc limit 5

### Instruction:

Convert text to sql: Return the first names of the 5 staff members who have handled 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 staff.first_name from staff join complaints on staff.staff_id = complaints.staff_id group by complaints.staff_id order by count ( * ) asc limit 5
### Instruction:

Convert text to sql: Which state has the most 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 state from customers group by state order by count ( * ) asc limit 1

### Instruction:

Convert text to sql: Give the state that has the most 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 state from customers group by state order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: How many submissions are there? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select count ( * ) from submission

### Instruction:

Convert text to sql: Count the number of submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select count ( * ) from submission

### Instruction:

Convert text to sql: List the authors of submissions in ascending order of scores. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission order by scores asc

### Instruction:

Convert text to sql: Find the author for each submission and list them in ascending order of submission score. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission order by scores asc

### Instruction:

Convert text to sql: What are the authors of submissions and their colleges? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author , college from submission

### Instruction:

Convert text to sql: For each submission, show the author and their affiliated college. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author , college from submission

### Instruction:

Convert text to sql: Show the names of authors from college "Florida" or "Temple" | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission where college = 'Florida' or college = 'Temple'
### Instruction:

Convert text to sql: Which authors with submissions are from college "Florida" or "Temple"? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission where college = 'Florida' or college = 'Temple'

### Instruction:

Convert text to sql: What is the average score of submissions? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select avg ( scores ) from submission

### Instruction:

Convert text to sql: Compute the average score of submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select avg ( scores ) from submission

### Instruction:

Convert text to sql: What is the author of the submission with the highest score? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission order by scores desc limit 1

### Instruction:

Convert text to sql: Find the author who achieved the highest score in a submission. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission order by scores desc limit 1

### Instruction:

Convert text to sql: Show different colleges along with the number of authors of submission from each college. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select college , count ( * ) from submission group by college

### Instruction:

Convert text to sql: For each college, return the college name and the count of authors with submissions from that college. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select college , count ( * ) from submission group by college
### Instruction:

Convert text to sql: Show the most common college of authors of submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select college from submission group by college order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Which college has the most authors with submissions? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select college from submission group by college order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select college from submission where scores > 90 intersect select college from submission where scores < 80

### Instruction:

Convert text to sql: Which colleges have both authors with submission score above 90 and authors with submission score below 80? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select college from submission where scores > 90 intersect select college from submission where scores < 80

### Instruction:

Convert text to sql: Show the authors of submissions and the acceptance results of their submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select submission.author , acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id

### Instruction:

Convert text to sql: For each submission, find its author and acceptance result. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select submission.author , acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id
### Instruction:

Convert text to sql: Show the result of the submission with the highest score. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id order by submission.scores desc limit 1

### Instruction:

Convert text to sql: Which submission received the highest score in acceptance result. Show me the result. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id order by submission.scores desc limit 1

### Instruction:

Convert text to sql: Show each author and the number of workshops they submitted to. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select submission.author , count ( distinct acceptance.workshop_id ) from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author

### Instruction:

Convert text to sql: How many workshops did each author submit to? Return the author name and the number of workshops. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select submission.author , count ( distinct acceptance.workshop_id ) from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author

### Instruction:

Convert text to sql: Show the authors who have submissions to more than one workshop. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select submission.author from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author having count ( distinct acceptance.workshop_id ) > 1
### Instruction:

Convert text to sql: Which authors have submitted to more than one workshop? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select submission.author from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author having count ( distinct acceptance.workshop_id ) > 1

### Instruction:

Convert text to sql: Show the date and venue of each workshop in ascending alphabetical order of the venue. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select date , venue from workshop order by venue asc

### Instruction:

Convert text to sql: Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select date , venue from workshop order by venue asc

### Instruction:

Convert text to sql: List the authors who do not have submission to any workshop. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission where submission_id not in ( select submission_id from acceptance )

### Instruction:

Convert text to sql: Which authors did not submit to any workshop? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | 

### Response:

select author from submission where submission_id not in ( select submission_id from acceptance )
### Instruction:

Convert text to sql: Find the number of investors in total. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select count ( * ) from investors

### Instruction:

Convert text to sql: Show all investor details. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select investor_details from investors

### Instruction:

Convert text to sql: Show all distinct lot details. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select distinct lot_details from lots