db_id
stringlengths 4
31
| text
stringlengths 370
4.84k
|
---|---|
entertainment_awards | 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 name of artworks whose type is not "Program Talent Show". | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select name from artwork where type != 'Program Talent Show' |
entertainment_awards | 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 names and locations of festivals? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select festival_name , location from festival_detail |
entertainment_awards | 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 names of the chairs of festivals, sorted in ascending order of the year held? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select chair_name from festival_detail order by year asc |
entertainment_awards | 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 location of the festival with the largest number of audience? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select location from festival_detail order by num_of_audience desc limit 1 |
entertainment_awards | 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 names of festivals held in year 2007? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select festival_name from festival_detail where year = 2007 |
entertainment_awards | 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 number of audience for festivals? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select avg ( num_of_audience ) from festival_detail |
entertainment_awards | 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 the three most recent festivals. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select festival_name from festival_detail order by year desc limit 3 |
entertainment_awards | 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 nomination, show the name of the artwork and name of the festival where it is nominated. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select artwork.name , festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id |
entertainment_awards | 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 distinct types of artworks that are nominated in festivals in 2007. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select distinct artwork.type from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id where festival_detail.year = 2007 |
entertainment_awards | 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 artworks in ascending order of the year they are nominated in. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select artwork.name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id order by festival_detail.year asc |
entertainment_awards | 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 festivals that have nominated artworks of type "Program Talent Show". | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id where artwork.type = 'Program Talent Show' |
entertainment_awards | 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 names of festivals that have at least two nominations for artworks. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select nomination.festival_id , festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id group by nomination.festival_id having count ( * ) >= 2 |
entertainment_awards | 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, name of each festival and the number of artworks it has nominated. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select nomination.festival_id , festival_detail.festival_name , count ( * ) from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id group by nomination.festival_id |
entertainment_awards | 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: Please show different types of artworks with the corresponding number of artworks of each type. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select type , count ( * ) from artwork group by type |
entertainment_awards | 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 most common type of artworks. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select type from artwork group by type order by count ( * ) desc limit 1 |
entertainment_awards | 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 year in which there are more than one festivals. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select year from festival_detail group by year having count ( * ) > 1 |
entertainment_awards | 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 name of artworks that are not nominated. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select name from artwork where artwork_id not in ( select artwork_id from nomination ) |
entertainment_awards | 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 audience in year 2008 or 2010. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select num_of_audience from festival_detail where year = 2008 or year = 2010 |
entertainment_awards | 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 total number of the audiences who visited any of the festivals? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select sum ( num_of_audience ) from festival_detail |
entertainment_awards | 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: In which year are there festivals both inside the 'United States' and outside the 'United States'? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id |
### Response:
select year from festival_detail where location = 'United States' intersect select year from festival_detail where location != 'United States' |
customers_campaigns_ecommerce | 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 premises are there? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select count ( * ) from premises |
customers_campaigns_ecommerce | 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 all the distinct premise types? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select distinct premises_type from premises |
customers_campaigns_ecommerce | 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 types and details for all premises and order by the premise type. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select premises_type , premise_details from premises order by premises_type asc |
customers_campaigns_ecommerce | 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 premise type and the number of premises in that type. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select premises_type , count ( * ) from premises group by premises_type |
customers_campaigns_ecommerce | 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 product categories along with the number of mailshots in each category. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select product_category , count ( * ) from mailshot_campaigns group by product_category |
customers_campaigns_ecommerce | 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 name and phone of the customer without any mailshot. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customer_name , customer_phone from customers where customer_id not in ( select customer_id from mailshot_customers ) |
customers_campaigns_ecommerce | 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 name and phone for customers with a mailshot with outcome code 'No Response'. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name , customers.customer_phone from customers join mailshot_customers on customers.customer_id = mailshot_customers.customer_id where mailshot_customers.outcome_code = 'No Response' |
customers_campaigns_ecommerce | 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 outcome code of mailshots along with the number of mailshots in each outcome code. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select outcome_code , count ( * ) from mailshot_customers group by outcome_code |
customers_campaigns_ecommerce | 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 customers who have at least 2 mailshots with outcome code 'Order'. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where outcome_code = 'Order' group by mailshot_customers.customer_id having count ( * ) >= 2 |
customers_campaigns_ecommerce | 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 customers who have the most mailshots. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id group by mailshot_customers.customer_id order by count ( * ) desc limit 1 |
customers_campaigns_ecommerce | 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 name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name , customers.payment_method from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where mailshot_customers.outcome_code = 'Order' intersect select customers.customer_name , customers.payment_method from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where mailshot_customers.outcome_code = 'No Response' |
customers_campaigns_ecommerce | 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 premise type and address type code for all customer addresses. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select premises.premises_type , customer_addresses.address_type_code from customer_addresses join premises on customer_addresses.premise_id = premises.premise_id |
customers_campaigns_ecommerce | 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 address type codes for all customer addresses? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select distinct address_type_code from customer_addresses |
customers_campaigns_ecommerce | 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 shipping charge and customer id for customer orders with order status Cancelled or Paid. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select order_shipping_charges , customer_id from customer_orders where order_status_code = 'Cancelled' or order_status_code = 'Paid' |
customers_campaigns_ecommerce | 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 customers having an order with shipping method FedEx and order status Paid. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id where shipping_method_code = 'FedEx' and order_status_code = 'Paid' |
college_3 | 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 courses are there in total? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( * ) from course |
college_3 | 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 courses. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( * ) from course |
college_3 | 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 courses have more than 2 credits? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( * ) from course where credits > 2 |
college_3 | 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 courses with more than 2 credits. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( * ) from course where credits > 2 |
college_3 | 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 all names of courses with 1 credit? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select cname from course where credits = 1 |
college_3 | 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 names of courses with 1 credit? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select cname from course where credits = 1 |
college_3 | 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 courses are taught on days MTW? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select cname from course where days = 'MTW' |
college_3 | 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 course names for courses taught on MTW? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select cname from course where days = 'MTW' |
college_3 | 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 number of departments in Division "AS"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( * ) from department where division = 'AS' |
college_3 | 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 departments are in the division AS? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( * ) from department where division = 'AS' |
college_3 | 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 phones of departments in Room 268? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select dphone from department where room = 268 |
college_3 | 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 phones for departments in room 268. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select dphone from department where room = 268 |
college_3 | 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 students that have at least one grade "B". | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( distinct stuid ) from enrolled_in where grade = 'B' |
college_3 | 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 students have had at least one "B" grade? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select count ( distinct stuid ) from enrolled_in where grade = 'B' |
college_3 | 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 max and min grade point for all letter grade. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select max ( gradepoint ) , min ( gradepoint ) from gradeconversion |
college_3 | 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 maximum and minumum grade points? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select max ( gradepoint ) , min ( gradepoint ) from gradeconversion |
college_3 | 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 first names of students whose first names contain letter "a". | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select distinct fname from student where fname like '%a%' |
college_3 | 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 first names for students who have an "a" in their first name? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select distinct fname from student where fname like '%a%' |
college_3 | 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 first names and last names of male (sex is M) faculties who live in building NEB. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select fname , lname from faculty where sex = 'M' and building = 'NEB' |
college_3 | 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 full names of faculties with sex M and who live in building NEB? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select fname , lname from faculty where sex = 'M' and building = 'NEB' |
college_3 | 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 rooms of faculties with rank professor who live in building NEB. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select room from faculty where rank = 'Professor' and building = 'NEB' |
college_3 | 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 rooms for members of the faculty who are professors and who live in building NEB? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select room from faculty where rank = 'Professor' and building = 'NEB' |
college_3 | 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 department name that is in Building "Mergenthaler". | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select dname from department where building = 'Mergenthaler' |
college_3 | 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 of the department in the Building Mergenthaler? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select dname from department where building = 'Mergenthaler' |
college_3 | 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 all information about courses sorted by credits in the ascending order. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select * from course order by credits asc |
college_3 | 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 all the information about courses, ordered by credits ascending? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select * from course order by credits asc |
college_3 | 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 course name of courses sorted by credits. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select cname from course order by credits asc |
college_3 | 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 course names, ordered by credits? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select cname from course order by credits asc |
college_3 | 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 first name of students in the descending order of age. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select fname from student order by age desc |
college_3 | 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 first names of students, ordered by age from greatest to least? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select fname from student order by age desc |
college_3 | 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 last name of female (sex is F) students in the descending order of age. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select lname from student where sex = 'F' order by age desc |
college_3 | 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 last names of female students, ordered by age descending? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select lname from student where sex = 'F' order by age desc |
college_3 | 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 last names of faculties in building Barton in alphabetic order. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select lname from faculty where building = 'Barton' order by lname asc |
college_3 | 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 last names of faculty in building Barton, sorted by last name? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select lname from faculty where building = 'Barton' order by lname asc |
college_3 | 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 first names of faculties of rank Professor in alphabetic order. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select fname from faculty where rank = 'Professor' order by fname asc |
college_3 | 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 first names for all faculty professors, ordered by first name? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select fname from faculty where rank = 'Professor' order by fname asc |
college_3 | 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 name of the department that has the biggest number of students minored in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select department.dname from department join minor_in on department.dno = minor_in.dno group by minor_in.dno order by count ( * ) desc limit 1 |
college_3 | 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 of the department with the most students minoring in it? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select department.dname from department join minor_in on department.dno = minor_in.dno group by minor_in.dno order by count ( * ) desc limit 1 |
college_3 | 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 name of the department that has no students minored in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select dname from department except select department.dname from department join minor_in on department.dno = minor_in.dno |
college_3 | 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 of the department htat has no students minoring in it? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select dname from department except select department.dname from department join minor_in on department.dno = minor_in.dno |
college_3 | 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 name of the department that has the fewest members. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select department.dname from department join member_of on department.dno = member_of.dno group by member_of.dno order by count ( * ) asc limit 1 |
college_3 | 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 of the department with the fewest members? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select department.dname from department join member_of on department.dno = member_of.dno group by member_of.dno order by count ( * ) asc limit 1 |
college_3 | 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 rank of the faculty that the fewest faculties belong to. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select rank from faculty group by rank order by count ( * ) asc limit 1 |
college_3 | 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 least common faculty rank? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select rank from faculty group by rank order by count ( * ) asc limit 1 |
college_3 | 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 first and last names of the instructors who teach the top 3 number of courses? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 3 |
college_3 | 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 full names of the 3 instructors who teach the most courses? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 3 |
college_3 | 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 building does the instructor who teaches the most number of courses live in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.building from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 1 |
college_3 | 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 building that the instructor who teaches the greatest number of courses lives in. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.building from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 1 |
college_3 | 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 name of courses that have at least five enrollments? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select course.cname from course join enrolled_in on course.cid = enrolled_in.cid group by enrolled_in.cid having count ( * ) >= 5 |
college_3 | 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 names of the courses with at least five enrollments. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select course.cname from course join enrolled_in on course.cid = enrolled_in.cid group by enrolled_in.cid having count ( * ) >= 5 |
college_3 | 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 first name and last name of the instructor of course that has course name | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid where course.cname = 'COMPUTER LITERACY' |
college_3 | 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 full name of the instructor who has a course named COMPUTER LITERACY? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid where course.cname = 'COMPUTER LITERACY' |
college_3 | 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 department name and room of the course INTRODUCTION TO COMPUTER SCIENCE. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select department.dname , department.room from course join department on course.dno = department.dno where course.cname = 'INTRODUCTION TO COMPUTER SCIENCE' |
college_3 | 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 department name and room for the course INTRODUCTION TO COMPUTER SCIENCE? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select department.dname , department.room from course join department on course.dno = department.dno where course.cname = 'INTRODUCTION TO COMPUTER SCIENCE' |
college_3 | 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 student first and last names and grade points of all enrollments. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select student.fname , student.lname , gradeconversion.gradepoint from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid |
college_3 | 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 full names and gradepoints for all enrollments? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select student.fname , student.lname , gradeconversion.gradepoint from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid |
college_3 | 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 distinct student first names of all students that have grade point at least 3.8 in one course. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select distinct student.fname from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where gradeconversion.gradepoint >= 3.8 |
college_3 | 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 first names for students with a grade point of 3.8 or above in at least one course? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select distinct student.fname from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where gradeconversion.gradepoint >= 3.8 |
college_3 | 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 full names of faculties who are members of department with department number 520. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.fname , faculty.lname from faculty join member_of on faculty.facid = member_of.facid where member_of.dno = 520 |
college_3 | 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 full names of faculty members who are a part of department 520? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.fname , faculty.lname from faculty join member_of on faculty.facid = member_of.facid where member_of.dno = 520 |
college_3 | 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 first names and last names of the students that minor in the department with DNO 140. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select student.fname , student.lname from minor_in join student on minor_in.stuid = student.stuid where minor_in.dno = 140 |
college_3 | 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 full names of students minoring in department 140? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select student.fname , student.lname from minor_in join student on minor_in.stuid = student.stuid where minor_in.dno = 140 |
college_3 | 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 last names of faculties who are members of computer science department. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.lname from department join faculty on department.dno = member_of.dno join member_of on faculty.facid = member_of.facid where department.dname = 'Computer Science' |
college_3 | 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 last names of faculty who are part of the computer science department? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select faculty.lname from department join faculty on department.dno = member_of.dno join member_of on faculty.facid = member_of.facid where department.dname = 'Computer Science' |
college_3 | 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 average grade point of student whose last name is Smith. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid |
### Response:
select avg ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.lname = 'Smith' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.