Question: How many products have the color description 'red' and the characteristic name 'slow'?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

products : product_id (number) , color_code (text) , product_id (number) | product_characteristics : product_id (number) , characteristic_id (number) | characteristics : characteristic_id (number) , characteristic_name (text) , characteristic_id (number) | ref_colors : color_code (text) , color_description (text) , color_code (number)


Question: Count the products that have the color description "white" or have the characteristic name "hot".

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

products : product_id (number) , color_code (text) , product_id (number) | product_characteristics : product_id (number) , characteristic_id (number) | characteristics : characteristic_id (number) , characteristic_name (text) , characteristic_id (number) | ref_colors : color_code (text) , color_description (text) , color_code (number)


Question: How many products have their color described as 'white' or have a characteristic with the name 'hot'?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

products : product_id (number) , color_code (text) , product_id (number) | product_characteristics : product_id (number) , characteristic_id (number) | characteristics : characteristic_id (number) , characteristic_name (text) , characteristic_id (number) | ref_colors : color_code (text) , color_description (text) , color_code (number)


Question: What is the unit of measuerment of the product category code "Herbs"?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_id (number)


Question: Return the unit of measure for 'Herb' products.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_id (number)


Question: Find the product category description of the product category with code "Spices".

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : product_category_description (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_id (number)


Question: What is the description of the product category with the code 'Spices'?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : product_category_description (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_id (number)


Question: What is the product category description and unit of measurement of category "Herbs"?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : product_category_description (text) , unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_id (number)


Question: Return the description and unit of measurement for products in the 'Herbs' category.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : product_category_description (text) , unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_id (number)


Question: What is the unit of measurement of product named "cumin"?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_name (text) , product_id (number)


Question: Give the unit of measure for the product with the name 'cumin'.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_name (text) , product_id (number)


Question: Find the unit of measurement and product category code of product named "chervil".

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_name (text) , product_id (number)


Question: What are the unit of measure and category code for the 'chervil' product?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_product_categories : unit_of_measure (text) , product_category_code (text) , product_category_code (number) | products : product_category_code (text) , product_name (text) , product_id (number)


Question: Find the product names that are colored 'white' but do not have unit of measurement "Handful".

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

products : product_name (text) , product_category_code (text) , color_code (text) , product_id (number) | ref_product_categories : product_category_code (text) , unit_of_measure (text) , product_category_code (number) | ref_colors : color_code (text) , color_description (text) , color_code (number)


Question: What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

products : product_name (text) , product_category_code (text) , color_code (text) , product_id (number) | ref_product_categories : product_category_code (text) , unit_of_measure (text) , product_category_code (number) | ref_colors : color_code (text) , color_description (text) , color_code (number)


Question: What is the description of the color for most products?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_colors : color_description (text) , color_code (text) , color_code (number) | products : color_code (text) , product_id (number)


Question: Return the color description that is most common across all products.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_colors : color_description (text) , color_code (text) , color_code (number) | products : color_code (text) , product_id (number)


Question: What is the description of the color used by least products?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_colors : color_description (text) , color_code (text) , color_code (number) | products : color_code (text) , product_id (number)


Question: Give the color description that is least common across products.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_colors : color_description (text) , color_code (text) , color_code (number) | products : color_code (text) , product_id (number)


Question: What is the characteristic name used by most number of the products?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

characteristics : characteristic_name (text) , characteristic_id (number) , characteristic_id (number) | products : product_id (number) , product_id (number) | product_characteristics : product_id (number) , characteristic_id (number)


Question: Return the name of the characteristic that is most common across all products.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

characteristics : characteristic_name (text) , characteristic_id (number) , characteristic_id (number) | products : product_id (number) , product_id (number) | product_characteristics : product_id (number) , characteristic_id (number)


Question: What are the names, details and data types of the characteristics which are never used by any product?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

characteristics : characteristic_name (text) , other_characteristic_details (text) , characteristic_data_type (text) , characteristic_id (number) , characteristic_id (number) | product_characteristics : characteristic_id (number)


Question: Give the names, details, and data types of characteristics that are not found in any product.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

characteristics : characteristic_name (text) , other_characteristic_details (text) , characteristic_data_type (text) , characteristic_id (number) , characteristic_id (number) | product_characteristics : characteristic_id (number)


Question: What are characteristic names used at least twice across all products?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

characteristics : characteristic_name (text) , characteristic_id (number) , characteristic_id (number) | products : product_id (number) , product_id (number) | product_characteristics : product_id (number) , characteristic_id (number)


Question: Give the names of characteristics that are in two or more products?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

characteristics : characteristic_name (text) , characteristic_id (number) , characteristic_id (number) | products : product_id (number) , product_id (number) | product_characteristics : product_id (number) , characteristic_id (number)


Question: How many colors are never used by any product?

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_colors : color_code (text) , color_code (number) | products : color_code (text) , product_id (number)


Question: Count the number of colors that are not used in any products.

ref_characteristic_types : characteristic_type_code (text) , characteristic_type_description (text) | ref_colors : color_code (text) , color_description (text) | ref_product_categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | characteristics : characteristic_id (number) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | products : product_id (number) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | product_characteristics : product_id (number) , characteristic_id (number) , product_characteristic_value (text)

ref_colors : color_code (text) , color_code (number) | products : color_code (text) , product_id (number)


Question: How many events are there?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)


Question: List all the event names by year from the most recent to the oldest.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) | stadium : name (text) , id (number) | event : name (text) , year (text) , id (number)


