Question: Find the name and age of all males in order of their age.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , gender (text) , age (number)


Question: What is the name and age of every male? Order the results by age.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , gender (text) , age (number)


Question: Find the name and age of the person who is a friend of both Dan and Alice.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: What are the names and ages of every person who is a friend of both Dan and Alice?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: Find the name and age of the person who is a friend of Dan or Alice.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: What are the different names and ages of every friend of either Dan or alice?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: Find the name of the person who has friends with age above 40 and under age 30?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: What are the names of every person who has a friend over 40 and under 30?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: Find the name of the person who has friends with age above 40 but not under age 30?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: What are the names of the people who are older 40 but no friends under age 30?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: Find the name of the person who has no student friends.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , job (text) | personfriend : name (text) , friend (text)


Question: What are the names of the people who have no friends who are students?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , job (text) | personfriend : name (text) , friend (text)


Question: Find the person who has exactly one friend.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)


Question: What are the names of everybody who has exactly one friend?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)


Question: Who are the friends of Bob?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) | person : name (text)


Question: Who are Bob's friends?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) | person : name (text)


Question: Find the name of persons who are friends with Bob.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) | personfriend : name (text) , friend (text)


Question: What are the names of all of Bob's friends?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) | personfriend : name (text) , friend (text)


Question: Find the names of females who are friends with Zach

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , gender (text) | personfriend : name (text) , friend (text)


Question: What are the names of all females who are friends with Zach?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , gender (text) | personfriend : name (text) , friend (text)


Question: Find the female friends of Alice.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) | person : name (text) , gender (text)


Question: What are all the friends of Alice who are female?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) | person : name (text) , gender (text)


Question: Find the male friend of Alice whose job is a doctor?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) | person : name (text) , gender (text) , job (text)


Question: Who are the friends of Alice that are doctors?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) | person : name (text) , gender (text) , job (text)


Question: Who has a friend that is from new york city?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , city (text) | personfriend : name (text) , friend (text)


Question: What are the names of all friends who are from New York?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , city (text) | personfriend : name (text) , friend (text)


Question: Who has friends that are younger than the average age?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: What are the different names of friends who are younger than the average age for a friend?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: Who has friends that are older than the average age? Print their friends and their ages as well

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: Whare the names, friends, and ages of all people who are older than the average age of a person?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: Who is the friend of Zach with longest year relationship?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) , year (number)


Question: Which friend of Zach has the longest-lasting friendship?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

personfriend : friend (text) , name (text) , year (number)


Question: What is the age of the friend of Zach with longest year relationship?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : age (number) , name (text) | personfriend : name (text) , friend (text) , year (number)


Question: What are the ages of all of Zach's friends who are in the longest relationship?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : age (number) , name (text) | personfriend : name (text) , friend (text) , year (number)


Question: Find the name of persons who are friends with Alice for the shortest years.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)


Question: What are the names of all people who are friends with Alice for the shortest amount of time?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)


Question: Find the name, age, and job title of persons who are friends with Alice for the longest years.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) , job (text) | personfriend : name (text) , friend (text) , year (number)


Question: What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) , job (text) | personfriend : name (text) , friend (text) , year (number)


Question: Who is the person that has no friend?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) | personfriend : name (text)


Question: What are the names of all people who do not have friends?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) | personfriend : name (text)


Question: Which person whose friends have the oldest average age?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: What is the name of the person who has the oldest average age for their friends, and what is that average age?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , age (number) | personfriend : name (text) , friend (text)


Question: What is the total number of people who has no friend living in the city of Austin.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , city (text) | personfriend : name (text) , friend (text)


Question: What is the total number of people who have no friends living in Austin?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) , city (text) | personfriend : name (text) , friend (text)


Question: Find Alice's friends of friends.

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) | personfriend : name (text) , friend (text)


Question: What are the names of all of Alice's friends of friends?

person : name (text) , age (number) , city (text) , gender (text) , job (text) | personfriend : name (text) , friend (text) , year (number)

person : name (text) | personfriend : name (text) , friend (text)


Question: How many members are there?

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)


Question: List the names of members in ascending alphabetical order.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : name (text) , member_id (number)


Question: What are the names and countries of members?

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : name (text) , country (text) , member_id (number)


Question: Show the names of members whose country is "United States" or "Canada".

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : name (text) , country (text) , member_id (number)


Question: Show the different countries and the number of members from each.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : country (text) , member_id (number)


Question: Show the most common country across members.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : country (text) , member_id (number)


Question: Which countries have more than two members?

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : country (text) , member_id (number)


Question: Show the leader names and locations of colleges.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

college : leader_name (text) , college_location (text) , college_id (number)


Question: Show the names of members and names of colleges they go to.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

