Question: Return the name of the document that has the most sections.

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

documents : document_name (text) , document_code (text) | document_sections : document_code (text) , section_id (number)


Question: List all the document names which contains "CV".

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)


Question: What are the names of documents that contain the substring "CV"?

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)


Question: How many users are logged in?

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

users : user_login (text) , user_id (number)


Question: Count the number of users that are logged in.

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

users : user_login (text) , user_id (number)


Question: Find the description of the most popular role among the users that have logged in.

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

roles : role_description (text) , role_code (text) | users : role_code (text) , user_login (text) , user_id (number)


Question: What is the description of the most popular role among users that have logged in?

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

roles : role_description (text) , role_code (text) | users : role_code (text) , user_login (text) , user_id (number)


Question: Find the average access count of documents with the least popular structure.

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

documents : access_count (number) , document_structure_code (text) , document_code (text)


Question: What is the average access count of documents that have the least common structure?

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

documents : access_count (number) , document_structure_code (text) , document_code (text)


Question: List all the image name and URLs in the order of their names.

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

images : image_name (text) , image_url (text)


Question: What are the names and urls of images, sorted alphabetically?

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

images : image_name (text) , image_url (text)


Question: Find the number of users in each role.

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

users : role_code (text) , user_id (number)


Question: What are the different role codes for users, and how many users have each?

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

users : role_code (text) , user_id (number)


Question: What document types have more than 2 corresponding documents?

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

documents : document_type_code (text) , document_code (text)


Question: Give the codes of document types that have more than 2 corresponding documents.

roles : role_code (text) , role_description (text) | users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | document_structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | functional_areas : functional_area_code (text) , parent_functional_area_code (text) , functional_area_description (text) | images : image_id (number) , image_alt_text (text) , image_name (text) , image_url (text) | documents : document_code (text) , document_structure_code (text) , document_type_code (text) , access_count (number) , document_name (text) | document_functional_areas : document_code (text) , functional_area_code (text) | document_sections : section_id (number) , document_code (text) , section_sequence (number) , section_code (text) , section_title (text) | document_sections_images : section_id (number) , image_id (number)

documents : document_type_code (text) , document_code (text)


Question: How many companies are there?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)


Question: Count the number of companies.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)


Question: List the names of companies in descending order of market value.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : name (text) , market_value_billion (text)


Question: Sort the company names in descending order of the company's market value.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : name (text) , market_value_billion (text)


Question: What are the names of companies whose headquarters are not "USA"?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : name (text) , headquarters (text)


Question: Find the names of the companies whose headquarters are not located in "USA".

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : name (text) , headquarters (text)


Question: What are the name and assets of each company, sorted in ascending order of company name?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : name (text) , assets_billion (number)


Question: List the name and assets of each company in ascending order of company name.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : name (text) , assets_billion (number)


Question: What are the average profits of companies?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)


Question: Compute the average profits companies make.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)


Question: What are the maximum and minimum sales of the companies whose industries are not "Banking".

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : sales_billion (number) , industry (text)


Question: Find the maximum and minimum sales of the companies that are not in the "Banking" industry.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : sales_billion (number) , industry (text)


Question: How many different industries are the companies in?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)


Question: Count the number of distinct company industries.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)


Question: List the names of buildings in descending order of building height.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , height (number)


Question: What are the names of buildings sorted in descending order of building height?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , height (number)


Question: Find the stories of the building with the largest height.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : stories (number) , height (number)


Question: What is the stories of highest building?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : stories (number) , height (number)


Question: List the name of a building along with the name of a company whose office is in the building.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | companies : name (text) , id (number) | office_locations : building_id (number) , company_id (number)


Question: For each company, return the company name and the name of the building its office is located in.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | companies : name (text) , id (number) | office_locations : building_id (number) , company_id (number)


Question: Show the names of the buildings that have more than one company offices.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | companies : name (text) , id (number) | office_locations : building_id (number) , company_id (number)