Question: What is the name of the event that happened in the most recent year?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) | stadium : name (text) , id (number) | event : name (text) , year (text) , id (number)


Question: How many stadiums are there?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)


Question: Find the name of the stadium that has the maximum capacity.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) | stadium : name (text) , capacity (number) , id (number) | event : name (text) , id (number)


Question: Find the names of stadiums whose capacity is smaller than the average capacity.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) | stadium : name (text) , capacity (number) , id (number) | event : name (text) , id (number)


Question: Find the country that has the most stadiums.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)


Question: Which country has at most 3 stadiums listed?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)


Question: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

stadium : country (text) , capacity (number) , id (number)


Question: How many cities have a stadium that was opened before the year of 2006?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

stadium : city (text) , opening_year (number) , id (number)


Question: How many stadiums does each country have?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)


Question: Which countries do not have a stadium that was opened after 2006?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

stadium : country (text) , opening_year (number) , id (number)


Question: How many stadiums are not in country "Russia"?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)


Question: Find the names of all swimmers, sorted by their 100 meter scores in ascending order.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , meter_100 (number) , id (number) | stadium : name (text) , id (number) | event : name (text) , id (number)


Question: How many different countries are all the swimmers from?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : nationality (text) , id (number)


Question: List countries that have more than one swimmer.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : nationality (text) , id (number)


Question: Find all 200 meter and 300 meter results of swimmers with nationality "Australia".

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : meter_200 (text) , meter_300 (text) , nationality (text) , id (number)


Question: Find the names of swimmers who has a result of "win".

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , id (number) | record : id (number) , swimmer_id (number) , result (text) , swimmer_id (number)


Question: What is the name of the stadium which held the most events?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , stadium_id (number) , id (number) | record : id (number) , swimmer_id (number)


Question: Find the name and capacity of the stadium where the event named "World Junior" happened.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , capacity (number) , id (number) , id (number) | event : name (text) , id (number) , stadium_id (number) , id (number) | record : id (number) , swimmer_id (number)


Question: Find the names of stadiums which have never had any event.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , stadium_id (number) , id (number) | record : id (number) , swimmer_id (number)


Question: Find the name of the swimmer who has the most records.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , id (number) | record : id (number) , swimmer_id (number) , swimmer_id (number)


Question: Find the name of the swimmer who has at least 2 records.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , id (number) | record : id (number) , swimmer_id (number) , swimmer_id (number)


Question: Find the name and nationality of the swimmer who has won (i.e., has a result of "win") more than 1 time.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , nationality (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , id (number) | record : id (number) , swimmer_id (number) , result (text) , swimmer_id (number)


Question: Find the names of the swimmers who have no record.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , id (number) | record : id (number) , swimmer_id (number) , swimmer_id (number)


Question: Find the names of the swimmers who have both "win" and "loss" results in the record.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , id (number) | record : id (number) , swimmer_id (number) , result (text) , swimmer_id (number)


Question: Find the names of stadiums that some Australian swimmers have been to.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , nationality (text) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , stadium_id (number) , id (number) | record : id (number) , swimmer_id (number) , event_id (number) , swimmer_id (number)


Question: Find the names of stadiums that the most swimmers have been to.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

swimmer : name (text) , id (number) , id (number) | stadium : name (text) , id (number) , id (number) | event : name (text) , id (number) , stadium_id (number) , id (number) | record : event_id (number) , id (number) , swimmer_id (number)


Question: Find all details for each swimmer.

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)


Question: What is the average capacity of the stadiums that were opened in year 2005?

swimmer : id (number) , name (text) , nationality (text) , meter_100 (number) , meter_200 (text) , meter_300 (text) , meter_400 (text) , meter_500 (text) , meter_600 (text) , meter_700 (text) , time (text) | stadium : id (number) , name (text) , capacity (number) , city (text) , country (text) , opening_year (number) | event : id (number) , name (text) , stadium_id (number) , year (text) | record : id (number) , result (text) , swimmer_id (number) , event_id (number)

stadium : capacity (number) , opening_year (number) , id (number)


Question: How many railways are there?

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

