Question: Find the names of the products with length smaller than 3 or height greater than 5.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalog_contents : catalog_entry_name (text) , length (text) , width (text)


Question: Which catalog contents have length below 3 or above 5? Find the catalog entry names.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalog_contents : catalog_entry_name (text) , length (text) , width (text)


Question: Find the name and attribute ID of the attribute definitions with attribute value 0.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

attribute_definitions : attribute_name (text) , attribute_id (number) | catalog_contents_additional_attributes : attribute_id (number) , attribute_value (text)


Question: Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

attribute_definitions : attribute_name (text) , attribute_id (number) | catalog_contents_additional_attributes : attribute_id (number) , attribute_value (text)


Question: Find the name and capacity of products with price greater than 700 (in USD).

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalog_contents : catalog_entry_name (text) , capacity (text) , price_in_dollars (number)


Question: Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalog_contents : catalog_entry_name (text) , capacity (text) , price_in_dollars (number)


Question: Find the dates on which more than one revisions were made.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalogs : date_of_latest_revision (time) , catalog_id (number)


Question: On which days more than one revisions were made on catalogs.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalogs : date_of_latest_revision (time) , catalog_id (number)


Question: How many products are there in the records?

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)


Question: Find the total number of catalog contents.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)


Question: Name all the products with next entry ID greater than 8.

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalog_contents : catalog_entry_name (text) , next_entry_id (number)


Question: What are the catalog entry names of the products with next entry ID above 8?

attribute_definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | catalog_structure : catalog_level_number (number) , catalog_id (number) , catalog_level_name (text) | catalog_contents : catalog_entry_id (number) , catalog_level_number (number) , parent_entry_id (number) , previous_entry_id (number) , next_entry_id (number) , catalog_entry_name (text) , product_stock_number (text) , price_in_dollars (number) , price_in_euros (number) , price_in_pounds (number) , capacity (text) , length (text) , height (text) , width (text) | catalog_contents_additional_attributes : catalog_entry_id (number) , catalog_level_number (number) , attribute_id (number) , attribute_value (text)

catalog_contents : catalog_entry_name (text) , next_entry_id (number)


Question: How many aircrafts do we have?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: How many aircrafts exist in the database?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show name and distance for all aircrafts.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number)


Question: What are the names and distances for all airplanes?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number)


Question: Show ids for all aircrafts with more than 1000 distance.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : aid (number) , distance (number)


Question: What are the ids of all aircrafts that can cover a distance of more than 1000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : aid (number) , distance (number)


Question: How many aircrafts have distance between 1000 and 5000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : distance (number) , aid (number)


Question: What is the count of aircrafts that have a distance between 1000 and 5000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : distance (number) , aid (number)


Question: What is the name and distance for aircraft with id 12?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number) , aid (number)


Question: What is the name and distance for the aircraft that has an id of 12?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number) , aid (number)


Question: What is the minimum, average, and maximum distance of all aircrafts.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Return the minimum, average and maximum distances traveled across all aircrafts.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show the id and name of the aircraft with the maximum distance.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What is the id and name of the aircraft that can cover the maximum distance?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show the name of aircrafts with top three lowest distances.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number)


Question: What are the aircrafts with top 3 shortest lengthes? List their names.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number)


Question: Show names for all aircrafts with distances more than the average.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number)


Question: What are the names of all aircrafts that can cover more distances than average?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , distance (number)


Question: How many employees do we have?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What is the number of employees?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show name and salary for all employees sorted by salary.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number)


Question: What is the name and salary of all employees in order of salary?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number)


Question: Show ids for all employees with at least 100000 salary.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : eid (number) , salary (number)


Question: What is the id of every employee who has at least a salary of  100000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : eid (number) , salary (number)


Question: How many employees have salary between 100000 and 200000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : salary (number) , eid (number)


Question: What is the number of employees that have a salary between 100000 and 200000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : salary (number) , eid (number)


Question: What is the name and salary for employee with id 242518965?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number) , eid (number)


Question: What is the name and salary of the employee with the id 242518965?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number) , eid (number)


Question: What is average and maximum salary of all employees.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What is the average and largest salary of all employees?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show the id and name of the employee with maximum salary.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What is the id and name of the employee with the highest salary?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show the name of employees with three lowest salaries.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number)


