db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
twitter_1
select max(followers) , sum(followers) from user_profiles
Question: find the maximum and total number of followers of all users. | Tables: follows -> f1, f2. tweets -> id, uid, text, createdate. user_profiles -> uid, name, email, partitionid, followers. | Joins: follows.f2 = user_profiles.uid, follows.f1 = user_profiles.uid, tweets.uid = user_profiles.uid,
find the maximum and total number of followers of all users.
product_catalog
select distinct(catalog_entry_name) from catalog_contents
Question: find the names of all the catalog entries. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the names of all the catalog entries.
product_catalog
select distinct(catalog_entry_name) from catalog_contents
Question: what are all the catalog entry names? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are all the catalog entry names?
product_catalog
select attribute_data_type from attribute_definitions group by attribute_data_type having count(*) > 3
Question: find the list of attribute data types possessed by more than 3 attribute definitions. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the list of attribute data types possessed by more than 3 attribute definitions.
product_catalog
select attribute_data_type from attribute_definitions group by attribute_data_type having count(*) > 3
Question: what are the attribute data types with more than 3 attribute definitions? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are the attribute data types with more than 3 attribute definitions?
product_catalog
select attribute_data_type from attribute_definitions where attribute_name = 'green'
Question: what is the attribute data type of the attribute with name 'green'? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what is the attribute data type of the attribute with name 'green'?
product_catalog
select attribute_data_type from attribute_definitions where attribute_name = 'green'
Question: find the attribute data type for the attribute named 'green'. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the attribute data type for the attribute named 'green'.
product_catalog
select catalog_level_name , catalog_level_number from catalog_structure where catalog_level_number between 5 and 10
Question: find the name and level of catalog structure with level between 5 and 10. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the name and level of catalog structure with level between 5 and 10.
product_catalog
select catalog_level_name , catalog_level_number from catalog_structure where catalog_level_number between 5 and 10
Question: what are the name and level of catalog structure with level number between 5 and 10 | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are the name and level of catalog structure with level number between 5 and 10
product_catalog
select distinct(catalog_publisher) from catalogs where catalog_publisher like '%murray%'
Question: find all the catalog publishers whose name contains 'murray' | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find all the catalog publishers whose name contains 'murray'
product_catalog
select distinct(catalog_publisher) from catalogs where catalog_publisher like '%murray%'
Question: which catalog publishers have substring 'murray' in their names? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which catalog publishers have substring 'murray' in their names?
product_catalog
select catalog_publisher from catalogs group by catalog_publisher order by count(*) desc limit 1
Question: which catalog publisher has published the most catalogs? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which catalog publisher has published the most catalogs?
product_catalog
select catalog_publisher from catalogs group by catalog_publisher order by count(*) desc limit 1
Question: find the catalog publisher that has the most catalogs. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the catalog publisher that has the most catalogs.
product_catalog
select t1.catalog_name , t1.date_of_publication from catalogs as t1 join catalog_structure as t2 on t1.catalog_id = t2.catalog_id where catalog_level_number > 5
Question: find the names and publication dates of all catalogs that have catalog level number greater than 5. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the names and publication dates of all catalogs that have catalog level number greater than 5.
product_catalog
select t1.catalog_name , t1.date_of_publication from catalogs as t1 join catalog_structure as t2 on t1.catalog_id = t2.catalog_id where catalog_level_number > 5
Question: what are the name and publication date of the catalogs with catalog level number above 5? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are the name and publication date of the catalogs with catalog level number above 5?
product_catalog
select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.attribute_value = (select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count(*) desc limit 1)
Question: what are the entry names of catalog with the attribute possessed by most entries. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are the entry names of catalog with the attribute possessed by most entries.
product_catalog
select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.attribute_value = (select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count(*) desc limit 1)
Question: find the entry names of the catalog with the attribute that have the most entries. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the entry names of the catalog with the attribute that have the most entries.
product_catalog
select catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1
Question: what is the entry name of the most expensive catalog (in usd)? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what is the entry name of the most expensive catalog (in usd)?
product_catalog
select catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1
Question: find the entry name of the catalog with the highest price (in usd). | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the entry name of the catalog with the highest price (in usd).
product_catalog
select t2.catalog_level_name from catalog_contents as t1 join catalog_structure as t2 on t1.catalog_level_number = t2.catalog_level_number order by t1.price_in_dollars limit 1
Question: what is the level name of the cheapest catalog (in usd)? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what is the level name of the cheapest catalog (in usd)?
product_catalog
select t2.catalog_level_name from catalog_contents as t1 join catalog_structure as t2 on t1.catalog_level_number = t2.catalog_level_number order by t1.price_in_dollars limit 1
Question: find the level name of the catalog with the lowest price (in usd). | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the level name of the catalog with the lowest price (in usd).
product_catalog
select avg(price_in_euros) , min(price_in_euros) from catalog_contents
Question: what are the average and minimum price (in euro) of all products? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are the average and minimum price (in euro) of all products?
product_catalog
select avg(price_in_euros) , min(price_in_euros) from catalog_contents
Question: give me the average and minimum price (in euro) of the products. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
give me the average and minimum price (in euro) of the products.
product_catalog
select catalog_entry_name from catalog_contents order by height desc limit 1
Question: what is the product with the highest height? give me the catalog entry name. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what is the product with the highest height? give me the catalog entry name.
product_catalog
select catalog_entry_name from catalog_contents order by height desc limit 1
Question: which catalog content has the highest height? give me the catalog entry name. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which catalog content has the highest height? give me the catalog entry name.
product_catalog
select catalog_entry_name from catalog_contents order by capacity asc limit 1
Question: find the name of the product that has the smallest capacity. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the name of the product that has the smallest capacity.
product_catalog
select catalog_entry_name from catalog_contents order by capacity asc limit 1
Question: which catalog content has the smallest capacity? return the catalog entry name. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which catalog content has the smallest capacity? return the catalog entry name.
product_catalog
select catalog_entry_name from catalog_contents where product_stock_number like '2%'
Question: find the names of all the products whose stock number starts with '2'. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the names of all the products whose stock number starts with '2'.
product_catalog
select catalog_entry_name from catalog_contents where product_stock_number like '2%'
Question: which catalog contents have a product stock number that starts from '2'? show the catalog entry names. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which catalog contents have a product stock number that starts from '2'? show the catalog entry names.
product_catalog
select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.catalog_level_number = '8'
Question: find the names of catalog entries with level number 8. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the names of catalog entries with level number 8.
product_catalog
select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.catalog_level_number = '8'
Question: what are the names of catalog entries with level number 8? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are the names of catalog entries with level number 8?
product_catalog
select catalog_entry_name from catalog_contents where length < 3 or width > 5
Question: find the names of the products with length smaller than 3 or height greater than 5. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the names of the products with length smaller than 3 or height greater than 5.
product_catalog
select catalog_entry_name from catalog_contents where length < 3 or width > 5
Question: which catalog contents have length below 3 or above 5? find the catalog entry names. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which catalog contents have length below 3 or above 5? find the catalog entry names.
product_catalog
select t1.attribute_name , t1.attribute_id from attribute_definitions as t1 join catalog_contents_additional_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.attribute_value = 0
Question: find the name and attribute id of the attribute definitions with attribute value 0. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the name and attribute id of the attribute definitions with attribute value 0.
product_catalog
select t1.attribute_name , t1.attribute_id from attribute_definitions as t1 join catalog_contents_additional_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.attribute_value = 0
Question: which attribute definitions have attribute value 0? give me the attribute name and attribute id. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which attribute definitions have attribute value 0? give me the attribute name and attribute id.
product_catalog
select catalog_entry_name , capacity from catalog_contents where price_in_dollars > 700
Question: find the name and capacity of products with price greater than 700 (in usd). | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the name and capacity of products with price greater than 700 (in usd).
product_catalog
select catalog_entry_name , capacity from catalog_contents where price_in_dollars > 700
Question: which catalog contents has price above 700 dollars? show their catalog entry names and capacities. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
which catalog contents has price above 700 dollars? show their catalog entry names and capacities.
product_catalog
select date_of_latest_revision from catalogs group by date_of_latest_revision having count(*) > 1
Question: find the dates on which more than one revisions were made. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the dates on which more than one revisions were made.
product_catalog
select date_of_latest_revision from catalogs group by date_of_latest_revision having count(*) > 1
Question: on which days more than one revisions were made on catalogs. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
on which days more than one revisions were made on catalogs.
product_catalog
select count(*) from catalog_contents
Question: how many products are there in the records? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
how many products are there in the records?
product_catalog
select count(*) from catalog_contents
Question: find the total number of catalog contents. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
find the total number of catalog contents.
product_catalog
select catalog_entry_name from catalog_contents where next_entry_id > 8
Question: name all the products with next entry id greater than 8. | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
name all the products with next entry id greater than 8.
product_catalog
select catalog_entry_name from catalog_contents where next_entry_id > 8
Question: what are the catalog entry names of the products with next entry id above 8? | Tables: Attribute_Definitions -> attribute_id, attribute_name, attribute_data_type. Catalogs -> catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. Catalog_Structure -> catalog_level_number, catalog_id, catalog_level_name. Catalog_Contents -> catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. Catalog_Contents_Additional_Attributes -> catalog_entry_id, catalog_level_number, attribute_id, attribute_value. | Joins: Catalog_Structure.catalog_id = Catalogs.catalog_id, Catalog_Contents.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_level_number = Catalog_Structure.catalog_level_number, Catalog_Contents_Additional_Attributes.catalog_entry_id = Catalog_Contents.catalog_entry_id,
what are the catalog entry names of the products with next entry id above 8?
flight_1
select count(*) from aircraft
Question: how many aircrafts do we have? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
how many aircrafts do we have?
flight_1
select count(*) from aircraft
Question: how many aircrafts exist in the database? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
how many aircrafts exist in the database?
flight_1
select name , distance from aircraft
Question: show name and distance for all aircrafts. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show name and distance for all aircrafts.
flight_1
select name , distance from aircraft
Question: what are the names and distances for all airplanes? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the names and distances for all airplanes?
flight_1
select aid from aircraft where distance > 1000
Question: show ids for all aircrafts with more than 1000 distance. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show ids for all aircrafts with more than 1000 distance.
flight_1
select aid from aircraft where distance > 1000
Question: what are the ids of all aircrafts that can cover a distance of more than 1000? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the ids of all aircrafts that can cover a distance of more than 1000?
flight_1
select count(*) from aircraft where distance between 1000 and 5000
Question: how many aircrafts have distance between 1000 and 5000? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
how many aircrafts have distance between 1000 and 5000?
flight_1
select count(*) from aircraft where distance between 1000 and 5000
Question: what is the count of aircrafts that have a distance between 1000 and 5000? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the count of aircrafts that have a distance between 1000 and 5000?
flight_1
select name , distance from aircraft where aid = 12
Question: what is the name and distance for aircraft with id 12? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the name and distance for aircraft with id 12?
flight_1
select name , distance from aircraft where aid = 12
Question: what is the name and distance for the aircraft that has an id of 12? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the name and distance for the aircraft that has an id of 12?
flight_1
select min(distance) , avg(distance) , max(distance) from aircraft
Question: what is the minimum, average, and maximum distance of all aircrafts. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the minimum, average, and maximum distance of all aircrafts.
flight_1
select min(distance) , avg(distance) , max(distance) from aircraft
Question: return the minimum, average and maximum distances traveled across all aircrafts. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
return the minimum, average and maximum distances traveled across all aircrafts.
flight_1
select aid , name from aircraft order by distance desc limit 1
Question: show the id and name of the aircraft with the maximum distance. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show the id and name of the aircraft with the maximum distance.
flight_1
select aid , name from aircraft order by distance desc limit 1
Question: what is the id and name of the aircraft that can cover the maximum distance? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the id and name of the aircraft that can cover the maximum distance?
flight_1
select name from aircraft order by distance limit 3
Question: show the name of aircrafts with top three lowest distances. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show the name of aircrafts with top three lowest distances.
flight_1
select name from aircraft order by distance limit 3
Question: what are the aircrafts with top 3 shortest lengthes? list their names. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the aircrafts with top 3 shortest lengthes? list their names.
flight_1
select name from aircraft where distance > (select avg(distance) from aircraft)
Question: show names for all aircrafts with distances more than the average. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show names for all aircrafts with distances more than the average.
flight_1
select name from aircraft where distance > (select avg(distance) from aircraft)
Question: what are the names of all aircrafts that can cover more distances than average? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the names of all aircrafts that can cover more distances than average?
flight_1
select count(*) from employee
Question: how many employees do we have? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
how many employees do we have?
flight_1
select count(*) from employee
Question: what is the number of employees? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the number of employees?
flight_1
select name , salary from employee order by salary
Question: show name and salary for all employees sorted by salary. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show name and salary for all employees sorted by salary.
flight_1
select name , salary from employee order by salary
Question: what is the name and salary of all employees in order of salary? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the name and salary of all employees in order of salary?
flight_1
select eid from employee where salary > 100000
Question: show ids for all employees with at least 100000 salary. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show ids for all employees with at least 100000 salary.
flight_1
select eid from employee where salary > 100000
Question: what is the id of every employee who has at least a salary of 100000? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the id of every employee who has at least a salary of 100000?
flight_1
select count(*) from employee where salary between 100000 and 200000
Question: how many employees have salary between 100000 and 200000? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
how many employees have salary between 100000 and 200000?
flight_1
select count(*) from employee where salary between 100000 and 200000
Question: what is the number of employees that have a salary between 100000 and 200000? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the number of employees that have a salary between 100000 and 200000?
flight_1
select name , salary from employee where eid = 242518965
Question: what is the name and salary for employee with id 242518965? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the name and salary for employee with id 242518965?
flight_1
select name , salary from employee where eid = 242518965
Question: what is the name and salary of the employee with the id 242518965? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the name and salary of the employee with the id 242518965?
flight_1
select avg(salary) , max(salary) from employee
Question: what is average and maximum salary of all employees. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is average and maximum salary of all employees.
flight_1
select avg(salary) , max(salary) from employee
Question: what is the average and largest salary of all employees? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the average and largest salary of all employees?
flight_1
select eid , name from employee order by salary desc limit 1
Question: show the id and name of the employee with maximum salary. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show the id and name of the employee with maximum salary.
flight_1
select eid , name from employee order by salary desc limit 1
Question: what is the id and name of the employee with the highest salary? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the id and name of the employee with the highest salary?
flight_1
select name from employee order by salary asc limit 3
Question: show the name of employees with three lowest salaries. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show the name of employees with three lowest salaries.
flight_1
select name from employee order by salary asc limit 3
Question: what is the name of the 3 employees who get paid the least? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the name of the 3 employees who get paid the least?
flight_1
select name from employee where salary > (select avg(salary) from employee)
Question: show names for all employees with salary more than the average. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show names for all employees with salary more than the average.
flight_1
select name from employee where salary > (select avg(salary) from employee)
Question: what are the names of all employees who have a salary higher than average? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the names of all employees who have a salary higher than average?
flight_1
select eid , salary from employee where name = 'mark young'
Question: show the id and salary of mark young. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show the id and salary of mark young.
flight_1
select eid , salary from employee where name = 'mark young'
Question: what is the id and salary of the employee named mark young? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the id and salary of the employee named mark young?
flight_1
select count(*) from flight
Question: how many flights do we have? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
how many flights do we have?
flight_1
select count(*) from flight
Question: what is the number of flights? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the number of flights?
flight_1
select flno , origin , destination from flight order by origin
Question: show flight number, origin, destination of all flights in the alphabetical order of the departure cities. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show flight number, origin, destination of all flights in the alphabetical order of the departure cities.
flight_1
select flno , origin , destination from flight order by origin
Question: what is the flight number, origin, and destination for all flights in alphabetical order by departure cities? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the flight number, origin, and destination for all flights in alphabetical order by departure cities?
flight_1
select flno from flight where origin = 'los angeles'
Question: show all flight number from los angeles. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show all flight number from los angeles.
flight_1
select flno from flight where origin = 'los angeles'
Question: what are the numbers of all flights coming from los angeles? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the numbers of all flights coming from los angeles?
flight_1
select origin from flight where destination = 'honolulu'
Question: show origins of all flights with destination honolulu. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show origins of all flights with destination honolulu.
flight_1
select origin from flight where destination = 'honolulu'
Question: what are the origins of all flights that are headed to honolulu? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the origins of all flights that are headed to honolulu?
flight_1
select departure_date , arrival_date from flight where origin = 'los angeles' and destination = 'honolulu'
Question: show me the departure date and arrival date for all flights from los angeles to honolulu. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show me the departure date and arrival date for all flights from los angeles to honolulu.
flight_1
select departure_date , arrival_date from flight where origin = 'los angeles' and destination = 'honolulu'
Question: what are the departure and arrival dates of all flights from la to honolulu? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the departure and arrival dates of all flights from la to honolulu?
flight_1
select flno from flight where distance > 2000
Question: show flight number for all flights with more than 2000 distance. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show flight number for all flights with more than 2000 distance.
flight_1
select flno from flight where distance > 2000
Question: what are the numbers of all flights that can cover a distance of more than 2000? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what are the numbers of all flights that can cover a distance of more than 2000?
flight_1
select avg(price) from flight where origin = 'los angeles' and destination = 'honolulu'
Question: what is the average price for flights from los angeles to honolulu. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the average price for flights from los angeles to honolulu.
flight_1
select avg(price) from flight where origin = 'los angeles' and destination = 'honolulu'
Question: what is the average price for flights from la to honolulu? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the average price for flights from la to honolulu?
flight_1
select origin , destination from flight where price > 300
Question: show origin and destination for flights with price higher than 300. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show origin and destination for flights with price higher than 300.
flight_1
select origin , destination from flight where price > 300
Question: what is the origin and destination for all flights whose price is higher than 300? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the origin and destination for all flights whose price is higher than 300?
flight_1
select flno , distance from flight order by price desc limit 1
Question: show the flight number and distance of the flight with maximum price. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show the flight number and distance of the flight with maximum price.
flight_1
select flno , distance from flight order by price desc limit 1
Question: what is the flight number and its distance for the one with the maximum price? | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
what is the flight number and its distance for the one with the maximum price?
flight_1
select flno from flight order by distance asc limit 3
Question: show the flight number of flights with three lowest distances. | Tables: flight -> flno, origin, destination, distance, departure_date, arrival_date, price, aid. aircraft -> aid, name, distance. employee -> eid, name, salary. certificate -> eid, aid. | Joins: flight.aid = aircraft.aid, certificate.aid = aircraft.aid, certificate.eid = employee.eid,
show the flight number of flights with three lowest distances.