db_id
stringlengths
4
31
text
stringlengths
370
4.84k
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many customers are there in the customer type with 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 count ( * ) from customers group by customer_type_code order by count ( * ) desc limit 1
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of customers that have the customer type that is most common. | 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 customers group by customer_type_code order by count ( * ) desc limit 1
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the last name of the staff who has handled the first ever 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 staff.last_name from staff join complaints on staff.staff_id = complaints.staff_id order by complaints.date_complaint_raised asc limit 1
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the last name of the staff member who handled the complaint with the earliest date raised. | 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.last_name from staff join complaints on staff.staff_id = complaints.staff_id order by complaints.date_complaint_raised asc limit 1
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct complaint type codes are there in the database? | 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 ( distinct complaint_type_code ) from complaints
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of different complaint type codes. | 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 ( distinct complaint_type_code ) from complaints
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the address line 1 and 2 of the customer with email "[email protected]". | 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 address_line_1 , address_line_2 from customers where email_address = '[email protected]'
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are lines 1 and 2 of the addressed of the customer with the email "[email protected]"? | 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 address_line_1 , address_line_2 from customers where email_address = '[email protected]'
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of complaints with Product Failure type for each complaint status. | 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
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
customer_complaints
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 )
workshop_paper
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 )
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the maximum amount of transaction. | 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 max ( amount_of_transaction ) from transactions
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all date and share count of transactions. | 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 date_of_transaction , share_count from transactions
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total share of transactions? | 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 sum ( share_count ) from transactions
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all transaction ids with transaction code 'PUR'. | 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 transaction_id from transactions where transaction_type_code = 'PUR'
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all dates of transactions whose type code is "SALE". | 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 date_of_transaction from transactions where transaction_type_code = 'SALE'
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average amount of transactions with type code "SALE". | 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 avg ( amount_of_transaction ) from transactions where transaction_type_code = 'SALE'
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the description of transaction type with code "PUR". | 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 transaction_type_description from ref_transaction_types where transaction_type_code = 'PUR'
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50. | 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 min ( amount_of_transaction ) from transactions where transaction_type_code = 'PUR' and share_count > 50
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the maximum share count of transactions where the amount is smaller than 10000 | 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 max ( share_count ) from transactions where amount_of_transaction < 10000
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. | 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 date_of_transaction from transactions where share_count > 100 or amount_of_transaction > 1000
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the transaction type descriptions and dates if the share count is smaller than 10. | 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 ref_transaction_types.transaction_type_description , transactions.date_of_transaction from ref_transaction_types join transactions on ref_transaction_types.transaction_type_code = transactions.transaction_type_code where transactions.share_count < 10
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show details of all investors if they make any transaction with share count greater than 100. | 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 investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id where transactions.share_count > 100
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct transaction types are used in the transactions? | 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 ( distinct transaction_type_code ) from transactions
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the lot details and investor ids. | 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 lot_details , investor_id from lots
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the lot details of lots that belong to investors with details "l"? | 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 lots.lot_details from investors join lots on investors.investor_id = lots.investor_id where investors.investor_details = 'l'
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the purchase details of transactions with amount bigger than 10000? | 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 purchases.purchase_details from purchases join transactions on purchases.purchase_transaction_id = transactions.transaction_id where transactions.amount_of_transaction > 10000
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the sale details and dates of transactions with amount smaller than 3000? | 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 sales.sales_details , transactions.date_of_transaction from sales join transactions on sales.sales_transaction_id = transactions.transaction_id where transactions.amount_of_transaction < 3000
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the lot details of lots associated with transactions with share count smaller than 50? | 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 lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.transaction_id join transactions on transactions_lots.transaction_id = transactions.transaction_id where transactions.share_count < 50
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"? | 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 lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.transaction_id join transactions on transactions_lots.transaction_id = transactions.transaction_id where transactions.share_count > 100 and transactions.transaction_type_code = 'PUR'
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average transaction amount for different transaction types. | 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 transaction_type_code , avg ( amount_of_transaction ) from transactions group by transaction_type_code
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the maximum and minimum share count of different transaction types. | 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 transaction_type_code , max ( share_count ) , min ( share_count ) from transactions group by transaction_type_code
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average share count of transactions for different investors. | 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_id , avg ( share_count ) from transactions group by investor_id
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average share count of transactions each each investor, ordered by average share count. | 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_id , avg ( share_count ) from transactions group by investor_id order by avg ( share_count ) asc
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average amount of transactions for different investors. | 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_id , avg ( amount_of_transaction ) from transactions group by investor_id
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average amount of transactions for different lots. | 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 transactions_lots.lot_id , avg ( amount_of_transaction ) from transactions join transactions_lots on transactions.transaction_id = transactions_lots.transaction_id group by transactions_lots.lot_id
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average amount of transactions for different lots, ordered by average amount of transactions. | 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 transactions_lots.lot_id , avg ( amount_of_transaction ) from transactions join transactions_lots on transactions.transaction_id = transactions_lots.transaction_id group by transactions_lots.lot_id order by avg ( amount_of_transaction ) asc
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0. | 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_id , count ( * ) from transactions where transaction_type_code = 'SALE' group by investor_id
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the number of transactions for different investors. | 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_id , count ( * ) from transactions group by investor_id
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the transaction type code that occurs the fewest times. | 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 transaction_type_code from transactions group by transaction_type_code order by count ( * ) asc limit 1
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the transaction type code that occurs the most frequently. | 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 transaction_type_code from transactions group by transaction_type_code order by count ( * ) desc limit 1
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the description of the transaction type that occurs most frequently. | 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 ref_transaction_types.transaction_type_description from ref_transaction_types join transactions on ref_transaction_types.transaction_type_code = transactions.transaction_type_code group by ref_transaction_types.transaction_type_code order by count ( * ) desc limit 1
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the id and details of the investor that has the largest number of transactions. | 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 transactions.investor_id , investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id group by transactions.investor_id order by count ( * ) desc limit 1
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the id and details for the investors who have the top 3 number of transactions. | 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 transactions.investor_id , investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id group by transactions.investor_id order by count ( * ) desc limit 3
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the ids of the investors who have at least two transactions. | 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 transactions.investor_id from investors join transactions on investors.investor_id = transactions.investor_id group by transactions.investor_id having count ( * ) >= 2
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the ids and details of the investors who have at least two transactions with type code "SALE". | 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 transactions.investor_id , investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id where transactions.transaction_type_code = 'SALE' group by transactions.investor_id having count ( * ) >= 2
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the dates of transactions with at least 100 share count or amount bigger than 100? | 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 date_of_transaction from transactions where share_count >= 100 or amount_of_transaction >= 100
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details of all sales and purchases? | 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 sales_details from sales union select purchase_details from purchases
tracking_share_transactions
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details of the lots which are not used in any transactions? | 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 lot_details from lots except select lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.lot_id
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many available hotels are there in total? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select count ( * ) from hotels
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the total number of available hotels. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select count ( * ) from hotels
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the price ranges of hotels? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select price_range from hotels
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Tell me the price ranges for all the hotels. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select price_range from hotels
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all distinct location names. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select distinct location_name from locations
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct location names? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select distinct location_name from locations
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names and details of all the staff members. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select name , other_details from staff
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name and detail of each staff member? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select name , other_details from staff
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show details of all visitors. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select tourist_details from visitors
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the detail of each visitor? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select tourist_details from visitors
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the price ranges of hotels with 5 star ratings. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select price_range from hotels where star_rating_code = '5'
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the price ranges of five star hotels? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select price_range from hotels where star_rating_code = '5'
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average price range of hotels that have 5 star ratings and allow pets. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select avg ( price_range ) from hotels where star_rating_code = '5' and pets_allowed_yn = 1
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average price range of five star hotels that allow pets? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select avg ( price_range ) from hotels where star_rating_code = '5' and pets_allowed_yn = 1
cre_Theme_park
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the address of the location "UK Gallery"? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | ### Response: select address from locations where location_name = 'UK Gallery'