Question: Which buildings have more than one company offices? Give me the building names.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | companies : name (text) , id (number) | office_locations : building_id (number) , company_id (number)


Question: Show the name of the building that has the most company offices.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | companies : name (text) , id (number) | office_locations : building_id (number) , company_id (number)


Question: Which building has the largest number of company offices? Give me the building name.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | companies : name (text) , id (number) | office_locations : building_id (number) , company_id (number)


Question: Please show the names of the buildings whose status is "on-hold", in ascending order of stories.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , status (text) , stories (number)


Question: Find the names of the buildings in "on-hold" status, and sort them in ascending order of building stories.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , status (text) , stories (number)


Question: Please show each industry and the corresponding number of companies in that industry.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: Whah are the name of each industry and the number of companies in that industry?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: Please show the industries of companies in descending order of the number of companies.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: Sort all the industries in descending order of the count of companies in each industry

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: List the industry shared by the most companies.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: Which industry has the most companies?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: List the names of buildings that have no company office.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | office_locations : building_id (number)


Question: Which buildings do not have any company office? Give me the building names.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

buildings : name (text) , id (number) | office_locations : building_id (number)


Question: Show the industries shared by companies whose headquarters are "USA" and companies whose headquarters are "China".

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , headquarters (text)


Question: Which industries have both companies with headquarter in "USA" and companies with headquarter in "China"?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , headquarters (text)


Question: Find the number of companies whose industry is "Banking" or "Conglomerate",

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: How many companies are in either "Banking" industry or "Conglomerate" industry?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : industry (text) , id (number)


Question: Show the headquarters shared by more than two companies.

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : headquarters (text) , id (number)


Question: Which headquarter locations are used by more than 2 companies?

buildings : id (number) , name (text) , city (text) , height (number) , stories (number) , status (text) | companies : id (number) , name (text) , headquarters (text) , industry (text) , sales_billion (number) , profits_billion (number) , assets_billion (number) , market_value_billion (text) | office_locations : building_id (number) , company_id (number) , move_in_year (number)

companies : headquarters (text) , id (number)


Question: How many products are there?

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)


Question: List the name of products in ascending order of price.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_name (text) , product_price (number)


Question: What are the names and type codes of products?

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_name (text) , product_type_code (text)


Question: Show the prices of the products named "Dining" or "Trading Policy".

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_price (number) , product_name (text)


Question: What is the average price for products?

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)


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

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_name (text) , product_price (number)


Question: Show different type codes of products and the number of products with each type code.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_type_code (text) , product_id (number)


Question: Show the most common type code across products.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_type_code (text) , product_id (number)


Question: Show the product type codes that have at least two products.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_type_code (text) , product_id (number)


Question: Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_type_code (text) , product_price (number)


Question: Show the names of products and the number of events they are in.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_name (text) , product_id (number) | products_in_events : product_id (number) , product_in_event_id (number)


Question: Show the names of products and the number of events they are in, sorted by the number of events in descending order.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_name (text) , product_id (number) | products_in_events : product_id (number) , product_in_event_id (number)


Question: Show the names of products that are in at least two events.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_name (text) , product_id (number) | products_in_events : product_id (number) , product_in_event_id (number)


Question: Show the names of products that are in at least two events in ascending alphabetical order of product name.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

products : product_name (text) , product_id (number) | products_in_events : product_id (number) , product_in_event_id (number)


Question: List the names of products that are not in any event.

addresses : address_id (number) , address_details (text) | locations : location_id (number) , other_details (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | parties : party_id (number) , party_details (text) | assets : asset_id (number) , other_details (text) | channels : channel_id (number) , other_details (text) | finances : finance_id (number) , other_details (text) | events : event_id (number) , address_id (number) , channel_id (number) , event_type_code (text) , finance_id (number) , location_id (number) | products_in_events : product_in_event_id (number) , event_id (number) , product_id (number) | parties_in_events : party_id (number) , event_id (number) , role_code (text) | agreements : document_id (number) , event_id (number) | assets_in_events : asset_id (number) , event_id (number)

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


Question: How many artworks are there?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)


