Created
August 7, 2020 20:20
-
-
Save vzhong/07987af4f3eb6ea8a541a5b179bab2ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ours": [ | |
{ | |
"id": "gen:3988", | |
"query": "select last_name from Owners order by last_name", | |
"question": "list all the last name of owners in alphabetical order ." | |
}, | |
{ | |
"id": "gen:17117", | |
"query": "select count ( * ) from Friend", | |
"question": "how many friend are there ?" | |
}, | |
{ | |
"id": "gen:44572", | |
"query": "select T2.vote_id from CONTESTANTS as T1 join VOTES as T2 on T1.contestant_number = T2.contestant_number group by ( T2.vote_id ) order by count ( T1.contestant_number ) desc limit 1", | |
"question": "what is the id of the votes that has been most distinct contestants ?" | |
}, | |
{ | |
"id": "gen:7607", | |
"query": "select name from Highschooler", | |
"question": "what are the name of higher ?" | |
}, | |
{ | |
"id": "gen:7872", | |
"query": "select city_code from Student order by Advisor desc", | |
"question": "what city are in the student order by descending number of advisor ?" | |
}, | |
{ | |
"id": "gen:4544", | |
"query": "select count ( * ) from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model join car_makers as T4 on T3.Maker = T4.Id where T1.Horsepower = '81'", | |
"question": "how many car makers has the horsepower of 81 ?" | |
}, | |
{ | |
"id": "gen:44007", | |
"query": "select T2.Start_from from employee as T1 join hiring as T2 on T1.Employee_ID = T2.Employee_ID where T1.City = 'Bristol'", | |
"question": "what are the starts of hiring who are located in the city of Bristol ?" | |
}, | |
{ | |
"id": "gen:27499", | |
"query": "select count ( * ) from Ref_Template_Types as T1 join Templates as T2 on T1.Template_Type_Code = T2.Template_Type_Code join Documents as T3 on T2.Template_ID = T3.Template_ID where T3.Other_Details = 'None'", | |
"question": "how many template types do the documents with ' details ' None ?" | |
}, | |
{ | |
"id": "gen:47350", | |
"query": "select T2.Name , T4.District from evaluation as T1 join employee as T2 on T1.Employee_ID = T2.Employee_ID join hiring as T3 on T2.Employee_ID = T3.Employee_ID join shop as T4 on T3.Shop_ID = T4.Shop_ID order by T1.Bonus desc limit 1", | |
"question": "find the name and district of the employee that has the highest evaluation bonus ." | |
}, | |
{ | |
"id": "gen:8143", | |
"query": "select T1.cell_number from Owners as T1 join Charges as T2 order by T2.charge_amount desc limit 1", | |
"question": "what is the cell number of the owners with the largest charges amount ?" | |
}, | |
{ | |
"id": "gen:5843", | |
"query": "select min ( grade ) , avg ( grade ) , max ( grade ) from Highschooler", | |
"question": "what is the minimum , average , and maximum grade of all high schooler ?" | |
}, | |
{ | |
"id": "gen:21591", | |
"query": "select T1.Age from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID group by T2.Teacher_ID order by sum ( T2.Grade ) desc limit 1", | |
"question": "what is the age of the teacher who has the most course ?" | |
}, | |
{ | |
"id": "gen:35797", | |
"query": "select count ( Year_awarded ) from evaluation", | |
"question": "how many distinct year are awarded in evaluation ?" | |
}, | |
{ | |
"id": "gen:41203", | |
"query": "select T1.property_type_code from Ref_Property_Types as T1 join Properties as T2 on T1.property_type_code = T2.property_type_code where T2.property_name = 'parc coliseum'", | |
"question": "what is the distinct property types code of the property name ' parc coliseum ?" | |
}, | |
{ | |
"id": "gen:35036", | |
"query": "select T2.Nationality , T3.Weekly_rank , T2.Name from orchestra as T1 join conductor as T2 on T1.Conductor_ID = T2.Conductor_ID join performance as T3 on T1.Orchestra_ID = T3.Orchestra_ID order by T1.Orchestra", | |
"question": "what are the nationality , weekly rank , and name of the conductor , order by the orchestra rank , and the results in ascending alphabet order by the orchestra ?" | |
}, | |
{ | |
"id": "gen:41503", | |
"query": "select avg ( Weekly_Rank ) , max ( Weekly_Rank ) , min ( Weekly_Rank ) from TV_series", | |
"question": "what are the average , maximum , and minimum weekly rank for all tv series ?" | |
}, | |
{ | |
"id": "gen:21078", | |
"query": "select name from Highschooler where grade > ( select avg ( grade ) from Highschooler )", | |
"question": "what are the name of the higher that have a grade higher than the average ?" | |
}, | |
{ | |
"id": "gen:24990", | |
"query": "select T1.id from Cartoon as T1 join TV_Channel as T2 on T1.Channel = T2.id join TV_series as T3 on T2.id = T3.Channel where T3.Share > 6", | |
"question": "what are the ids of all cartoon that have a series share greater than 6 ?" | |
}, | |
{ | |
"id": "gen:21683", | |
"query": "select Nationality from people where People_ID = '7'", | |
"question": "what are the nationality of people with id 7 ' ?" | |
}, | |
{ | |
"id": "gen:11293", | |
"query": "select property_id , feature_id from Other_Property_Features", | |
"question": "what are the distinct ids and property features ? list the property features id and their property features ." | |
}, | |
{ | |
"id": "gen:49818", | |
"query": "select T2.Citizenship from song as T1 join singer as T2 on T1.Singer_ID = T2.Singer_ID group by T2.Citizenship order by count ( * ) desc limit 1", | |
"question": "what is the citizenship of the most popular singer ?" | |
}, | |
{ | |
"id": "gen:43848", | |
"query": "select T2.Make , T6.Continent from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model join car_makers as T4 on T3.Maker = T4.Id join countries as T5 on T4.Country = T5.CountryId join continents as T6 on T5.Continent = T6.ContId order by T1.Year desc limit 1", | |
"question": "what is the make and continent of the car that was the most recent year ?" | |
}, | |
{ | |
"id": "gen:41093", | |
"query": "select result from battle where bulgarian_commander like 'Kaloyan'", | |
"question": "what are the distinct result of battle that have the bulgarian commander is Kaloyan ' ?" | |
}, | |
{ | |
"id": "gen:19974", | |
"query": "select count ( * ) from course_arrange", | |
"question": "count the number of course arrange ." | |
}, | |
{ | |
"id": "gen:6934", | |
"query": "select Directed_by from Cartoon where Channel = '706'", | |
"question": "what are the all directors who are in the cartoon whose channel is 706 ?" | |
}, | |
{ | |
"id": "gen:5411", | |
"query": "select property_address from Properties order by buyer_offered_price", | |
"question": "list the address of all properties sorted by their buyer offered price ." | |
}, | |
{ | |
"id": "gen:44430", | |
"query": "select count ( * ) from evaluation", | |
"question": "how many evaluation are there ?" | |
}, | |
{ | |
"id": "gen:28318", | |
"query": "select Paragraph_ID from Paragraphs where Paragraph_Text = 'Palestinian Territory'", | |
"question": "what are the id of distinct paragraphs that is the Palestinian Territory ' ?" | |
}, | |
{ | |
"id": "gen:17899", | |
"query": "select Attendance , Show_ID from show", | |
"question": "what are the different attendance and ids of all show ?" | |
}, | |
{ | |
"id": "gen:47774", | |
"query": "select T5.CountryName from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model join car_makers as T4 on T3.Maker = T4.Id join countries as T5 on T4.Country = T5.CountryId order by T1.Weight desc limit 1", | |
"question": "what is the name of the countries that has the greatest weight ?" | |
}, | |
{ | |
"id": "gen:10680", | |
"query": "select count ( * ) from CONTESTANTS", | |
"question": "count the number of contestants ." | |
}, | |
{ | |
"id": "gen:16494", | |
"query": "select count ( * ) from evaluation", | |
"question": "how many evaluation are there ?" | |
}, | |
{ | |
"id": "gen:47697", | |
"query": "select count ( T1.treatment_type_code ) from Treatments as T1 join Dogs as T2 on T1.dog_id = T2.dog_id where T2.age like '2'", | |
"question": "how many different treatments type are age of dogs with 2 ?" | |
}, | |
{ | |
"id": "gen:37088", | |
"query": "select T1.birth_date , T2.loser_ioc from players as T1 join matches as T2 on T1.player_id = T2.winner_id where T2.loser_hand = 'R'", | |
"question": "find the biRth date and ioc of the playeRs who have loseR hand foR the loseR R ." | |
}, | |
{ | |
"id": "gen:26893", | |
"query": "select T2.PetID from Student as T1 join Has_Pet as T2 on T1.StuID = T2.StuID where T1.Advisor = ( select min ( Advisor ) from Student )", | |
"question": "what are the id of pet who is the least student ?" | |
}, | |
{ | |
"id": "gen:24190", | |
"query": "select T1.Lowest from stadium as T1 join concert as T2 on T1.Stadium_ID = T2.Stadium_ID join singer_in_concert as T3 on T2.concert_ID = T3.concert_ID join singer as T4 on T3.Singer_ID = T4.Singer_ID order by T4.Age asc limit 1", | |
"question": "what is the lowest of the stadium who has the lowest age ?" | |
}, | |
{ | |
"id": "gen:30173", | |
"query": "select name from Highschooler order by grade asc", | |
"question": "what are the name of the higher in ascending order of grade ?" | |
}, | |
{ | |
"id": "gen:22854", | |
"query": "select loser_name , loser_hand from matches where loser_ioc = 'SVK'", | |
"question": "find the name and hand of all loser who have matches with the ioc SVK ' ." | |
}, | |
{ | |
"id": "gen:19615", | |
"query": "select Maker from car_makers", | |
"question": "what are the different car maker ?" | |
}, | |
{ | |
"id": "gen:48889", | |
"query": "select Start_from from hiring", | |
"question": "what are all the distinct start from ?" | |
}, | |
{ | |
"id": "gen:20687", | |
"query": "select city_code , Sex from Student", | |
"question": "what city are and sex for each student ?" | |
}, | |
{ | |
"id": "gen:35977", | |
"query": "select avg ( T2.Height ) , avg ( T1.Earnings ) from poker_player as T1 join people as T2 on T1.People_ID = T2.People_ID where T2.Nationality = 'Russia'", | |
"question": "what are the average height and earnings of poker player in Russia ?" | |
}, | |
{ | |
"id": "gen:13851", | |
"query": "select count ( * ) from Treatments as T1 join Charges as T2 where T2.charge_amount > 98", | |
"question": "how many treatments have charges with amount greater than 98 ?" | |
}, | |
{ | |
"id": "gen:25319", | |
"query": "select Name from visitor order by Name desc limit 1", | |
"question": "return the name of the customer who has the most recent customer ." | |
}, | |
{ | |
"id": "gen:23898", | |
"query": "select Theme from concert where Year = '2014' intersect select Theme from concert where Year = '2014'", | |
"question": "what are the theme of concert in both year 2014 and a concert in year 2014 ?" | |
}, | |
{ | |
"id": "gen:469", | |
"query": "select T1.Name , T3.Name from visitor as T1 join visit as T2 on T1.ID = T2.visitor_ID join museum as T3 on T2.Museum_ID = T3.Museum_ID", | |
"question": "show the name of customer and the museum name ." | |
}, | |
{ | |
"id": "gen:44965", | |
"query": "select sum ( injured ) from death", | |
"question": "what is the total injured of death ?" | |
}, | |
{ | |
"id": "gen:13603", | |
"query": "select count ( * ) from song", | |
"question": "how many song are there ?" | |
}, | |
{ | |
"id": "gen:13299", | |
"query": "select count ( Employee_ID ) from evaluation", | |
"question": "how many employee have evaluation ?" | |
}, | |
{ | |
"id": "gen:41317", | |
"query": "select Hometown from teacher", | |
"question": "what are the hometowns of all teacher ?" | |
}, | |
{ | |
"id": "gen:31836", | |
"query": "select T1.Nationality , T3.Type , T3.Weekly_rank from conductor as T1 join orchestra as T2 on T1.Conductor_ID = T2.Conductor_ID join performance as T3 on T2.Orchestra_ID = T3.Orchestra_ID", | |
"question": "show the nationality , type , and weekly rank of conductor , and weekly rank of performance ." | |
}, | |
{ | |
"id": "gen:13829", | |
"query": "select Name from singer order by Birth_Year asc", | |
"question": "what are all the name of singer in ascending order of the year ?" | |
}, | |
{ | |
"id": "gen:37895", | |
"query": "select District from shop where Number_products > 10000 group by District order by count ( * ) desc limit 1", | |
"question": "which district has the most number of shop with products more than 10000 ?" | |
}, | |
{ | |
"id": "gen:26170", | |
"query": "select Hight_definition_TV from TV_Channel where Language = 'English'", | |
"question": "what are the high definition of the tv channel that are English ?" | |
}, | |
{ | |
"id": "gen:48592", | |
"query": "select avg ( T1.killed ) from death as T1 join ship as T2 on T1.caused_by_ship_id = T2.id join battle as T3 on T2.lost_in_battle = T3.id where T3.latin_commander = 'Thierry de Termond'", | |
"question": "what is the average death of death that were held by battle with latin commander ' Thierry de Termond ' ?" | |
}, | |
{ | |
"id": "gen:45119", | |
"query": "select T3.PetType , T1.LName from Student as T1 join Has_Pet as T2 on T1.StuID = T2.StuID join Pets as T3 on T2.PetID = T3.PetID order by T1.LName", | |
"question": "list the type of pets and last name of student in alphabetical order of last name ." | |
}, | |
{ | |
"id": "gen:38672", | |
"query": "select Name from shop group by Shop_ID order by count ( * ) desc limit 1", | |
"question": "what is the name of the shop that has the most number of times ?" | |
}, | |
{ | |
"id": "gen:2247", | |
"query": "select count ( * ) from TV_series as T1 join TV_Channel as T2 on T1.Channel = T2.id join Cartoon as T3 on T2.id = T3.Channel where T3.Title > ( select avg ( Title ) from Cartoon )", | |
"question": "how many tv series are have the cartoon title higher than the average ?" | |
}, | |
{ | |
"id": "gen:19892", | |
"query": "select Fname from Student where Advisor > ( select avg ( Advisor ) from Student )", | |
"question": "find the first name of student whose advisor is higher than the average ." | |
}, | |
{ | |
"id": "gen:1973", | |
"query": "select Name from stadium where Capacity > 11998 or Capacity < 4000", | |
"question": "find the name of stadium that have a capacity greater than 11998 or capacity less than 4000 ." | |
} | |
], | |
"theirs": [ | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", | |
"question": "What is the template type code for template type description \"Book\"." | |
}, | |
{ | |
"id": "museum_visit", | |
"query": "SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1", | |
"question": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?" | |
}, | |
{ | |
"id": "museum_visit", | |
"query": "SELECT count(*) FROM visitor WHERE age < 30", | |
"question": "How many visitors below age 30 are there?" | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", | |
"question": "What is the full name of each car maker, along with its id and how many models it produces?" | |
}, | |
{ | |
"id": "orchestra", | |
"query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", | |
"question": "How many orchestras does each record company manage?" | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", | |
"question": "How many models does each car maker produce? List maker full name, id and the number." | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", | |
"question": "List all singer names in concerts in year 2014." | |
}, | |
{ | |
"id": "orchestra", | |
"query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1", | |
"question": "Show the names of conductors that have conducted more than one orchestras." | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", | |
"question": "Return the id of the document with the fewest paragraphs." | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", | |
"question": "What are the ids of documents that have 2 or more paragraphs?" | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;", | |
"question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon." | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", | |
"question": "What is the average expected life expectancy for countries in the region of Central Africa?" | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", | |
"question": "What is the document id with least number of paragraphs?" | |
}, | |
{ | |
"id": "wta_1", | |
"query": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", | |
"question": "Find the total ranking points for each player and their first name." | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id", | |
"question": "What are the ids and names of each document, as well as the number of paragraphs in each?" | |
}, | |
{ | |
"id": "employee_hire_evaluation", | |
"query": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000", | |
"question": "Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products." | |
}, | |
{ | |
"id": "voter_1", | |
"query": "SELECT vote_id , phone_number , state FROM votes", | |
"question": "List the vote ids, phone numbers and states of all votes." | |
}, | |
{ | |
"id": "wta_1", | |
"query": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", | |
"question": "Find the average ranking for each player and their first name." | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", | |
"question": "How many concerts are there in year 2014 or 2015?" | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", | |
"question": "List singer names and number of concerts for each singer." | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';", | |
"question": "What is the count of the car models produced in the United States?" | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", | |
"question": "What is the average edispl of the cars of model volvo?" | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id", | |
"question": "Show the name and theme for all concerts and the number of singers in each concert." | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT DISTINCT T1.Year FROM CARS_DATA AS T1 WHERE T1.Weight > 3000 AND T1.weight < 4000;", | |
"question": "What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000?" | |
}, | |
{ | |
"id": "museum_visit", | |
"query": "SELECT Num_of_Staff , Open_Year FROM museum WHERE name = 'Plaza Museum'", | |
"question": "What are the opening year and staff number of the museum named Plaza Museum?" | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT T2.MakeId , T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT min(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3;", | |
"question": "Among the cars that do not have the minimum horsepower, what are the make ids and names of al those with less than 4 cylinders?" | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT count(*) FROM Paragraphs", | |
"question": "Count the number of paragraphs." | |
}, | |
{ | |
"id": "wta_1", | |
"query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", | |
"question": "What is the name of the winner who has won the most matches, and how many rank points does this player have?" | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", | |
"question": "How many unique languages are spoken in the world?" | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", | |
"question": "Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?" | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", | |
"question": "Find the number of cities in each district whose population is greater than the average population of cities?" | |
}, | |
{ | |
"id": "wta_1", | |
"query": "SELECT count(DISTINCT country_code) FROM players", | |
"question": "find the number of distinct country codes of all players." | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", | |
"question": "Which region is the city Kabul located in?" | |
}, | |
{ | |
"id": "employee_hire_evaluation", | |
"query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", | |
"question": "Which shops' number products is above the average? Give me the shop names." | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", | |
"question": "What are names of countries with the top 3 largest population?" | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT count(*) FROM singer", | |
"question": "What is the total number of singers?" | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;", | |
"question": "How many car models are produced by each maker? List the count and the maker full name." | |
}, | |
{ | |
"id": "employee_hire_evaluation", | |
"query": "SELECT name FROM employee ORDER BY age", | |
"question": "Sort employee names by their age in ascending order." | |
}, | |
{ | |
"id": "voter_1", | |
"query": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", | |
"question": "What are the contestant numbers and names of the contestants who had at least two votes?" | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", | |
"question": "What are the population, name and leader of the country with the largest area?" | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT count(*) FROM Paragraphs", | |
"question": "How many paragraphs in total?" | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", | |
"question": "What are all the song names by singers who are older than average?" | |
}, | |
{ | |
"id": "voter_1", | |
"query": "SELECT count(*) FROM area_code_state", | |
"question": "How many states are there?" | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", | |
"question": "Show location and name for all stadiums with a capacity between 5000 and 10000." | |
}, | |
{ | |
"id": "concert_singer", | |
"query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", | |
"question": "what is the name and nation of the singer who have a song having 'Hey' in its name?" | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", | |
"question": "Return the codes of countries that do not speak English and do not have Republics for governments." | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;", | |
"question": "In 1980, how many cars were made?" | |
}, | |
{ | |
"id": "employee_hire_evaluation", | |
"query": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC", | |
"question": "Sort all the shops by number products in descending order, and return the name, location and district of each shop." | |
}, | |
{ | |
"id": "voter_1", | |
"query": "SELECT T2.created , T2.state , T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'", | |
"question": "What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?" | |
}, | |
{ | |
"id": "orchestra", | |
"query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", | |
"question": "List names of conductors in descending order of years of work." | |
}, | |
{ | |
"id": "voter_1", | |
"query": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC", | |
"question": "List the contestant numbers and names, ordered by contestant name descending." | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", | |
"question": "Give the names of countries that are in Europe and have a population equal to 80000." | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", | |
"question": "How many official languages does Afghanistan have?" | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT count(*) FROM CONTINENTS;", | |
"question": "What is the number of continents?" | |
}, | |
{ | |
"id": "wta_1", | |
"query": "SELECT min(loser_rank) FROM matches", | |
"question": "What is the best rank of losers across all matches?" | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", | |
"question": "What is the template type descriptions for template type code \"AD\"." | |
}, | |
{ | |
"id": "car_1", | |
"query": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;", | |
"question": "What is the name of each continent and how many car makers are there in each one?" | |
}, | |
{ | |
"id": "cre_Doc_Template_Mgt", | |
"query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", | |
"question": "What is the document id, template id and description for document named \"Robbin CV\"?" | |
}, | |
{ | |
"id": "wta_1", | |
"query": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", | |
"question": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches?" | |
}, | |
{ | |
"id": "world_1", | |
"query": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", | |
"question": "Whic`h unique cities are in Asian countries where Chinese is the official language?" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment