Question: What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: Find the name of dorms which have TV Lounge but no Study Room as amenity.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: What is the name of each dorm that has a TV Lounge but no study rooms?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : lname (text) , sex (text) , city_code (text) , age (number) , stuid (number)


Question: What is the last name of every student who is either female or living in a city with the code BAL or male and under 20?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : lname (text) , sex (text) , city_code (text) , age (number) , stuid (number)


Question: Find the name of the dorm with the largest capacity.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , student_capacity (number)


Question: What are the names of the dorm with the largest capacity?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , student_capacity (number)


Question: List in alphabetic order all different amenities.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)


Question: What are the different dorm amenity names in alphabetical order?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)


Question: Find the code of city where most of students are living in.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : city_code (text) , stuid (number)


Question: What is the code of the city with the most students?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : city_code (text) , stuid (number)


Question: Find the first and last name of students whose age is younger than the average age.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , age (number) , stuid (number)


Question: What is the first and last name of all students who are younger than average?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , age (number) , stuid (number)


Question: List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , city_code (text) , age (number) , stuid (number)


Question: What are the first and last names of all students who are not living in the city HKG and order the results by age?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , city_code (text) , age (number) , stuid (number)


Question: List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | has_amenity : amenid (number) , dormid (number) | dorm : dormid (number) , dorm_name (text) | lives_in : dormid (number)


Question: What are the amenities in alphabetical order that Anonymous Donor Hall has?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | has_amenity : amenid (number) , dormid (number) | dorm : dormid (number) , dorm_name (text) | lives_in : dormid (number)


Question: Find the number of dorms and total capacity for each gender.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : student_capacity (number) , gender (text)


Question: How many dorms are there and what is the total capacity for each gender?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : student_capacity (number) , gender (text)


Question: Find the average and oldest age for students with different sex.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , sex (text) , stuid (number)


Question: What is the average and oldest age for each gender of student?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , sex (text) , stuid (number)


Question: Find the number of students in each major.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : major (number) , stuid (number)


Question: How many students are there in each major?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : major (number) , stuid (number)


Question: Find the number and average age of students living in each city.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , city_code (text) , stuid (number)


Question: How many students live in each city and what are their average ages?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , city_code (text) , stuid (number)


Question: Find the average age and number of male students (with sex M) from each city.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , city_code (text) , sex (text) , stuid (number)


Question: What is the average age and how many male students are there in each city?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , city_code (text) , sex (text) , stuid (number)


Question: Find the number of students for the cities where have more than one student.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : city_code (text) , stuid (number)


Question: How many students are from each city, and which cities have more than one cities?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : city_code (text) , stuid (number)


Question: Find the first and last name of students who are not in the largest major.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , major (number) , stuid (number)


Question: What is the first and last name of the students who are not in the largest major?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , major (number) , stuid (number)


Question: Find the number of students whose age is older than the average age for each gender.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : sex (text) , age (number) , stuid (number)


Question: How many students are older than average for each gender?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : sex (text) , age (number) , stuid (number)


Question: Find the average age of students living in each dorm and the name of dorm.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , stuid (number) , stuid (number) | dorm : dorm_name (text) , dormid (number) | lives_in : stuid (number) , dormid (number) | has_amenity : dormid (number)


Question: What is the average age for each dorm and what are the names of each dorm?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , stuid (number) , stuid (number) | dorm : dorm_name (text) , dormid (number) | lives_in : stuid (number) , dormid (number) | has_amenity : dormid (number)


Question: Find the number of amenities for each of the dorms that can accommodate more than 100 students.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dormid (number) , student_capacity (number) | has_amenity : dormid (number) | lives_in : dormid (number)


Question: For each dorm, how many amenities does it have?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dormid (number) , student_capacity (number) | has_amenity : dormid (number) | lives_in : dormid (number)


Question: Find the number of students who is older than 20 in each dorm.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , dormid (number) | student : stuid (number) , age (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | has_amenity : dormid (number)


Question: How many students are older than 20 in each dorm?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , dormid (number) | student : stuid (number) , age (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | has_amenity : dormid (number)


Question: Find the first name of students who are living in the Smith Hall.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number)


Question: What are the first names of all students in Smith Hall?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number)


Question: Find the average age of students who are living in the dorm with the largest capacity.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , student_capacity (number) | has_amenity : dormid (number)


Question: What is the average age of students who are living in the dorm with the largest capacity?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : age (number) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , student_capacity (number) | has_amenity : dormid (number)


Question: Find the total number of students living in the male dorm (with gender M).

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , gender (text) | has_amenity : dormid (number)


Question: What are the total number of students who are living in a male dorm?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , gender (text) | has_amenity : dormid (number)


Question: Find the number of female students (with F sex) living in Smith Hall

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : stuid (number) , sex (text) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number)


Question: How many female students live in Smith Hall?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : stuid (number) , sex (text) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number)


Question: Find the name of amenities Smith Hall dorm have.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number)


Question: What are the names of the amenities that Smith Hall has?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number)


Question: Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number)


Question: What amenities does Smith Hall have in alphabetical order?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | dorm : dormid (number) , dorm_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number)


Question: Find the name of amenity that is most common in all dorms.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | has_amenity : amenid (number)


Question: What is the most common amenity in the dorms?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | has_amenity : amenid (number)


Question: Find the first name of students who are living in the dorm that has most number of amenities.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | dorm_amenity : amenid (number)


Question: What are the first names of all students who live in the dorm with the most amenities?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | dorm_amenity : amenid (number)


Question: Find the name and capacity of the dorm with least number of amenities.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , student_capacity (number) , dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) | dorm_amenity : amenid (number)


Question: What is the name and capacity of the dorm with the fewest amount of amenities?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , student_capacity (number) , dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) | dorm_amenity : amenid (number)


Question: Find the name of dorms that do not have amenity TV Lounge.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: What are the names of the dorm that does not have a TV Lounge?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm : dorm_name (text) , dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: Find the first and last name of students who are living in the dorms that have amenity TV Lounge.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: What are the first and last names of all students who are living in a dorm with a TV Lounge?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , lname (text) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , age (number) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: What is the first name and age of every student who lives in a dorm with a TV Lounge?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

student : fname (text) , age (number) , stuid (number) , stuid (number) | lives_in : stuid (number) , dormid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | dorm_amenity : amenid (number) , amenity_name (text)


Question: Find the name of amenities of the dorm where the student with last name Smith is living in.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) , stuid (number) | student : stuid (number) , lname (text) , stuid (number)


Question: What are the amenities in the dorm that a student who has the last name of Smith lives in?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | dorm_amenity : amenid (number) , amenity_name (text) | has_amenity : dormid (number) , amenid (number) | lives_in : stuid (number) , dormid (number) , room_number (number)

dorm_amenity : amenity_name (text) , amenid (number) | dorm : dormid (number) | has_amenity : dormid (number) , amenid (number) | lives_in : dormid (number) , stuid (number) | student : stuid (number) , lname (text) , stuid (number)


Question: How many customers are there?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)


Question: Count the number of customers.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)


Question: Find the emails and phone numbers of all the customers, ordered by email address and phone number.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : email_address (text) , phone_number (text) , staff_id (number) | customers : email_address (text) , phone_number (text) , customer_id (number)


Question: What are the emails and phone numbers of all customers, sorted by email address and phone number?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : email_address (text) , phone_number (text) , staff_id (number) | customers : email_address (text) , phone_number (text) , customer_id (number)


Question: Which city has the least number of customers whose type code is "Good Credit Rating"?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : town_city (text) , customer_type_code (text) , customer_id (number)


Question: Return the city with the customer type code "Good Credit Rating" that had the fewest customers.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : town_city (text) , customer_type_code (text) , customer_id (number)


Question: List the name of all products along with the number of complaints that they have received.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_name (text) , product_id (number) , product_id (number) | complaints : product_id (number)


Question: What are all the different product names, and how many complains has each received?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_name (text) , product_id (number) , product_id (number) | complaints : product_id (number)


Question: Find the emails of customers who has filed a complaints of the product with the most complaints.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : email_address (text) , staff_id (number) | customers : email_address (text) , customer_id (number) , customer_id (number) | complaints : customer_id (number)


Question: What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : email_address (text) , staff_id (number) | customers : email_address (text) , customer_id (number) , customer_id (number) | complaints : customer_id (number)


Question: Which products has been complained by the customer who has filed least amount of complaints?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_name (text) , product_id (number) , product_id (number) | complaints : product_id (number) , customer_id (number) | customers : customer_id (number) , customer_id (number)


Question: Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_name (text) , product_id (number) , product_id (number) | complaints : product_id (number) , customer_id (number) | customers : customer_id (number) , customer_id (number)


Question: What is the phone number of the customer who has filed the most recent complaint?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : phone_number (text) , staff_id (number) | customers : phone_number (text) , customer_id (number) , customer_id (number) | complaints : customer_id (number) , date_complaint_raised (time)