Question: What is the name of the 3 employees who get paid the least?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number)


Question: Show names for all employees with salary more than the average.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number)


Question: What are the names of all employees who have a salary higher than average?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number)


Question: Show the id and salary of Mark Young.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : eid (number) , salary (number) , name (text)


Question: What is the id and salary of the employee named Mark Young?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : eid (number) , salary (number) , name (text)


Question: How many flights do we have?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What is the number of flights?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show all flight number from Los Angeles.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What are the numbers of all flights coming from Los Angeles?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show origins of all flights with destination Honolulu.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : origin (text) , destination (text)


Question: What are the origins of all flights that are headed to Honolulu?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : origin (text) , destination (text)


Question: Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : departure_date (time) , arrival_date (time) , origin (text) , destination (text)


Question: What are the departure and arrival dates of all flights from LA to Honolulu?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : departure_date (time) , arrival_date (time) , origin (text) , destination (text)


Question: Show flight number for all flights with more than 2000 distance.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , distance (number)


Question: What are the numbers of all flights that can cover a distance of more than 2000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , distance (number)


Question: What is the average price for flights from Los Angeles to Honolulu.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : price (number) , origin (text) , destination (text)


Question: What is the average price for flights from LA to Honolulu?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : price (number) , origin (text) , destination (text)


Question: Show origin and destination for flights with price higher than 300.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : origin (text) , destination (text) , price (number)


Question: What is the origin and destination for all flights whose price is higher than 300?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : origin (text) , destination (text) , price (number)


Question: Show the flight number and distance of the flight with maximum price.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , distance (number) , price (number)


Question: What is the flight number and its distance for the one with the maximum price?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , distance (number) , price (number)


Question: Show the flight number of flights with three lowest distances.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , distance (number)


Question: What are the numbers of the shortest flights?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , distance (number)


Question: What is the average distance and average price for flights from Los Angeles.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : distance (number) , price (number) , origin (text)


Question: What is the average distance and price for all flights from LA?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : distance (number) , price (number) , origin (text)


Question: Show all origins and the number of flights from each origin.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: For each origin, how many flights came from there?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show all destinations and the number of flights to each destination.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : destination (text) , flno (number)


Question: What are the destinations and number of flights to each one?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : destination (text) , flno (number)


Question: Which origin has most number of flights?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What place has the most flights coming from there?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Which destination has least number of flights?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : destination (text) , flno (number)


Question: What destination has the fewest number of flights?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : destination (text) , flno (number)


Question: What is the aircraft name for the flight with number 99

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | flight : aid (number) , flno (number)


Question: What is the name of the aircraft that was on flight number 99?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | flight : aid (number) , flno (number)


Question: Show all flight numbers with aircraft Airbus A340-300.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , aid (number) | aircraft : aid (number) , name (text)


Question: What are the flight numbers for the aircraft Airbus A340-300?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

flight : flno (number) , aid (number) | aircraft : aid (number) , name (text)


Question: Show aircraft names and number of flights for each aircraft.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | flight : aid (number) , flno (number)


Question: What is the name of each aircraft and how many flights does each one complete?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | flight : aid (number) , flno (number)


Question: Show names for all aircraft with at least two flights.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | flight : aid (number) , flno (number)


Question: What are the names for all aircrafts with at least 2 flights?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | flight : aid (number) , flno (number)


Question: How many employees have certificate.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: What is the count of distinct employees with certificates?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)


Question: Show ids for all employees who don't have a certificate.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : eid (number) | certificate : eid (number)


Question: What are the ids of all employees that don't have certificates?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : eid (number) | certificate : eid (number)


Question: Show names for all aircrafts of which John Williams has certificates.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: What are the names of all aircrafts that John Williams have certificates to be able to fly?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: Show names for all employees who have certificate of Boeing 737-800.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: What are the names of all employees who have a certificate to fly Boeing 737-800?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: Show names for all employees who do not have certificate of Boeing 737-800.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: What are the names of all employees who are not certified to fly Boeing 737-800s?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: Show the name of aircraft which fewest people have its certificate.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | certificate : aid (number) , eid (number)


Question: What are the names of the aircraft that the least people are certified to fly?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) | certificate : aid (number) , eid (number)


Question: Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) , distance (number) | certificate : aid (number) , eid (number)