train : from (text) , train_id (number) | railway : railway (text) , railway_id (number)


Question: List the builders of railways in ascending alphabetical order.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : builder (text) , railway (text) , railway_id (number) | train : from (text) , train_id (number)


Question: List the wheels and locations of the railways.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : wheels (text) , location (text) , railway (text) , railway_id (number) | train : from (text) , train_id (number)


Question: What is the maximum level of managers in countries that are not "Australia"?

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

manager : level (number) , country (text) , manager_id (number) | train : from (text) , train_id (number)


Question: What is the average age for all managers?

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

manager : age (number) , manager_id (number) | train : from (text) , train_id (number)


Question: What are the names of managers in ascending order of level?

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

train : name (text) , from (text) , train_id (number) | manager : name (text) , level (number) , manager_id (number)


Question: What are the names and arrival times of trains?

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

train : name (text) , arrival (text) , from (text) , train_id (number) | manager : name (text) , manager_id (number)


Question: What is the name of the oldest manager?

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

train : name (text) , from (text) , train_id (number) | manager : name (text) , age (number) , manager_id (number)


Question: Show the names of trains and locations of railways they are in.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

train : name (text) , from (text) , railway_id (number) , train_id (number) | manager : name (text) , manager_id (number) | railway : location (text) , railway (text) , railway_id (number) , railway_id (number) | railway_manage : railway_id (number) , railway_id (number)


Question: Show the builder of railways associated with the trains named "Andaman Exp".

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : builder (text) , railway (text) , railway_id (number) , railway_id (number) | train : from (text) , railway_id (number) , name (text) , train_id (number) | railway_manage : railway_id (number) , railway_id (number) | manager : name (text) , manager_id (number)


Question: Show id and location of railways that are associated with more than one train.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : railway_id (number) , location (text) , railway (text) , railway_id (number) | train : railway_id (number) , from (text) , train_id (number) | railway_manage : railway_id (number) , railway_id (number)


Question: Show the id and builder of the railway that are associated with the most trains.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : railway_id (number) , builder (text) , railway (text) , railway_id (number) | train : railway_id (number) , from (text) , train_id (number) | railway_manage : railway_id (number) , railway_id (number)


Question: Show different builders of railways, along with the corresponding number of railways using each builder.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : builder (text) , railway (text) , railway_id (number) | train : from (text) , train_id (number)


Question: Show the most common builder of railways.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : builder (text) , railway (text) , railway_id (number) | train : from (text) , train_id (number)


Question: Show different locations of railways along with the corresponding number of railways at each location.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : location (text) , railway (text) , railway_id (number) | train : from (text) , train_id (number)


Question: Show the locations that have more than one railways.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : location (text) , railway (text) , railway_id (number) | train : from (text) , train_id (number)


Question: List the object number of railways that do not have any trains.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

railway : objectnumber (text) , railway (text) , railway_id (number) , railway_id (number) | train : from (text) , railway_id (number) , train_id (number) | railway_manage : railway_id (number) , railway_id (number)


Question: Show the countries that have both managers of age above 50 and managers of age below 46.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

manager : country (text) , age (number) , manager_id (number) | train : from (text) , train_id (number)


Question: Show the distinct countries of managers.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

manager : country (text) , manager_id (number) | train : from (text) , train_id (number)


Question: Show the working years of managers in descending order of their level.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

manager : working_year_starts (text) , level (number) , manager_id (number) | train : from (text) , train_id (number)


Question: Show the countries that have managers of age above 50 or below 46.

railway : railway_id (number) , railway (text) , builder (text) , built (text) , wheels (text) , location (text) , objectnumber (text) | train : train_id (number) , train_num (text) , name (text) , from (text) , arrival (text) , railway_id (number) | manager : manager_id (number) , name (text) , country (text) , working_year_starts (text) , age (number) , level (number) | railway_manage : railway_id (number) , manager_id (number) , from_year (text)

manager : country (text) , age (number) , manager_id (number) | train : from (text) , train_id (number)


Question: How many addresses are there in country USA?

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

addresses : country (text) , address_id (number)


Question: Show all distinct cities in the address record.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

addresses : city (text) , address_id (number)


Question: Show each state and the number of addresses in each state.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

addresses : state_province_county (text) , address_id (number)


Question: Show names and phones of customers who do not have address information.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

customers : customer_name (text) , customer_phone (text) , customer_id (number) , customer_id (number) | contacts : customer_id (number) , contact_id (number) | customer_address_history : customer_id (number) | customer_orders : customer_id (number) , order_id (number)


Question: Show the name of the customer who has the most orders.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

customers : customer_name (text) , customer_id (number) , customer_id (number) | contacts : customer_id (number) , contact_id (number) | customer_address_history : customer_id (number) | customer_orders : customer_id (number) , order_id (number)


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

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