Question: Return the phone number of the customer who filed the complaint that was raised most recently.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : phone_number (text) , staff_id (number) | customers : phone_number (text) , customer_id (number) , customer_id (number) | complaints : customer_id (number) , date_complaint_raised (time)


Question: Find the email and phone number of the customers who have never filed a complaint before.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : email_address (text) , phone_number (text) , staff_id (number) | customers : email_address (text) , phone_number (text) , customer_id (number) , customer_id (number) | complaints : customer_id (number)


Question: What are the emails and phone numbers of custoemrs who have never filed a complaint?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : email_address (text) , phone_number (text) , staff_id (number) | customers : email_address (text) , phone_number (text) , customer_id (number) , customer_id (number) | complaints : customer_id (number)


Question: Find the phone number of all the customers and staff.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : phone_number (text) , staff_id (number) | customers : phone_number (text) , customer_id (number)


Question: What are the phone numbers of all customers and all staff members?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : phone_number (text) , staff_id (number) | customers : phone_number (text) , customer_id (number)


Question: What is the description of the product named "Chocolate"?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_description (text) , product_name (text) , product_id (number)


Question: Return the description of the product called "Chocolate".

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_description (text) , product_name (text) , product_id (number)


Question: Find the name and category of the most expensive product.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_name (text) , product_category_code (text) , product_price (number) , product_id (number)


Question: What is the name and category code of the product with the highest price?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_name (text) , product_category_code (text) , product_price (number) , product_id (number)


Question: Find the prices of products which has never received a single complaint.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_price (number) , product_id (number) , product_id (number) | complaints : product_id (number)


Question: What are the prices of products that have never gotten a complaint?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_price (number) , product_id (number) , product_id (number) | complaints : product_id (number)


Question: What is the average price of the products for each category?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_price (number) , product_category_code (text) , product_id (number)


Question: Return the average price of products that have each category code.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

products : product_price (number) , product_category_code (text) , product_id (number)


Question: Find the last name of the staff member who processed the complaint of the cheapest product.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : last_name (text) , staff_id (number) , staff_id (number) | complaints : staff_id (number) , product_id (number) | products : product_id (number) , product_price (number) , product_id (number)


Question: What is the last name of the staff member in charge of the complaint on the product with the lowest price?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : last_name (text) , staff_id (number) , staff_id (number) | complaints : staff_id (number) , product_id (number) | products : product_id (number) , product_price (number) , product_id (number)


Question: Which complaint status has more than 3 records on file?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

complaints : complaint_status_code (text)


Question: Return complaint status codes have more than 3 corresponding complaints?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

complaints : complaint_status_code (text)


Question: Find the last name of the staff whose email address contains "wrau".

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : last_name (text) , email_address (text) , staff_id (number) | customers : email_address (text) , customer_id (number)


Question: What are the last names of staff with email addressed containing the substring "wrau"?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : last_name (text) , email_address (text) , staff_id (number) | customers : email_address (text) , customer_id (number)


Question: How many customers are there in the customer type with the most customers?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : customer_type_code (text) , customer_id (number)


Question: Count the number of customers that have the customer type that is most common.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : customer_type_code (text) , customer_id (number)


Question: What is the last name of the staff who has handled the first ever complaint?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : last_name (text) , staff_id (number) , staff_id (number) | complaints : staff_id (number) , date_complaint_raised (time)


Question: Return the last name of the staff member who handled the complaint with the earliest date raised.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : last_name (text) , staff_id (number) , staff_id (number) | complaints : staff_id (number) , date_complaint_raised (time)


Question: How many distinct complaint type codes are there in the database?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)


Question: Count the number of different complaint type codes.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)


Question: Find the address line 1 and 2 of the customer with email "vbogisich@example.org".

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : address_line_1 (text) , address_line_2 (text) , email_address (text) , customer_id (number) | staff : email_address (text) , staff_id (number)


Question: What are lines 1 and 2 of the addressed of the customer with the email "vbogisich@example.org"?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : address_line_1 (text) , address_line_2 (text) , email_address (text) , customer_id (number) | staff : email_address (text) , staff_id (number)


Question: Find the number of complaints with Product Failure type for each complaint status.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

complaints : complaint_status_code (text) , complaint_type_code (text)


Question: Of complaints with the type code "Product Failure", how many had each different status code?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

complaints : complaint_status_code (text) , complaint_type_code (text)