Question: List the name of artworks in ascending alphabetical order.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)


Question: List the name of artworks whose type is not "Program Talent Show".

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)


Question: What are the names and locations of festivals?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : festival_name (text) , location (text)


Question: What are the names of the chairs of festivals, sorted in ascending order of the year held?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : chair_name (text) , year (number)


Question: What is the location of the festival with the largest number of audience?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : location (text) , num_of_audience (number)


Question: What are the names of festivals held in year 2007?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : festival_name (text) , year (number)


Question: What is the average number of audience for festivals?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : num_of_audience (number)


Question: Show the names of the three most recent festivals.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : festival_name (text) , year (number)


Question: For each nomination, show the name of the artwork and name of the festival where it is nominated.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

artwork : name (text) , artwork_id (number) | festival_detail : festival_name (text) , festival_id (number) | nomination : artwork_id (number) , festival_id (number)


Question: Show distinct types of artworks that are nominated in festivals in 2007.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

artwork : type (text) , artwork_id (number) | nomination : artwork_id (number) , festival_id (number) | festival_detail : festival_id (number) , year (number)


Question: Show the names of artworks in ascending order of the year they are nominated in.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

artwork : name (text) , artwork_id (number) | nomination : artwork_id (number) , festival_id (number) | festival_detail : festival_id (number) , year (number)


Question: Show the names of festivals that have nominated artworks of type "Program Talent Show".

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : festival_name (text) , festival_id (number) | artwork : artwork_id (number) , type (text) | nomination : artwork_id (number) , festival_id (number)


Question: Show the ids and names of festivals that have at least two nominations for artworks.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : festival_id (number) , festival_name (text) | nomination : festival_id (number) , artwork_id (number) | artwork : artwork_id (number)


Question: Show the id, name of each festival and the number of artworks it has nominated.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : festival_id (number) , festival_name (text) | nomination : festival_id (number) , artwork_id (number) | artwork : artwork_id (number)


Question: Please show different types of artworks with the corresponding number of artworks of each type.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

artwork : type (text) , artwork_id (number)


Question: List the most common type of artworks.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

artwork : type (text) , artwork_id (number)


Question: List the year in which there are more than one festivals.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : year (number) , festival_id (number)


Question: List the name of artworks that are not nominated.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

artwork : name (text) , artwork_id (number) | nomination : artwork_id (number)


Question: Show the number of audience in year 2008 or 2010.

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : num_of_audience (number) , year (number)


Question: What are the total number of the audiences who visited any of the festivals?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : num_of_audience (number)


Question: In which year are there festivals both inside the 'United States' and outside the 'United States'?

festival_detail : festival_id (number) , festival_name (text) , chair_name (text) , location (text) , year (number) , num_of_audience (number) | artwork : artwork_id (number) , type (text) , name (text) | nomination : artwork_id (number) , festival_id (number) , result (text)

festival_detail : year (number) , location (text)


Question: How many premises are there?

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)


Question: What are all the distinct premise types?

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)


Question: Find the types and details for all premises and order by the premise type.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

premises : premises_type (text) , premise_details (text)


Question: Show each premise type and the number of premises in that type.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

premises : premises_type (text) , premise_id (number)


Question: Show all distinct product categories along with the number of mailshots in each category.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

mailshot_campaigns : product_category (text) , mailshot_id (number)


Question: Show the name and phone of the customer without any mailshot.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customers : customer_name (text) , customer_phone (text) , customer_id (number) | mailshot_customers : customer_id (number)


Question: Show the name and phone for customers with a mailshot with outcome code 'No Response'.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customers : customer_name (text) , customer_phone (text) , customer_id (number) | mailshot_customers : customer_id (number) , outcome_code (text)


Question: Show the outcome code of mailshots along with the number of mailshots in each outcome code.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

mailshot_customers : outcome_code (text)


Question: Show the names of customers who have at least 2 mailshots with outcome code 'Order'.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customers : customer_name (text) , customer_id (number) | mailshot_customers : customer_id (number) , outcome_code (text)