college : name (text) , college_id (number) | member : name (text) , college_id (number) , member_id (number)


Question: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

college : name (text) , college_location (text) , college_id (number) | member : name (text) , college_id (number) , member_id (number)


Question: Show the distinct leader names of colleges associated with members from country "Canada".

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

college : leader_name (text) , college_id (number) | member : college_id (number) , country (text) , member_id (number)


Question: Show the names of members and the decoration themes they have.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : name (text) , member_id (number) | round : decoration_theme (text) , member_id (number)


Question: Show the names of members that have a rank in round higher than 3.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : name (text) , member_id (number) | round : member_id (number) , rank_in_round (number)


Question: Show the names of members in ascending order of their rank in rounds.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : name (text) , member_id (number) | round : member_id (number) , rank_in_round (number)


Question: List the names of members who did not participate in any round.

college : college_id (number) , name (text) , leader_name (text) , college_location (text) | member : member_id (number) , name (text) , country (text) , college_id (number) | round : round_id (number) , member_id (number) , decoration_theme (text) , rank_in_round (number)

member : name (text) , member_id (number) | round : member_id (number)


Question: Find the name and access counts of all documents, in alphabetic order of the document name.

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) , access_count (number) , document_code (text)


Question: What are the names of all the documents, as well as the access counts of each, ordered 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)

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


Question: Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?

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) , access_count (number) , document_code (text)


Question: What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed?

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) , access_count (number) , document_code (text)


Question: Find the types of documents with more than 4 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: What are the codes of types of documents of which there are for or more?

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: Find the total access count of all documents in the most popular document type.

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_type_code (text) , document_code (text)


Question: What is the total access count of documents that are of the most common document type?

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_type_code (text) , document_code (text)


Question: What is the average access count of 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 : access_count (number) , document_code (text)


Question: Find the average access count across all 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 : access_count (number) , document_code (text)


Question: What is the structure of the document with the least number of accesses?

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)

document_structures : document_structure_description (text) , document_structure_code (text) | documents : document_structure_code (text) , document_code (text)


Question: Return the structure description of the document that has been accessed the fewest number of times.

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)

document_structures : document_structure_description (text) , document_structure_code (text) | documents : document_structure_code (text) , document_code (text)


Question: What is the type of the document named "David 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)

documents : document_type_code (text) , document_name (text) , document_code (text)


Question: Return the type code of the document named "David 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)

documents : document_type_code (text) , document_name (text) , document_code (text)


Question: Find the list of documents that are both in the most three popular type and have the most three 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 : document_name (text) , document_type_code (text) , document_structure_code (text) , document_code (text)


Question: What are the names of documents that have both one of the three most common types and one of three most common structures?

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_type_code (text) , document_structure_code (text) , document_code (text)


Question: What document types do have more than 10000 total access number.

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) , access_count (number) , document_code (text)


Question: Return the codes of the document types that do not have a total access count of over 10000.

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) , access_count (number) , document_code (text)


Question: What are all the section titles of the document named "David 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)

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


Question: Give the section titles of the document with the name "David 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)

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


Question: Find all the name of documents without any 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: What are the names of documents that do not have any 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 username and passwords of users with the most popular 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 : user_name (text) , password (text) , role_code (text) , user_id (number)


Question: What are the usernames and passwords of users that have the most common 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 : user_name (text) , password (text) , role_code (text) , user_id (number)


Question: Find the average access counts of documents with functional area "Acknowledgement".

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_code (text) | document_functional_areas : document_code (text) , functional_area_code (text) | functional_areas : functional_area_code (text) , functional_area_description (text)


Question: What are the average access counts of documents that have the functional area description "Acknowledgement"?

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_code (text) | document_functional_areas : document_code (text) , functional_area_code (text) | functional_areas : functional_area_code (text) , functional_area_description (text)


Question: Find names of the document without any images.

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) | document_sections_images : section_id (number)


Question: What are the names of documents that do not have any images?

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) | document_sections_images : section_id (number)


Question: What is the name of the document with the most number of 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: 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)

documents : document_name (text) , document_code (text)


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)

documents : document_name (text) , document_code (text)


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) , image_id (number)


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) , image_id (number)


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) , id (number)


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) , id (number)


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) , id (number)


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) , id (number)


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) , id (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) , id (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)

companies : profits_billion (number) , id (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)

companies : profits_billion (number) , id (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) , id (number)


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) , id (number)


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)

companies : industry (text) , id (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)

companies : industry (text) , id (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) , id (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) , id (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) , id (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) , id (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) , id (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) , id (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) , id (number)


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) , id (number)


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) , product_id (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) , product_id (number)


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) , product_id (number)


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)

products : product_price (number) , product_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) , product_id (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)