db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
entertainment_awards
select name from artwork where type != 'program talent show'
Question: list the name of artworks whose type is not 'program talent show'. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_...
list the name of artworks whose type is not 'program talent show'.
entertainment_awards
select festival_name , location from festival_detail
Question: what are the names and locations of festivals? | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nomination.Artwo...
what are the names and locations of festivals?
entertainment_awards
select chair_name from festival_detail order by year asc
Question: what are the names of the chairs of festivals, sorted in ascending order of the year held? | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = f...
what are the names of the chairs of festivals, sorted in ascending order of the year held?
entertainment_awards
select location from festival_detail order by num_of_audience desc limit 1
Question: what is the location of the festival with the largest number of audience? | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Fe...
what is the location of the festival with the largest number of audience?
entertainment_awards
select festival_name from festival_detail where year = 2007
Question: what are the names of festivals held in year 2007? | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nomination.A...
what are the names of festivals held in year 2007?
entertainment_awards
select avg(num_of_audience) from festival_detail
Question: what is the average number of audience for festivals? | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nominatio...
what is the average number of audience for festivals?
entertainment_awards
select festival_name from festival_detail order by year desc limit 3
Question: show the names of the three most recent festivals. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nomination.A...
show the names of the three most recent festivals.
entertainment_awards
select t2.name , t3.festival_name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id
Question: for each nomination, show the name of the artwork and name of the festival where it is nominated. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival...
for each nomination, show the name of the artwork and name of the festival where it is nominated.
entertainment_awards
select distinct t2.type from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id where t3.year = 2007
Question: show distinct types of artworks that are nominated in festivals in 2007. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Fes...
show distinct types of artworks that are nominated in festivals in 2007.
entertainment_awards
select t2.name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id order by t3.year
Question: show the names of artworks in ascending order of the year they are nominated in. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_de...
show the names of artworks in ascending order of the year they are nominated in.
entertainment_awards
select t3.festival_name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id where t2.type = 'program talent show'
Question: show the names of festivals that have nominated artworks of type 'program talent show'. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = fest...
show the names of festivals that have nominated artworks of type 'program talent show'.
entertainment_awards
select t1.festival_id , t3.festival_name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id group by t1.festival_id having count(*) >= 2
Question: show the ids and names of festivals that have at least two nominations for artworks. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festiva...
show the ids and names of festivals that have at least two nominations for artworks.
entertainment_awards
select t1.festival_id , t3.festival_name , count(*) from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id group by t1.festival_id
Question: show the id, name of each festival and the number of artworks it has nominated. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_det...
show the id, name of each festival and the number of artworks it has nominated.
entertainment_awards
select type , count(*) from artwork group by type
Question: please show different types of artworks with the corresponding number of artworks of each type. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_I...
please show different types of artworks with the corresponding number of artworks of each type.
entertainment_awards
select type from artwork group by type order by count(*) desc limit 1
Question: list the most common type of artworks. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nomination.Artwork_ID = ...
list the most common type of artworks.
entertainment_awards
select year from festival_detail group by year having count(*) > 1
Question: list the year in which there are more than one festivals. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nomin...
list the year in which there are more than one festivals.
entertainment_awards
select name from artwork where artwork_id not in (select artwork_id from nomination)
Question: list the name of artworks that are not nominated. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nomination.Ar...
list the name of artworks that are not nominated.
entertainment_awards
select num_of_audience from festival_detail where year = 2008 or year = 2010
Question: show the number of audience in year 2008 or 2010. | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail.Festival_ID, nomination.Ar...
show the number of audience in year 2008 or 2010.
entertainment_awards
select sum(num_of_audience) from festival_detail
Question: what are the total number of the audiences who visited any of the festivals? | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festival_ID = festival_detail...
what are the total number of the audiences who visited any of the festivals?
entertainment_awards
select year from festival_detail where location = 'united states' intersect select year from festival_detail where location != 'united states'
Question: in which year are there festivals both inside the 'united states' and outside the 'united states'? | Tables: festival_detail -> Festival_ID, Festival_Name, Chair_Name, Location, Year, Num_of_Audience. artwork -> Artwork_ID, Type, Name. nomination -> Artwork_ID, Festival_ID, Result. | Joins: nomination.Festiva...
in which year are there festivals both inside the 'united states' and outside the 'united states'?
customers_campaigns_ecommerce
select count(*) from premises
Question: how many premises are there? | Tables: 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_Campaign...
how many premises are there?
customers_campaigns_ecommerce
select distinct premises_type from premises
Question: what are all the distinct premise types? | Tables: 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. Mails...
what are all the distinct premise types?
customers_campaigns_ecommerce
select premises_type , premise_details from premises order by premises_type
Question: find the types and details for all premises and order by the premise type. | Tables: 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, custom...
find the types and details for all premises and order by the premise type.
customers_campaigns_ecommerce
select premises_type , count(*) from premises group by premises_type
Question: show each premise type and the number of premises in that type. | Tables: 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, c...
show each premise type and the number of premises in that type.
customers_campaigns_ecommerce
select product_category , count(*) from mailshot_campaigns group by product_category
Question: show all distinct product categories along with the number of mailshots in each category. | Tables: 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_...
show all distinct product categories along with the number of mailshots in each category.
customers_campaigns_ecommerce
select customer_name , customer_phone from customers where customer_id not in (select customer_id from mailshot_customers)
Question: show the name and phone of the customer without any mailshot. | Tables: 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, cus...
show the name and phone of the customer without any mailshot.
customers_campaigns_ecommerce
select t1.customer_name , t1.customer_phone from customers as t1 join mailshot_customers as t2 on t1.customer_id = t2.customer_id where t2.outcome_code = 'no response'
Question: show the name and phone for customers with a mailshot with outcome code 'no response'. | Tables: 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_add...
show the name and phone for customers with a mailshot with outcome code 'no response'.
customers_campaigns_ecommerce
select outcome_code , count(*) from mailshot_customers group by outcome_code
Question: show the outcome code of mailshots along with the number of mailshots in each outcome code. | Tables: 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, custome...
show the outcome code of mailshots along with the number of mailshots in each outcome code.
customers_campaigns_ecommerce
select t2.customer_name from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id where outcome_code = 'order' group by t1.customer_id having count(*) >= 2
Question: show the names of customers who have at least 2 mailshots with outcome code 'order'. | Tables: 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_addre...
show the names of customers who have at least 2 mailshots with outcome code 'order'.
customers_campaigns_ecommerce
select t2.customer_name from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1
Question: show the names of customers who have the most mailshots. | Tables: 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...
show the names of customers who have the most mailshots.
customers_campaigns_ecommerce
select t2.customer_name , t2.payment_method from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.outcome_code = 'order' intersect select t2.customer_name , t2.payment_method from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.o...
Question: what are the name and payment method of customers who have both mailshots in 'order' outcome and mailshots in 'no response' outcome. | Tables: Premises -> premise_id, premises_type, premise_details. Products -> product_id, product_category, product_name. Customers -> customer_id, payment_method, customer_name...
what are the name and payment method of customers who have both mailshots in 'order' outcome and mailshots in 'no response' outcome.
customers_campaigns_ecommerce
select t2.premises_type , t1.address_type_code from customer_addresses as t1 join premises as t2 on t1.premise_id = t2.premise_id
Question: show the premise type and address type code for all customer addresses. | Tables: 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_...
show the premise type and address type code for all customer addresses.
customers_campaigns_ecommerce
select distinct address_type_code from customer_addresses
Question: what are the distinct address type codes for all customer addresses? | Tables: 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_log...
what are the distinct address type codes for all customer addresses?
customers_campaigns_ecommerce
select order_shipping_charges , customer_id from customer_orders where order_status_code = 'cancelled' or order_status_code = 'paid'
Question: show the shipping charge and customer id for customer orders with order status cancelled or paid. | Tables: 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, c...
show the shipping charge and customer id for customer orders with order status cancelled or paid.
customers_campaigns_ecommerce
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where shipping_method_code = 'fedex' and order_status_code = 'paid'
Question: show the names of customers having an order with shipping method fedex and order status paid. | Tables: 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, custo...
show the names of customers having an order with shipping method fedex and order status paid.
college_3
select count(*) from course
Question: how many courses are there in total? | Tables: 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, I...
how many courses are there in total?
college_3
select count(*) from course
Question: count the number of courses. | Tables: 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, Instructo...
count the number of courses.
college_3
select count(*) from course where credits > 2
Question: how many courses have more than 2 credits? | Tables: 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, Cred...
how many courses have more than 2 credits?
college_3
select count(*) from course where credits > 2
Question: count the number of courses with more than 2 credits. | Tables: 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, ...
count the number of courses with more than 2 credits.
college_3
select cname from course where credits = 1
Question: list all names of courses with 1 credit? | Tables: 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, Credit...
list all names of courses with 1 credit?
college_3
select cname from course where credits = 1
Question: what are the names of courses with 1 credit? | Tables: 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, Cr...
what are the names of courses with 1 credit?
college_3
select cname from course where days = 'mtw'
Question: which courses are taught on days mtw? | Tables: 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, ...
which courses are taught on days mtw?
college_3
select cname from course where days = 'mtw'
Question: what are the course names for courses taught on mtw? | Tables: 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, C...
what are the course names for courses taught on mtw?
college_3
select count(*) from department where division = 'as'
Question: what is the number of departments in division 'as'? | Tables: 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, CN...
what is the number of departments in division 'as'?
college_3
select count(*) from department where division = 'as'
Question: how many departments are in the division as? | Tables: 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, Cr...
how many departments are in the division as?
college_3
select dphone from department where room = 268
Question: what are the phones of departments in room 268? | Tables: 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,...
what are the phones of departments in room 268?
college_3
select dphone from department where room = 268
Question: give the phones for departments in room 268. | Tables: 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, Cr...
give the phones for departments in room 268.
college_3
select count(distinct stuid) from enrolled_in where grade = 'b'
Question: find the number of students that have at least one grade 'b'. | Tables: 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 ...
find the number of students that have at least one grade 'b'.
college_3
select count(distinct stuid) from enrolled_in where grade = 'b'
Question: how many students have had at least one 'b' grade? | Tables: 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, CNa...
how many students have had at least one 'b' grade?
college_3
select max(gradepoint) , min(gradepoint) from gradeconversion
Question: find the max and min grade point for all letter grade. | Tables: 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,...
find the max and min grade point for all letter grade.
college_3
select max(gradepoint) , min(gradepoint) from gradeconversion
Question: what are the maximum and minumum grade points? | Tables: 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, ...
what are the maximum and minumum grade points?
college_3
select distinct fname from student where fname like '%a%'
Question: find the first names of students whose first names contain letter 'a'. | Tables: 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...
find the first names of students whose first names contain letter 'a'.
college_3
select distinct fname from student where fname like '%a%'
Question: what are the first names for students who have an 'a' in their first name? | Tables: 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_...
what are the first names for students who have an 'a' in their first name?
college_3
select fname , lname from faculty where sex = 'm' and building = 'neb'
Question: find the first names and last names of male (sex is m) faculties who live in building neb. | Tables: 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 -> F...
find the first names and last names of male (sex is m) faculties who live in building neb.
college_3
select fname , lname from faculty where sex = 'm' and building = 'neb'
Question: what are the full names of faculties with sex m and who live in building neb? | Tables: 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, Ap...
what are the full names of faculties with sex m and who live in building neb?
college_3
select room from faculty where rank = 'professor' and building = 'neb'
Question: find the rooms of faculties with rank professor who live in building neb. | Tables: 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_T...
find the rooms of faculties with rank professor who live in building neb.
college_3
select room from faculty where rank = 'professor' and building = 'neb'
Question: what are the rooms for members of the faculty who are professors and who live in building neb? | Tables: 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 ...
what are the rooms for members of the faculty who are professors and who live in building neb?
college_3
select dname from department where building = 'mergenthaler'
Question: find the department name that is in building 'mergenthaler'. | Tables: 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 -...
find the department name that is in building 'mergenthaler'.
college_3
select dname from department where building = 'mergenthaler'
Question: what is the name of the department in the building mergenthaler? | Tables: 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. Cour...
what is the name of the department in the building mergenthaler?
college_3
select * from course order by credits
Question: list all information about courses sorted by credits in the ascending order. | Tables: 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, App...
list all information about courses sorted by credits in the ascending order.
college_3
select * from course order by credits
Question: what is all the information about courses, ordered by credits ascending? | Tables: 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_Ty...
what is all the information about courses, ordered by credits ascending?
college_3
select cname from course order by credits
Question: list the course name of courses sorted by credits. | Tables: 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, CNa...
list the course name of courses sorted by credits.
college_3
select cname from course order by credits
Question: what are the course names, ordered by credits? | Tables: 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, ...
what are the course names, ordered by credits?
college_3
select fname from student order by age desc
Question: find the first name of students in the descending order of age. | Tables: 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. Cours...
find the first name of students in the descending order of age.
college_3
select fname from student order by age desc
Question: what are the first names of students, ordered by age from greatest to least? | Tables: 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, App...
what are the first names of students, ordered by age from greatest to least?
college_3
select lname from student where sex = 'f' order by age desc
Question: find the last name of female (sex is f) students in the descending order of age. | Tables: 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,...
find the last name of female (sex is f) students in the descending order of age.
college_3
select lname from student where sex = 'f' order by age desc
Question: what are the last names of female students, ordered by age descending? | Tables: 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...
what are the last names of female students, ordered by age descending?
college_3
select lname from faculty where building = 'barton' order by lname
Question: find the last names of faculties in building barton in alphabetic order. | Tables: 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_Ty...
find the last names of faculties in building barton in alphabetic order.
college_3
select lname from faculty where building = 'barton' order by lname
Question: what are the last names of faculty in building barton, sorted by last name? | Tables: 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...
what are the last names of faculty in building barton, sorted by last name?
college_3
select fname from faculty where rank = 'professor' order by fname
Question: find the first names of faculties of rank professor in alphabetic order. | Tables: 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_Ty...
find the first names of faculties of rank professor in alphabetic order.
college_3
select fname from faculty where rank = 'professor' order by fname
Question: what are the first names for all faculty professors, ordered by first name? | Tables: 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...
what are the first names for all faculty professors, ordered by first name?
college_3
select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno group by t2.dno order by count(*) desc limit 1
Question: find the name of the department that has the biggest number of students minored in? | Tables: 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, D...
find the name of the department that has the biggest number of students minored in?
college_3
select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno group by t2.dno order by count(*) desc limit 1
Question: what is the name of the department with the most students minoring in it? | Tables: 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_T...
what is the name of the department with the most students minoring in it?
college_3
select dname from department except select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno
Question: find the name of the department that has no students minored in? | Tables: 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. Cour...
find the name of the department that has no students minored in?
college_3
select dname from department except select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno
Question: what is the name of the department htat has no students minoring in it? | Tables: 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_Typ...
what is the name of the department htat has no students minoring in it?
college_3
select t1.dname from department as t1 join member_of as t2 on t1.dno = t2.dno group by t2.dno order by count(*) asc limit 1
Question: find the name of the department that has the fewest members. | Tables: 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 -...
find the name of the department that has the fewest members.
college_3
select t1.dname from department as t1 join member_of as t2 on t1.dno = t2.dno group by t2.dno order by count(*) asc limit 1
Question: what is the name of the department with the fewest members? | Tables: 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 ->...
what is the name of the department with the fewest members?
college_3
select rank from faculty group by rank order by count(*) asc limit 1
Question: find the rank of the faculty that the fewest faculties belong to. | Tables: 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. Cou...
find the rank of the faculty that the fewest faculties belong to.
college_3
select rank from faculty group by rank order by count(*) asc limit 1
Question: what is the least common faculty rank? | Tables: 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,...
what is the least common faculty rank?
college_3
select t2.fname , t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 3
Question: what are the first and last names of the instructors who teach the top 3 number of courses? | Tables: 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 -> ...
what are the first and last names of the instructors who teach the top 3 number of courses?
college_3
select t2.fname , t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 3
Question: what are the full names of the 3 instructors who teach the most courses? | Tables: 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_Ty...
what are the full names of the 3 instructors who teach the most courses?
college_3
select t2.building from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 1
Question: which building does the instructor who teaches the most number of courses live in? | Tables: 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, DN...
which building does the instructor who teaches the most number of courses live in?
college_3
select t2.building from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 1
Question: give the building that the instructor who teaches the greatest number of courses lives in. | Tables: 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 -> F...
give the building that the instructor who teaches the greatest number of courses lives in.
college_3
select t1.cname from course as t1 join enrolled_in as t2 on t1.cid = t2.cid group by t2.cid having count(*) >= 5
Question: what are the name of courses that have at least five enrollments? | Tables: 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. Cou...
what are the name of courses that have at least five enrollments?
college_3
select t1.cname from course as t1 join enrolled_in as t2 on t1.cid = t2.cid group by t2.cid having count(*) >= 5
Question: give the names of the courses with at least five enrollments. | Tables: 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 ...
give the names of the courses with at least five enrollments.
college_3
select t2.fname , t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid where t1.cname = 'computer literacy'
Question: find the first name and last name of the instructor of course that has course name | Tables: 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, DN...
find the first name and last name of the instructor of course that has course name
college_3
select t2.fname , t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid where t1.cname = 'computer literacy'
Question: what is the full name of the instructor who has a course named computer literacy? | Tables: 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...
what is the full name of the instructor who has a course named computer literacy?
college_3
select t2.dname , t2.room from course as t1 join department as t2 on t1.dno = t2.dno where t1.cname = 'introduction to computer science'
Question: find the department name and room of the course introduction to computer science. | Tables: 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...
find the department name and room of the course introduction to computer science.
college_3
select t2.dname , t2.room from course as t1 join department as t2 on t1.dno = t2.dno where t1.cname = 'introduction to computer science'
Question: what are the department name and room for the course introduction to computer science? | Tables: 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...
what are the department name and room for the course introduction to computer science?
college_3
select t3.fname , t3.lname , t2.gradepoint from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid
Question: find the student first and last names and grade points of all enrollments. | Tables: 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_...
find the student first and last names and grade points of all enrollments.
college_3
select t3.fname , t3.lname , t2.gradepoint from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid
Question: what are the full names and gradepoints for all enrollments? | Tables: 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 -...
what are the full names and gradepoints for all enrollments?
college_3
select distinct t3.fname from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t2.gradepoint >= 3.8
Question: find the distinct student first names of all students that have grade point at least 3.8 in one course. | Tables: 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. M...
find the distinct student first names of all students that have grade point at least 3.8 in one course.
college_3
select distinct t3.fname from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t2.gradepoint >= 3.8
Question: what are the distinct first names for students with a grade point of 3.8 or above in at least one course? | Tables: 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....
what are the distinct first names for students with a grade point of 3.8 or above in at least one course?
college_3
select t1.fname , t1.lname from faculty as t1 join member_of as t2 on t1.facid = t2.facid where t2.dno = 520
Question: find the full names of faculties who are members of department with department number 520. | Tables: 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 -> F...
find the full names of faculties who are members of department with department number 520.
college_3
select t1.fname , t1.lname from faculty as t1 join member_of as t2 on t1.facid = t2.facid where t2.dno = 520
Question: what are the full names of faculty members who are a part of department 520? | Tables: 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, App...
what are the full names of faculty members who are a part of department 520?
college_3
select t2.fname , t2.lname from minor_in as t1 join student as t2 on t1.stuid = t2.stuid where t1.dno = 140
Question: what are the first names and last names of the students that minor in the department with dno 140. | Tables: 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...
what are the first names and last names of the students that minor in the department with dno 140.
college_3
select t2.fname , t2.lname from minor_in as t1 join student as t2 on t1.stuid = t2.stuid where t1.dno = 140
Question: what are the full names of students minoring in department 140? | Tables: 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. Cours...
what are the full names of students minoring in department 140?
college_3
select t2.lname from department as t1 join faculty as t2 on t1.dno = t3.dno join member_of as t3 on t2.facid = t3.facid where t1.dname = 'computer science'
Question: find the last names of faculties who are members of computer science department. | Tables: 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,...
find the last names of faculties who are members of computer science department.
college_3
select t2.lname from department as t1 join faculty as t2 on t1.dno = t3.dno join member_of as t3 on t2.facid = t3.facid where t1.dname = 'computer science'
Question: what are the last names of faculty who are part of the computer science department? | Tables: 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, D...
what are the last names of faculty who are part of the computer science department?
college_3
select avg(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.lname = 'smith'
Question: find the average grade point of student whose last name is smith. | Tables: 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. Cou...
find the average grade point of student whose last name is smith.