Question: Show the names of customers who have the most mailshots.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customers : customer_name (text) , customer_id (number) | mailshot_customers : customer_id (number)


Question: What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customers : customer_name (text) , payment_method (text) , customer_id (number) | mailshot_customers : customer_id (number) , outcome_code (text)


Question: Show the premise type and address type code for all customer addresses.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

premises : premises_type (text) , premise_id (number) | customer_addresses : address_type_code (text) , premise_id (number)


Question: What are the distinct address type codes for all customer addresses?

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customer_addresses : address_type_code (text)


Question: Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customer_orders : order_shipping_charges (text) , customer_id (number) , order_status_code (text)


Question: Show the names of customers having an order with shipping method FedEx and order status Paid.

premises : premise_id (number) , premises_type (text) , premise_details (text) | products : product_id (number) , product_category (text) , product_name (text) | customers : customer_id (number) , payment_method (text) , customer_name (text) , customer_phone (text) , customer_email (text) , customer_address (text) , customer_login (text) , customer_password (text) | mailshot_campaigns : mailshot_id (number) , product_category (text) , mailshot_name (text) , mailshot_start_date (time) , mailshot_end_date (time) | customer_addresses : customer_id (number) , premise_id (number) , date_address_from (time) , address_type_code (text) , date_address_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , shipping_method_code (text) , order_placed_datetime (time) , order_delivered_datetime (time) , order_shipping_charges (text) | mailshot_customers : mailshot_id (number) , customer_id (number) , outcome_code (text) , mailshot_customer_date (time) | order_items : item_id (number) , order_item_status_code (text) , order_id (number) , product_id (number) , item_status_code (text) , item_delivered_datetime (time) , item_order_quantity (text)

customers : customer_name (text) , customer_id (number) | customer_orders : customer_id (number) , shipping_method_code (text) , order_status_code (text)


Question: How many courses are there in total?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: Count the number of courses.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: How many courses have more than 2 credits?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: Count the number of courses with more than 2 credits.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: List all names of courses with 1 credit?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

course : cname (text) , credits (number)


Question: What are the names of courses with 1 credit?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

course : cname (text) , credits (number)


Question: Which courses are taught on days MTW?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: What are the course names for courses taught on MTW?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: What is the number of departments in Division "AS"?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

department : division (text) , dno (number)


Question: How many departments are in the division AS?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

department : division (text) , dno (number)


Question: What are the phones of departments in Room 268?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

department : dphone (number) , room (text)


Question: Give the phones for departments in room 268.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

department : dphone (number) , room (text)


Question: Find the number of students that have at least one grade "B".

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

enrolled_in : stuid (number) , grade (text)


Question: How many students have had at least one "B" grade?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

enrolled_in : stuid (number) , grade (text)


Question: Find the max and min grade point for all letter grade.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: What are the maximum and minumum grade points?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: Find the first names of students whose first names contain letter "a".

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: What are the first names for students who have an "a" in their first name?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)


Question: Find the first names and last names of male (sex is M) faculties who live in building NEB.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

faculty : fname (text) , lname (text) , sex (text) , building (text)


Question: What are the full names of faculties with sex M and who live in building NEB?

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

faculty : fname (text) , lname (text) , sex (text) , building (text)


Question: Find the rooms of faculties with rank professor who live in building NEB.

student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text) | faculty : facid (number) , lname (text) , fname (text) , rank (text) , sex (text) , phone (number) , room (text) , building (text) | department : dno (number) , division (text) , dname (text) , room (text) , building (text) , dphone (number) | member_of : facid (number) , dno (number) , appt_type (text) | course : cid (text) , cname (text) , credits (number) , instructor (number) , days (text) , hours (text) , dno (number) | minor_in : stuid (number) , dno (number) | enrolled_in : stuid (number) , cid (text) , grade (text) | gradeconversion : lettergrade (text) , gradepoint (number)

faculty : room (text) , rank (text) , building (text)