products : product_type_code (text) , product_id (number)


Question: Show the names of customers who have both an order in completed status and an order in part status.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

customers : customer_name (text) , customer_id (number) , customer_id (number) | contacts : customer_id (number) , contact_id (number) | customer_address_history : customer_id (number) | customer_orders : customer_id (number) , order_status_code (text) , order_id (number)


Question: Show the name, phone, and payment method code for all customers in descending order of customer number.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

customers : customer_name (text) , customer_phone (text) , payment_method_code (text) , customer_number (text) , customer_id (number)


Question: Show the product name and total order quantity for each product.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

products : product_name (text) , product_id (number) , product_id (number) | order_items : order_quantity (text) , product_id (number)


Question: Show the minimum, maximum, average price for all products.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

products : product_price (number) , product_id (number)


Question: How many products have a price higher than the average?

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

products : product_price (number) , product_id (number)


Question: Show the customer name, customer address city, date from, and date to for each customer address history.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

customers : customer_name (text) , customer_id (number) , customer_id (number) | addresses : city (text) , address_id (number) , address_id (number) | customer_address_history : date_from (time) , date_to (time) , customer_id (number) , address_id (number) | contacts : customer_id (number) , contact_id (number) | customer_orders : customer_id (number) , order_id (number)


Question: Show the names of customers who use Credit Card payment method and have more than 2 orders.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

customers : customer_name (text) , customer_id (number) , payment_method_code (text) , customer_id (number) | contacts : customer_id (number) , contact_id (number) | customer_address_history : customer_id (number) | customer_orders : customer_id (number) , order_id (number)


Question: What are the name and phone of the customer with the most ordered product quantity?

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

customers : customer_name (text) , customer_phone (text) , customer_id (number) , customer_id (number) | contacts : customer_id (number) , contact_id (number) | customer_address_history : customer_id (number) | customer_orders : customer_id (number) , order_id (number) , order_id (number) | order_items : order_id (number) , order_quantity (text)


Question: Show the product type and name for the products with price higher than 1000 or lower than 500.

addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | customers : customer_id (number) , payment_method_code (text) , customer_number (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | contacts : contact_id (number) , customer_id (number) , gender (text) , first_name (text) , last_name (text) , contact_phone (text) | customer_address_history : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_date (time) , order_status_code (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , order_quantity (text)

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


Question: Find the name of dorms only for female (F gender).

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


Question: What are the names of the all-female dorms?

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


Question: Find the name of dorms that can accommodate more than 300 students.

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

dorm : dorm_name (text) , student_capacity (number)


Question: What are the names of all the dorms that can accomdate more than 300 students?

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

dorm : dorm_name (text) , student_capacity (number)


Question: How many female students (sex is F) whose age is below 25?

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

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


Question: How many girl students who are younger than 25?

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

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


Question: Find the first name of students who is older than 20.

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

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


Question: What are the first names of all students who are older than 20?

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

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


Question: Find the first name of students living in city PHL whose age is between 20 and 25.

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

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


Question: What is the first name of the students who are in age 20 to 25 and living in PHL city?

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

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


Question: How many dorms are there?

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


Question: How many dorms are in the database?

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


Question: Find the number of distinct amenities.

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


Question: How many diffrent dorm amenities are there?

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


Question: Find the total capacity of all dorms.

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


Question: What is the total student capacity of all dorms?

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


Question: How many students are there?

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


Question: How many students exist?

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


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

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

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


Question: What is the average age for each city and what are those cities?

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

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


Question: Find the average and total capacity of dorms for the students with gender X.

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

dorm : student_capacity (number) , gender (text)


Question: What is the average and total capacity for all dorms who are of gender X?

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

dorm : student_capacity (number) , gender (text)


Question: Find the number of dorms that have some amenity.

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

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


Question: How many dorms have amenities?

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

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


Question: Find the name of dorms that do not have any amenity

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

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


Question: What are the names of all the dorms that don't have any amenities?

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

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


Question: Find the number of distinct gender for dorms.

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


Question: How many different genders are there in the dorms?

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


Question: Find the capacity and gender type of the dorm whose name has substring ‘Donor’.

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

dorm : student_capacity (number) , gender (text) , dorm_name (text)


Question: What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?

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

dorm : student_capacity (number) , gender (text) , dorm_name (text)


Question: Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.

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

dorm : dorm_name (text) , gender (text) , student_capacity (number)


Question: What are the names and types of the dorms that have a capacity greater than 300 or less than 100?

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

dorm : dorm_name (text) , gender (text) , student_capacity (number)


Question: Find the numbers of different majors and cities.

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

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


Question: How many different majors are there and how many different city codes are there for each student?

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

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


Question: Find the name of dorms which have both TV Lounge and Study Room as amenities.

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

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