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. Cat... | 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_... | 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_... | 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, cata... | 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... | 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, cata... | 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, cata... | 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_nu... | 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, catal... | 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, c... | 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_l... | 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_lev... | 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 -> ... | 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_le... | 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_numb... | 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_num... | 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, cat... | 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... | 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_l... | 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,... | 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, ... | 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, c... | 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, c... | 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, ... | 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, catal... | 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... | 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... | 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 ... | 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_lev... | 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... | 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_nu... | 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_n... | 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_nu... | 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 -> cat... | 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, c... | 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 -> c... | 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... | 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, catal... | 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. Ca... | 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. Cat... | 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_l... | 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, c... | 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 = emplo... | 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.... | 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.... | 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, ce... | 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.ai... | 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, certifi... | 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... | 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... | 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,... | 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 =... | 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 =... | 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, certi... | 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 = airc... | 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, certifica... | 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... | 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... | 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 = a... | 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, certif... | 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 = emplo... | 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 = emp... | 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.ai... | 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 = air... | 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... | 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... | 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.a... | 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, certific... | 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... | 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 = a... | 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, c... | 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.ai... | 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.a... | 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 = air... | 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,... | 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... | 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 = airc... | 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... | 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 ... | 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... | 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 = employe... | 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 = emplo... | 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.... | 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: fli... | 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.e... | 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 = aircraf... | 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,... | 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 = air... | 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.a... | 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, certifica... | 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 = air... | 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, certi... | 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 = ... | 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.... | 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 = ... | 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, cer... | 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 ... | 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, certifi... | 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 = aircr... | show the flight number of flights with three lowest distances. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.