Question: What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) , distance (number) | certificate : aid (number) , eid (number)


Question: what is the salary and name of the employee who has the most number of aircraft certificates?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number) , eid (number) | certificate : eid (number)


Question: What is the salaray and name of the employee that is certified to fly the most planes?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

employee : name (text) , salary (number) , eid (number) | certificate : eid (number)


Question: What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) , distance (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: What is the salaray and name of the employee with the most certificates to fly planes more than 5000?

flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number)

aircraft : name (text) , aid (number) , distance (number) | employee : name (text) , eid (number) | certificate : eid (number) , aid (number)


Question: How many allergies are there?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many allergy entries are there?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many different allergy types exist?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many distinct allergies are there?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all allergy types.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the different allergy types?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all allergies and their types.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the allergies and their types?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all allergies with type food.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are all the different food allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What is the type of allergy Cat?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: What is allergy type of a cat allergy?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: How many allergies have type animal?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: How many animal type allergies exist?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: Show all allergy types and the number of allergies in each type.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: What are the allergy types and how many allergies correspond to each one?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: Which allergy type has most number of allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: Which allergy type is most common?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: Which allergy type has least number of allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: Which allergy type is the least common?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text)


Question: How many students are there?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What is the total number of students?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show first name and last name for all students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the full names of all students

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many different advisors are listed?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many advisors are there?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all majors.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the different majors?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all cities where students live.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What cities do students live in?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show first name, last name, age for all female students. Their sex is F.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

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


Question: What are the full names and ages for all female students whose sex is F?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

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


Question: Show student ids for all male students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the student ids for all male students?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many students are age 18?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many students are 18 years old?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all student ids who are older than 20.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the student ids for students over 20 years old?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Which city does the student whose last name is "Kim" live in?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : city_code (text) , lname (text)


Question: Give the city that the student whose family name is Kim lives in.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : city_code (text) , lname (text)


Question: Who is the advisor of student with ID 1004?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : advisor (number) , stuid (number)


Question: Who advises student 1004?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : advisor (number) , stuid (number)


Question: How many students live in HKG or CHI?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : city_code (text) , stuid (number)


Question: Give the number of students living in either HKG or CHI.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : city_code (text) , stuid (number)


Question: Show the minimum, average, and maximum age of all students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What is the minimum, mean, and maximum age across all students?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What is the last name of the youngest student?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Provide the last name of the youngest student.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show the student id of the oldest student.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What student id corresponds to the oldest student?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all majors and corresponding number of students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : major (number) , stuid (number)


Question: How many students are there for each major?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : major (number) , stuid (number)


Question: Which major has most number of students?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : major (number) , stuid (number)


Question: What is the largest major?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : major (number) , stuid (number)


Question: Show all ages and corresponding number of students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How old is each student and how many students are each age?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show the average age for male and female students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the average ages for male and female students?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all cities and corresponding number of students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : city_code (text) , stuid (number)


Question: How many students live in each city?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : city_code (text) , stuid (number)


Question: Show all advisors and corresponding number of students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : advisor (number) , stuid (number)


Question: How many students does each advisor have?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : advisor (number) , stuid (number)


Question: Which advisor has most number of students?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : advisor (number) , stuid (number)


Question: Give the advisor with the most students.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : advisor (number) , stuid (number)


Question: How many students have cat allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many students are affected by cat allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all student IDs who have at least two allergies.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the students ids of students who have more than one allergy?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: What are the student ids of students who don't have any allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

has_allergy : stuid (number) | student : stuid (number)


Question: Which students are unaffected by allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

has_allergy : stuid (number) | student : stuid (number)


Question: How many female students have milk or egg allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

has_allergy : stuid (number) , allergy (text) | student : stuid (number) , sex (text)


Question: How many students who are female are allergic to milk or eggs?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

has_allergy : stuid (number) , allergy (text) | student : stuid (number) , sex (text)


Question: How many students have a food allergy?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergy (text) , allergytype (text) | has_allergy : allergy (text)


Question: How many students are affected by food related allergies?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergy (text) , allergytype (text) | has_allergy : allergy (text)


Question: Which allergy has most number of students affected?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Which allergy is the most common?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all allergies with number of students affected.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: How many students have each different allergy?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)