Question: What is first names of the top 5 staff who have handled the greatest number of complaints?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : first_name (text) , staff_id (number) , staff_id (number) | complaints : staff_id (number)


Question: Return the first names of the 5 staff members who have handled the most complaints.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

staff : first_name (text) , staff_id (number) , staff_id (number) | complaints : staff_id (number)


Question: Which state has the most customers?

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : state (text) , customer_id (number)


Question: Give the state that has the most customers.

staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | products : product_id (number) , parent_product_id (number) , product_category_code (text) , date_product_first_available (time) , date_product_discontinued (time) , product_name (text) , product_description (text) , product_price (number) | complaints : complaint_id (number) , product_id (number) , customer_id (number) , complaint_outcome_code (text) , complaint_status_code (text) , complaint_type_code (text) , date_complaint_raised (time) , date_complaint_closed (time) , staff_id (number)

customers : state (text) , customer_id (number)


Question: How many submissions are there?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)


Question: Count the number of submissions.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)


Question: List the authors of submissions in ascending order of scores.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , scores (number) , submission_id (number)


Question: Find the author for each submission and list them in ascending order of submission score.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , scores (number) , submission_id (number)


Question: What are the authors of submissions and their colleges?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , college (text) , submission_id (number)


Question: For each submission, show the author and their affiliated college.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , college (text) , submission_id (number)


Question: Show the names of authors from college "Florida" or "Temple"

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , college (text) , submission_id (number)


Question: Which authors with submissions are from college "Florida" or "Temple"?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , college (text) , submission_id (number)


Question: What is the average score of submissions?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : scores (number) , submission_id (number)


Question: Compute the average score of submissions.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : scores (number) , submission_id (number)


Question: What is the author of the submission with the highest score?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , scores (number) , submission_id (number)


Question: Find the author who achieved the highest score in a submission.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , scores (number) , submission_id (number)


Question: Show different colleges along with the number of authors of submission from each college.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : college (text) , submission_id (number)


Question: For each college, return the college name and the count of authors with submissions from that college.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : college (text) , submission_id (number)


Question: Show the most common college of authors of submissions.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : college (text) , submission_id (number)


Question: Which college has the most authors with submissions?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : college (text) , submission_id (number)


Question: Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : college (text) , scores (number) , submission_id (number)


Question: Which colleges have both authors with submission score above 90 and authors with submission score below 80?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : college (text) , scores (number) , submission_id (number)


Question: Show the authors of submissions and the acceptance results of their submissions.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | acceptance : result (text) , submission_id (number) , submission_id (number)


Question: For each submission, find its author and acceptance result.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | acceptance : result (text) , submission_id (number) , submission_id (number)


Question: Show the result of the submission with the highest score.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

acceptance : result (text) , submission_id (number) , submission_id (number) | submission : submission_id (number) , scores (number) , submission_id (number)


Question: Which submission received the highest score in acceptance result. Show me the result.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

acceptance : result (text) , submission_id (number) , submission_id (number) | submission : submission_id (number) , scores (number) , submission_id (number)


Question: Show each author and the number of workshops they submitted to.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | workshop : workshop_id (number) , workshop_id (number) | acceptance : workshop_id (number) , submission_id (number) , submission_id (number)


Question: How many workshops did each author submit to? Return the author name and the number of workshops.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | workshop : workshop_id (number) , workshop_id (number) | acceptance : workshop_id (number) , submission_id (number) , submission_id (number)


Question: Show the authors who have submissions to more than one workshop.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | acceptance : submission_id (number) , workshop_id (number) , submission_id (number) | workshop : workshop_id (number) , workshop_id (number)


Question: Which authors have submitted to more than one workshop?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | acceptance : submission_id (number) , workshop_id (number) , submission_id (number) | workshop : workshop_id (number) , workshop_id (number)


Question: Show the date and venue of each workshop in ascending alphabetical order of the venue.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

workshop : date (text) , venue (text) , workshop_id (number)


Question: Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

workshop : date (text) , venue (text) , workshop_id (number)


Question: List the authors who do not have submission to any workshop.

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | acceptance : submission_id (number) , submission_id (number)


Question: Which authors did not submit to any workshop?

workshop : workshop_id (number) , date (text) , venue (text) , name (text) | submission : submission_id (number) , scores (number) , author (text) , college (text) | acceptance : submission_id (number) , workshop_id (number) , result (text)

submission : author (text) , submission_id (number) , submission_id (number) | acceptance : submission_id (number) , submission_id (number)