Question: Show all allergy type with number of students affected.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text) | has_allergy : allergy (text)


Question: How many students are affected by each allergy type?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergytype (text) , allergy (text) | has_allergy : allergy (text)


Question: Find the last name and age of the student who has allergy to both milk and cat.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : lname (text) , age (number) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: What are the last names and ages of the students who are allergic to milk and cat?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : lname (text) , age (number) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergy (text) , allergytype (text) | has_allergy : allergy (text) , stuid (number) | student : stuid (number) , fname (text)


Question: What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

allergy_type : allergy (text) , allergytype (text) | has_allergy : allergy (text) , stuid (number) | student : stuid (number) , fname (text)


Question: Find the first name and gender of the student who has allergy to milk but not cat.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , sex (text) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: What are the first name and gender of the students who have allergy to milk but can put up with cats?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , sex (text) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: Find the average age of the students who have allergies with food and animal types.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : age (number) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: How old are the students with allergies to food and animal types on average?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : age (number) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: List the first and last name of the students who do not have any food type allergy.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , lname (text) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: What is the full name of each student who is not allergic to any type of food.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , lname (text) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: Find the number of male (sex is 'M') students who have some food type allery.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : sex (text) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: How many male students (sex is 'M') are allergic to any type of food?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : sex (text) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: Find the different first names and cities of the students who have allergy to milk or cat.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , city_code (text) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: What are the distinct first names and cities of the students who have allergy either to milk or to cat?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , city_code (text) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: Find the number of students who are older than 18 and do not have allergy to either food or animal.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : age (number) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: How many students are over 18 and do not have allergy to food type or animal type?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : age (number) , stuid (number) | has_allergy : stuid (number) , allergy (text) | allergy_type : allergy (text) , allergytype (text)


Question: Find the first name and major of the students who are not allegry to soy.

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , major (number) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: What are the first name and major of the students who are able to consume soy?

allergy_type : allergy (text) , allergytype (text) | has_allergy : stuid (number) , allergy (text) | student : stuid (number) , lname (text) , fname (text) , age (number) , sex (text) , major (number) , advisor (number) , city_code (text)

student : fname (text) , major (number) , stuid (number) | has_allergy : stuid (number) , allergy (text)


Question: A list of the top 5 countries by number of invoices. List country name and number of invoices.

artists : id (number) , name (text) | sqlite_sequence : name (text) , seq (text) | albums : id (number) , title (text) , artist_id (number) | employees : id (number) , last_name (text) , first_name (text) , title (text) , reports_to (number) , birth_date (time) , hire_date (time) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) | customers : id (number) , first_name (text) , last_name (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (number) , name (text) | invoices : id (number) , customer_id (number) , invoice_date (time) , billing_address (text) , billing_city (text) , billing_state (text) , billing_country (text) , billing_postal_code (text) , total (number) | media_types : id (number) , name (text) | tracks : id (number) , name (text) , album_id (number) , media_type_id (number) , genre_id (number) , composer (text) , milliseconds (number) , bytes (number) , unit_price (number) | invoice_lines : id (number) , invoice_id (number) , track_id (number) , unit_price (number) , quantity (number) | playlists : id (number) , name (text) | playlist_tracks : playlist_id (number) , track_id (number)

invoices : billing_country (text) , id (number)


Question: What are the top 5 countries by number of invoices and how many do they have?

artists : id (number) , name (text) | sqlite_sequence : name (text) , seq (text) | albums : id (number) , title (text) , artist_id (number) | employees : id (number) , last_name (text) , first_name (text) , title (text) , reports_to (number) , birth_date (time) , hire_date (time) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) | customers : id (number) , first_name (text) , last_name (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (number) , name (text) | invoices : id (number) , customer_id (number) , invoice_date (time) , billing_address (text) , billing_city (text) , billing_state (text) , billing_country (text) , billing_postal_code (text) , total (number) | media_types : id (number) , name (text) | tracks : id (number) , name (text) , album_id (number) , media_type_id (number) , genre_id (number) , composer (text) , milliseconds (number) , bytes (number) , unit_price (number) | invoice_lines : id (number) , invoice_id (number) , track_id (number) , unit_price (number) , quantity (number) | playlists : id (number) , name (text) | playlist_tracks : playlist_id (number) , track_id (number)

invoices : billing_country (text) , id (number)


Question: A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.

artists : id (number) , name (text) | sqlite_sequence : name (text) , seq (text) | albums : id (number) , title (text) , artist_id (number) | employees : id (number) , last_name (text) , first_name (text) , title (text) , reports_to (number) , birth_date (time) , hire_date (time) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) | customers : id (number) , first_name (text) , last_name (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (number) , name (text) | invoices : id (number) , customer_id (number) , invoice_date (time) , billing_address (text) , billing_city (text) , billing_state (text) , billing_country (text) , billing_postal_code (text) , total (number) | media_types : id (number) , name (text) | tracks : id (number) , name (text) , album_id (number) , media_type_id (number) , genre_id (number) , composer (text) , milliseconds (number) , bytes (number) , unit_price (number) | invoice_lines : id (number) , invoice_id (number) , track_id (number) , unit_price (number) , quantity (number) | playlists : id (number) , name (text) | playlist_tracks : playlist_id (number) , track_id (number)

invoices : billing_country (text) , total (number)


Question: What are the names of the top 8 countries by total invoice size and what are those sizes?

artists : id (number) , name (text) | sqlite_sequence : name (text) , seq (text) | albums : id (number) , title (text) , artist_id (number) | employees : id (number) , last_name (text) , first_name (text) , title (text) , reports_to (number) , birth_date (time) , hire_date (time) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) | customers : id (number) , first_name (text) , last_name (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (number) , name (text) | invoices : id (number) , customer_id (number) , invoice_date (time) , billing_address (text) , billing_city (text) , billing_state (text) , billing_country (text) , billing_postal_code (text) , total (number) | media_types : id (number) , name (text) | tracks : id (number) , name (text) , album_id (number) , media_type_id (number) , genre_id (number) , composer (text) , milliseconds (number) , bytes (number) , unit_price (number) | invoice_lines : id (number) , invoice_id (number) , track_id (number) , unit_price (number) , quantity (number) | playlists : id (number) , name (text) | playlist_tracks : playlist_id (number) , track_id (number)

invoices : billing_country (text) , total (number)


Question: A list of the top 10 countries by average invoice size. List country name and average invoice size.

artists : id (number) , name (text) | sqlite_sequence : name (text) , seq (text) | albums : id (number) , title (text) , artist_id (number) | employees : id (number) , last_name (text) , first_name (text) , title (text) , reports_to (number) , birth_date (time) , hire_date (time) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) | customers : id (number) , first_name (text) , last_name (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (number) , name (text) | invoices : id (number) , customer_id (number) , invoice_date (time) , billing_address (text) , billing_city (text) , billing_state (text) , billing_country (text) , billing_postal_code (text) , total (number) | media_types : id (number) , name (text) | tracks : id (number) , name (text) , album_id (number) , media_type_id (number) , genre_id (number) , composer (text) , milliseconds (number) , bytes (number) , unit_price (number) | invoice_lines : id (number) , invoice_id (number) , track_id (number) , unit_price (number) , quantity (number) | playlists : id (number) , name (text) | playlist_tracks : playlist_id (number) , track_id (number)

invoices : billing_country (text) , total (number)


Question: What are the names of the countries and average invoice size of the top countries by size?

artists : id (number) , name (text) | sqlite_sequence : name (text) , seq (text) | albums : id (number) , title (text) , artist_id (number) | employees : id (number) , last_name (text) , first_name (text) , title (text) , reports_to (number) , birth_date (time) , hire_date (time) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) | customers : id (number) , first_name (text) , last_name (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postal_code (text) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (number) , name (text) | invoices : id (number) , customer_id (number) , invoice_date (time) , billing_address (text) , billing_city (text) , billing_state (text) , billing_country (text) , billing_postal_code (text) , total (number) | media_types : id (number) , name (text) | tracks : id (number) , name (text) , album_id (number) , media_type_id (number) , genre_id (number) , composer (text) , milliseconds (number) , bytes (number) , unit_price (number) | invoice_lines : id (number) , invoice_id (number) , track_id (number) , unit_price (number) , quantity (number) | playlists : id (number) , name (text) | playlist_tracks : playlist_id (number) , track_id (number)

invoices : billing_country (text) , total (number)