diff --git "a/validation_sql_skeleton_chatgpt_schema.json" "b/validation_sql_skeleton_chatgpt_schema.json" deleted file mode 100644--- "a/validation_sql_skeleton_chatgpt_schema.json" +++ /dev/null @@ -1,7240 +0,0 @@ -[ - { - "index": 0, - "db_id": "concert_singer", - "question": "How many singers do we have?", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id | singer: singer_id, name, country, song_name, song_release_year, age, is_male | stadium: stadium_id, location, name, capacity, highest, lowest, average |", - "ground_truth": "select count ( * ) from singer" - }, - { - "index": 1, - "db_id": "concert_singer", - "question": "What is the total number of singers?", - "db_info": "| singer: singer_id, name, is_male, age, country | concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select count ( * ) from singer" - }, - { - "index": 2, - "db_id": "concert_singer", - "question": "Show name, country, age for all singers ordered by age from the oldest to the youngest.", - "db_info": "| singer: name, country, age | | stadium: name, country, capacity | | concert: concert_name, year | | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name , country , age from singer order by age desc" - }, - { - "index": 3, - "db_id": "concert_singer", - "question": "What are the names, countries, and ages for every singer in descending order of age?", - "db_info": "| singer: singer_id, name, country, age | stadium: stadium_id, location, name | concert: concert_id, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name , country , age from singer order by age desc" - }, - { - "index": 4, - "db_id": "concert_singer", - "question": "What is the average, minimum, and maximum age of all singers from France?", - "db_info": "| singer: country, age | stadium: location, capacity, highest, lowest, average |", - "ground_truth": "select avg ( age ) , min ( age ) , max ( age ) from singer where country = 'France'" - }, - { - "index": 5, - "db_id": "concert_singer", - "question": "What is the average, minimum, and maximum age for all French singers?", - "db_info": "| singer: age, country, name | stadium: capacity, location, name | concert: year, concert_id | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select avg ( age ) , min ( age ) , max ( age ) from singer where country = 'France'" - }, - { - "index": 6, - "db_id": "concert_singer", - "question": "Show the name and the release year of the song by the youngest singer.", - "db_info": "| singer: name, song_release_year, age | song: name | concert: year | stadium: name |", - "ground_truth": "select song_name , song_release_year from singer order by age asc limit 1" - }, - { - "index": 7, - "db_id": "concert_singer", - "question": "What are the names and release years for all the songs of the youngest singer?", - "db_info": "| singer: singer_id, name, song_name, song_release_year, age |", - "ground_truth": "select song_name , song_release_year from singer order by age asc limit 1" - }, - { - "index": 8, - "db_id": "concert_singer", - "question": "What are all distinct countries where singers above age 20 are from?", - "db_info": "| singer: country, age, singer_id, name, song_name, song_release_year, is_male | | stadium: location, name, stadium_id, capacity, highest, lowest, average | | concert: stadium_id, concert_id, concert_name, theme, year | | singer_in_concert: concert_id, singer_id | Database info string: | singer: country, age, singer_id, name, song_name, song_release_year, is_male | stadium: location, name, stadium_id, capacity, highest, lowest, average | concert: stadium_id, concert_id, concert_name, theme, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select distinct country from singer where age > 20" - }, - { - "index": 9, - "db_id": "concert_singer", - "question": "What are the different countries with singers above age 20?", - "db_info": "| singer: country, age, singer_id | stadium: location, name, stadium_id | concert: stadium_id, concert_id | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select distinct country from singer where age > 20" - }, - { - "index": 10, - "db_id": "concert_singer", - "question": "Show all countries and the number of singers in each country.", - "db_info": "| concert: stadium_id, concert_id, concert_name, theme, year | | stadium: stadium_id, location, name, capacity, highest, lowest, average | | singer: country, singer_id, name, song_name, song_release_year, age, is_male | | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select country , count ( * ) from singer group by country" - }, - { - "index": 11, - "db_id": "concert_singer", - "question": "How many singers are from each country?", - "db_info": "| singer: singer_id, name, country, song_name, song_release_year, age, is_male | stadium: stadium_id, location, name, capacity, highest, lowest, average | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select country , count ( * ) from singer group by country" - }, - { - "index": 12, - "db_id": "concert_singer", - "question": "List all song names by singers above the average age.", - "db_info": "| singer: singer_id, name, country, song_name, song_release_year, age, is_male | stadium: stadium_id, location, name, capacity, highest, lowest, average | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select song_name from singer where age > ( select avg ( age ) from singer )" - }, - { - "index": 13, - "db_id": "concert_singer", - "question": "What are all the song names by singers who are older than average?", - "db_info": "| singer: singer_id, name, age, song_name, song_release_year, is_male | stadium: stadium_id, capacity, name | concert: concert_id, theme, year, stadium_id | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select song_name from singer where age > ( select avg ( age ) from singer )" - }, - { - "index": 14, - "db_id": "concert_singer", - "question": "Show location and name for all stadiums with a capacity between 5000 and 10000.", - "db_info": "| stadium: stadium_id, location, name, capacity, highest, lowest, average | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id | singer: singer_id, name, country, song_name, song_release_year, age, is_male |", - "ground_truth": "select location , name from stadium where capacity between 5000 and 10000" - }, - { - "index": 15, - "db_id": "concert_singer", - "question": "What are the locations and names of all stations with capacity between 5000 and 10000?", - "db_info": "| stadium: capacity, location, name, stadium_id, highest, lowest, average | singer: name, country, age, singer_id, song_name, song_release_year, is_male | concert: stadium_id, concert_name, theme, concert_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select location , name from stadium where capacity between 5000 and 10000" - }, - { - "index": 16, - "db_id": "concert_singer", - "question": "What is the maximum capacity and the average of all stadiums ?", - "db_info": "| stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select max ( capacity ) , average from stadium" - }, - { - "index": 17, - "db_id": "concert_singer", - "question": "What is the average and maximum capacities for all stadiums ?", - "db_info": "| stadium: capacity, highest, lowest, average, stadium_id, location, name | | singer: singer_id, name, country, song_name, song_release_year, age, is_male | | concert: concert_id, concert_name, theme, stadium_id, year | | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select avg ( capacity ) , max ( capacity ) from stadium" - }, - { - "index": 18, - "db_id": "concert_singer", - "question": "What is the name and capacity for the stadium with highest average attendance?", - "db_info": "| stadium: name, capacity, highest, location, lowest, average, stadium_id | singer: name, singer_id, country, song_name, song_release_year, age, is_male | concert: concert_name, stadium_id, theme, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name , capacity from stadium order by average desc limit 1" - }, - { - "index": 19, - "db_id": "concert_singer", - "question": "What is the name and capacity for the stadium with the highest average attendance?", - "db_info": "| stadium: stadium_id, name, capacity | singer: singer_id, name | concert: concert_id, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name , capacity from stadium order by average desc limit 1" - }, - { - "index": 20, - "db_id": "concert_singer", - "question": "How many concerts are there in year 2014 or 2015?", - "db_info": "| concert: year, concert_id | stadium: stadium_id, location | singer: singer_id, song_release_year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select count ( * ) from concert where year = 2014 or year = 2015" - }, - { - "index": 21, - "db_id": "concert_singer", - "question": "How many concerts occurred in 2014 or 2015?", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select count ( * ) from concert where year = 2014 or year = 2015" - }, - { - "index": 22, - "db_id": "concert_singer", - "question": "Show the stadium name and the number of concerts in each stadium.", - "db_info": "| stadium: name, stadium_id, capacity, location, highest, lowest, average | singer: name, singer_id, country, song_name, song_release_year, age, is_male | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select stadium.name , count ( * ) from concert join stadium on concert.stadium_id = stadium.stadium_id group by concert.stadium_id" - }, - { - "index": 23, - "db_id": "concert_singer", - "question": "For each stadium, how many concerts play there?", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select stadium.name , count ( * ) from concert join stadium on concert.stadium_id = stadium.stadium_id group by concert.stadium_id" - }, - { - "index": 24, - "db_id": "concert_singer", - "question": "Show the stadium name and capacity with most number of concerts in year 2014 or after.", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id |", - "ground_truth": "select stadium.name , stadium.capacity from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year >= 2014 group by stadium.stadium_id order by count ( * ) desc limit 1" - }, - { - "index": 25, - "db_id": "concert_singer", - "question": "What is the name and capacity of the stadium with the most concerts after 2013 ?", - "db_info": "| stadium: stadium_id, location, name, capacity, highest, lowest, average | concert: concert_id, concert_name, theme, stadium_id, year | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select stadium.name , stadium.capacity from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year > 2013 group by stadium.stadium_id order by count ( * ) desc limit 1" - }, - { - "index": 26, - "db_id": "concert_singer", - "question": "Which year has most number of concerts?", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select year from concert group by year order by count ( * ) desc limit 1" - }, - { - "index": 27, - "db_id": "concert_singer", - "question": "What is the year that had the most concerts?", - "db_info": "| stadium: capacity, highest, lowest, average, name, location, stadium_id | singer: song_release_year, singer_id, name, country, song_name, age, is_male | concert: year, concert_id, concert_name, theme, stadium_id | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select year from concert group by year order by count ( * ) desc limit 1" - }, - { - "index": 28, - "db_id": "concert_singer", - "question": "Show the stadium names without any concert.", - "db_info": "| stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name from stadium where stadium_id not in ( select stadium_id from concert )" - }, - { - "index": 29, - "db_id": "concert_singer", - "question": "What are the names of the stadiums without any concerts?", - "db_info": "| stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name from stadium where stadium_id not in ( select stadium_id from concert )" - }, - { - "index": 30, - "db_id": "concert_singer", - "question": "Show countries where a singer above age 40 and a singer below 30 are from.", - "db_info": "| singer: country, age, name | stadium: location, name, capacity, highest, lowest, average | concert: year, concert_name, theme | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select country from singer where age > 40 intersect select country from singer where age < 30" - }, - { - "index": 31, - "db_id": "concert_singer", - "question": "Show names for all stadiums except for stadiums having a concert in year 2014.", - "db_info": "| stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name from stadium except select stadium.name from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014" - }, - { - "index": 32, - "db_id": "concert_singer", - "question": "What are the names of all stadiums that did not have a concert in 2014?", - "db_info": "| stadium: stadium_id, name, location, capacity, highest, lowest, average | concert: concert_id, stadium_id, concert_name, theme, year | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name from stadium except select stadium.name from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014" - }, - { - "index": 33, - "db_id": "concert_singer", - "question": "Show the name and theme for all concerts and the number of singers in each concert.", - "db_info": "| concert: concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id | stadium: name, theme, location, capacity, highest, lowest, average | singer: name, song_name, song_release_year, country, age, is_male |", - "ground_truth": "select concert.concert_name , concert.theme , count ( * ) from singer_in_concert join concert on singer_in_concert.concert_id = concert.concert_id group by concert.concert_id" - }, - { - "index": 34, - "db_id": "concert_singer", - "question": "What are the names , themes , and number of singers for every concert ?", - "db_info": "| concert: concert_name, theme, year, stadium_id | stadium: name, location, capacity, highest, lowest, average, stadium_id | singer: name, country, song_name, song_release_year, age, is_male, singer_id | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select concert.concert_name , concert.theme , count ( * ) from singer_in_concert join concert on singer_in_concert.concert_id = concert.concert_id group by concert.concert_id" - }, - { - "index": 35, - "db_id": "concert_singer", - "question": "List singer names and number of concerts for each singer.", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id | singer: singer_id, name, country, song_name, song_release_year, age, is_male | stadium: stadium_id, location, name, capacity, highest, lowest, average |", - "ground_truth": "select singer.name , count ( * ) from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id group by singer.singer_id" - }, - { - "index": 36, - "db_id": "concert_singer", - "question": "What are the names of the singers and number of concerts for each person?", - "db_info": "| singer: name, singer_id, song_name, song_release_year, country, age, is_male | concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id | stadium: stadium_id, location, name, capacity, highest, lowest, average |", - "ground_truth": "select singer.name , count ( * ) from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id group by singer.singer_id" - }, - { - "index": 37, - "db_id": "concert_singer", - "question": "List all singer names in concerts in year 2014.", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select singer.name from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id join concert on singer_in_concert.concert_id = concert.concert_id where concert.year = 2014" - }, - { - "index": 38, - "db_id": "concert_singer", - "question": "What are the names of the singers who performed in a concert in 2014?", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | singer_in_concert: concert_id, singer_id | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male |", - "ground_truth": "select singer.name from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id join concert on singer_in_concert.concert_id = concert.concert_id where concert.year = 2014" - }, - { - "index": 39, - "db_id": "concert_singer", - "question": "what is the name and nation of the singer who have a song having 'Hey' in its name?", - "db_info": "| singer: name, country, song_name, song_release_year, age, is_male | concert: concert_id, concert_name, theme, stadium_id, year | stadium: name, location, capacity, highest, lowest, average | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select name , country from singer where song_name like '%Hey%'" - }, - { - "index": 40, - "db_id": "concert_singer", - "question": "What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?", - "db_info": "| singer: name, country, song_name | stadium: name, location | concert: concert_name | singer_in_concert: singer_id |", - "ground_truth": "select name , country from singer where song_name like '%Hey%'" - }, - { - "index": 41, - "db_id": "concert_singer", - "question": "Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer_in_concert: concert_id, singer_id | singer: singer_id, name, country, song_name, song_release_year, age, is_male |", - "ground_truth": "select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014 intersect select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2015" - }, - { - "index": 42, - "db_id": "concert_singer", - "question": "What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015?", - "db_info": "| concert: concert_id, concert_name, theme, stadium_id, year | stadium: stadium_id, location, name, capacity, highest, lowest, average | singer: singer_id, name, country, song_name, song_release_year, age, is_male | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014 intersect select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2015" - }, - { - "index": 43, - "db_id": "concert_singer", - "question": "Find the number of concerts happened in the stadium with the highest capacity .", - "db_info": "| stadium: stadium_id, capacity, location, name, highest, lowest, average | concert: stadium_id, concert_id, concert_name, theme, year | singer_in_concert: concert_id, singer_id | singer: singer_id, name, country, song_name, song_release_year, age, is_male |", - "ground_truth": "select count ( * ) from concert where stadium_id = ( select stadium_id from stadium order by capacity desc limit 1 )" - }, - { - "index": 44, - "db_id": "concert_singer", - "question": "What are the number of concerts that occurred in the stadium with the largest capacity ?", - "db_info": "| stadium: capacity, name, stadium_id | singer: singer_id, name, country | concert: stadium_id, concert_id | singer_in_concert: concert_id, singer_id |", - "ground_truth": "select count ( * ) from concert where stadium_id = ( select stadium_id from stadium order by capacity desc limit 1 )" - }, - { - "index": 45, - "db_id": "pets_1", - "question": "Find the number of pets whose weight is heavier than 10.", - "db_info": "| pets: petid, pettype, pet_age, weight | has_pet: stuid, petid | student: stuid, lname, fname, age, sex, major, advisor, city_code |", - "ground_truth": "select count ( * ) from pets where weight > 10" - }, - { - "index": 46, - "db_id": "pets_1", - "question": "How many pets have a greater weight than 10?", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select count ( * ) from pets where weight > 10" - }, - { - "index": 47, - "db_id": "pets_1", - "question": "Find the weight of the youngest dog.", - "db_info": "| pets: pet_age, weight, petid, pettype | student: age, stuid, lname, fname, sex, major, advisor, city_code | has_pet: stuid, petid |", - "ground_truth": "select weight from pets order by pet_age asc limit 1" - }, - { - "index": 48, - "db_id": "pets_1", - "question": "How much does the youngest dog weigh?", - "db_info": "| student: age, stuid, lname, fname, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select weight from pets order by pet_age asc limit 1" - }, - { - "index": 49, - "db_id": "pets_1", - "question": "Find the maximum weight for each type of pet. List the maximum weight and pet type.", - "db_info": "| pets: petid, pettype, pet_age, weight | student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid |", - "ground_truth": "select max ( weight ) , pettype from pets group by pettype" - }, - { - "index": 50, - "db_id": "pets_1", - "question": "List the maximum weight and type for each type of pet.", - "db_info": "| has_pet: stuid, petid | student: stuid, lname, fname, age, sex, major, advisor, city_code | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select max ( weight ) , pettype from pets group by pettype" - }, - { - "index": 51, - "db_id": "pets_1", - "question": "Find number of pets owned by students who are older than 20.", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select count ( * ) from student join has_pet on student.stuid = has_pet.stuid where student.age > 20" - }, - { - "index": 52, - "db_id": "pets_1", - "question": "How many pets are owned by students that have an age greater than 20?", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select count ( * ) from student join has_pet on student.stuid = has_pet.stuid where student.age > 20" - }, - { - "index": 53, - "db_id": "pets_1", - "question": "Find the number of dog pets that are raised by female students (with sex F).", - "db_info": "| student: stuid, sex, major | has_pet: stuid | pets: pettype |", - "ground_truth": "select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog'" - }, - { - "index": 54, - "db_id": "pets_1", - "question": "How many dog pets are raised by female students?", - "db_info": "| student: stuid, sex, major, lname, fname, age, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog'" - }, - { - "index": 55, - "db_id": "pets_1", - "question": "Find the number of distinct type of pets.", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select count ( distinct pettype ) from pets" - }, - { - "index": 56, - "db_id": "pets_1", - "question": "How many different types of pet are there?", - "db_info": "| pets: petid, pettype, pet_age, weight | student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid |", - "ground_truth": "select count ( distinct pettype ) from pets" - }, - { - "index": 57, - "db_id": "pets_1", - "question": "Find the first name of students who have cat or dog pet.", - "db_info": "| student: fname, stuid, lname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select distinct student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' or pets.pettype = 'dog'" - }, - { - "index": 58, - "db_id": "pets_1", - "question": "What are the first names of every student who has a cat or dog as a pet?", - "db_info": "| student: fname, stuid, lname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select distinct student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' or pets.pettype = 'dog'" - }, - { - "index": 59, - "db_id": "pets_1", - "question": "Find the first name of students who have both cat and dog pets .", - "db_info": "| student: fname, stuid, lname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' intersect select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog'" - }, - { - "index": 60, - "db_id": "pets_1", - "question": "What are the students' first names who have both cats and dogs as pets?", - "db_info": "| student: fname, lname, stuid | has_pet: stuid | pets: pettype |", - "ground_truth": "select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' intersect select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog'" - }, - { - "index": 61, - "db_id": "pets_1", - "question": "Find the major and age of students who do not have a cat pet.", - "db_info": "| student: major, age, stuid, lname, fname, sex, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select major , age from student where stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" - }, - { - "index": 62, - "db_id": "pets_1", - "question": "What major is every student who does not own a cat as a pet, and also how old are they?", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select major , age from student where stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" - }, - { - "index": 63, - "db_id": "pets_1", - "question": "Find the id of students who do not have a cat pet.", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select stuid from student except select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat'" - }, - { - "index": 64, - "db_id": "pets_1", - "question": "What are the ids of the students who do not own cats as pets?", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select stuid from student except select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat'" - }, - { - "index": 65, - "db_id": "pets_1", - "question": "Find the first name and age of students who have a dog but do not have a cat as a pet.", - "db_info": "| student: fname, age, lname, stuid, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" - }, - { - "index": 66, - "db_id": "pets_1", - "question": "What is the first name of every student who has a dog but does not have a cat?", - "db_info": "| student: fname, stuid, lname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight | | has_pet.stuid = student.stuid | | has_pet.petid = pets.petid |", - "ground_truth": "select student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" - }, - { - "index": 67, - "db_id": "pets_1", - "question": "Find the type and weight of the youngest pet.", - "db_info": "| pets: petid, pettype, pet_age, weight | student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid |", - "ground_truth": "select pettype , weight from pets order by pet_age asc limit 1" - }, - { - "index": 68, - "db_id": "pets_1", - "question": "What type of pet is the youngest animal, and how much does it weigh?", - "db_info": "| student: age, fname, lname, stuid | has_pet: stuid, petid | pets: pettype, pet_age, weight, petid |", - "ground_truth": "select pettype , weight from pets order by pet_age asc limit 1" - }, - { - "index": 69, - "db_id": "pets_1", - "question": "Find the id and weight of all pets whose age is older than 1.", - "db_info": "| pets: petid, pet_age, weight | student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid |", - "ground_truth": "select petid , weight from pets where pet_age > 1" - }, - { - "index": 70, - "db_id": "pets_1", - "question": "What is the id and weight of every pet who is older than 1?", - "db_info": "| student: stuid, age, lname, fname, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select petid , weight from pets where pet_age > 1" - }, - { - "index": 71, - "db_id": "pets_1", - "question": "Find the average and maximum age for each type of pet.", - "db_info": "| pets: petid, pettype, pet_age, weight | student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid |", - "ground_truth": "select avg ( pet_age ) , max ( pet_age ) , pettype from pets group by pettype" - }, - { - "index": 72, - "db_id": "pets_1", - "question": "What is the average and maximum age for each pet type?", - "db_info": "| pets: petid, pettype, pet_age, weight | student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid |", - "ground_truth": "select avg ( pet_age ) , max ( pet_age ) , pettype from pets group by pettype" - }, - { - "index": 73, - "db_id": "pets_1", - "question": "Find the average weight for each pet type.", - "db_info": "| student: major, stuid, fname, lname | has_pet: stuid, petid | pets: pettype, petid, weight |", - "ground_truth": "select avg ( weight ) , pettype from pets group by pettype" - }, - { - "index": 74, - "db_id": "pets_1", - "question": "What is the average weight for each type of pet?", - "db_info": "| pets: petid, pettype, weight | student: stuid, major, age | has_pet: stuid, petid |", - "ground_truth": "select avg ( weight ) , pettype from pets group by pettype" - }, - { - "index": 75, - "db_id": "pets_1", - "question": "Find the first name and age of students who have a pet.", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select distinct student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid" - }, - { - "index": 76, - "db_id": "pets_1", - "question": "What are the different first names and ages of the students who do have pets?", - "db_info": "| student: stuid, fname, age | has_pet: stuid | pets: petid, pettype, pet_age |", - "ground_truth": "select distinct student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid" - }, - { - "index": 77, - "db_id": "pets_1", - "question": "Find the id of the pet owned by student whose last name is ‘Smith’.", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select has_pet.petid from student join has_pet on student.stuid = has_pet.stuid where student.lname = 'Smith'" - }, - { - "index": 78, - "db_id": "pets_1", - "question": "What is the id of the pet owned by the student whose last name is 'Smith'?", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select has_pet.petid from student join has_pet on student.stuid = has_pet.stuid where student.lname = 'Smith'" - }, - { - "index": 79, - "db_id": "pets_1", - "question": "Find the number of pets for each student who has any pet and student id.", - "db_info": "| student: stuid, lname, fname | has_pet: stuid, petid | pets: petid |", - "ground_truth": "select count ( * ) , student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid" - }, - { - "index": 80, - "db_id": "pets_1", - "question": "For students who have pets , how many pets does each student have ? list their ids instead of names .", - "db_info": "| student: stuid, lname, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select count ( * ) , student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid" - }, - { - "index": 81, - "db_id": "pets_1", - "question": "Find the first name and gender of student who have more than one pet.", - "db_info": "| student: fname, sex | has_pet: stuid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select student.fname , student.sex from student join has_pet on student.stuid = has_pet.stuid group by student.stuid having count ( * ) > 1" - }, - { - "index": 82, - "db_id": "pets_1", - "question": "What is the first name and gender of the all the students who have more than one pet?", - "db_info": "| student: fname, sex, stuid, lname, age, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select student.fname , student.sex from student join has_pet on student.stuid = has_pet.stuid group by student.stuid having count ( * ) > 1" - }, - { - "index": 83, - "db_id": "pets_1", - "question": "Find the last name of the student who has a cat that is age 3.", - "db_info": "| student: lname, stuid, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat'" - }, - { - "index": 84, - "db_id": "pets_1", - "question": "What is the last name of the student who has a cat that is 3 years old?", - "db_info": "| student: lname, stuid, fname, age, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat'" - }, - { - "index": 85, - "db_id": "pets_1", - "question": "Find the average age of students who do not have any pet .", - "db_info": "| student: age, stuid, lname, fname, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select avg ( age ) from student where stuid not in ( select stuid from has_pet )" - }, - { - "index": 86, - "db_id": "pets_1", - "question": "What is the average age for all students who do not own any pets ?", - "db_info": "| student: age, stuid, lname, fname, sex, major, advisor, city_code | has_pet: stuid, petid | pets: petid, pettype, pet_age, weight |", - "ground_truth": "select avg ( age ) from student where stuid not in ( select stuid from has_pet )" - }, - { - "index": 87, - "db_id": "car_1", - "question": "How many continents are there?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, country | model_list: modelid, maker, model | car_names: makeid, model | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from continents" - }, - { - "index": 88, - "db_id": "car_1", - "question": "What is the number of continents?", - "db_info": "| continents: continent, contid | countries: countryname, countryid, continent | car_makers: maker, id, country, fullname | model_list: model, modelid, maker | car_names: make, makeid, model | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from continents" - }, - { - "index": 89, - "db_id": "car_1", - "question": "How many countries does each continent have? List the continent id, continent name and the number of countries.", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, country | model_list: modelid, maker | car_names: makeid, model | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select continents.contid , continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent group by continents.contid" - }, - { - "index": 90, - "db_id": "car_1", - "question": "For each continent, list its id, name, and how many countries it has?", - "db_info": "| continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, country, fullname | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select continents.contid , continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent group by continents.contid" - }, - { - "index": 91, - "db_id": "car_1", - "question": "How many countries are listed?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from countries" - }, - { - "index": 92, - "db_id": "car_1", - "question": "How many countries exist?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, country, fullname | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from countries" - }, - { - "index": 93, - "db_id": "car_1", - "question": "How many models does each car maker produce? List maker full name, id and the number.", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_makers.fullname , car_makers.id , count ( * ) from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id" - }, - { - "index": 94, - "db_id": "car_1", - "question": "What is the full name of each car maker, along with its id and how many models it produces?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_makers.fullname , car_makers.id , count ( * ) from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id" - }, - { - "index": 95, - "db_id": "car_1", - "question": "Which model of the car has the minimum horsepower?", - "db_info": "| cars_data: horsepower, weight, mpg, cylinders, edispl, accelerate, year | car_makers: maker, country | model_list: maker, model | car_names: model, makeid | countries: countryname, continent | continents: continent |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.horsepower asc limit 1" - }, - { - "index": 96, - "db_id": "car_1", - "question": "What is the model of the car with the smallest amount of horsepower?", - "db_info": "| continents: continent | countries: continent | car_makers: country | model_list: maker | car_names: model | cars_data: horsepower |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.horsepower asc limit 1" - }, - { - "index": 97, - "db_id": "car_1", - "question": "Find the model of the car whose weight is below the average weight.", - "db_info": "| cars_data: weight, model | car_names: model, makeid | model_list: maker, model | car_makers: maker, country | countries: countryname, continent |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.weight < ( select avg ( weight ) from cars_data )" - }, - { - "index": 98, - "db_id": "car_1", - "question": "What is the model for the car with a weight smaller than the average?", - "db_info": "| cars_data: weight, horsepower | car_names: make, model | model_list: maker, model | countries: countryname, continent | car_makers: maker, country | continents: continent |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.weight < ( select avg ( weight ) from cars_data )" - }, - { - "index": 99, - "db_id": "car_1", - "question": "Find the name of the makers that produced some cars in the year of 1970?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select distinct car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year = '1970'" - }, - { - "index": 100, - "db_id": "car_1", - "question": "What is the name of the different car makers who produced a car in 1970?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select distinct car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year = '1970'" - }, - { - "index": 101, - "db_id": "car_1", - "question": "Find the make and production time of the cars that were produced in the earliest year?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select car_names.make , cars_data.year from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.year = ( select min ( year ) from cars_data )" - }, - { - "index": 102, - "db_id": "car_1", - "question": "What is the maker of the carr produced in the earliest year and what year was it?", - "db_info": "| car_makers: id, maker, fullname, country | continents: contid, continent | countries: countryid, countryname, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_names.make , cars_data.year from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.year = ( select min ( year ) from cars_data )" - }, - { - "index": 103, - "db_id": "car_1", - "question": "Which distinct car models are the produced after 1980?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_names: makeid, model, make | model_list: modelid, maker, model | car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year > 1980" - }, - { - "index": 104, - "db_id": "car_1", - "question": "What are the different models for the cards produced after 1980?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year > 1980" - }, - { - "index": 105, - "db_id": "car_1", - "question": "How many car makers are there in each continents? List the continent name and the count.", - "db_info": "| continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent" - }, - { - "index": 106, - "db_id": "car_1", - "question": "What is the name of each continent and how many car makers are there in each one?", - "db_info": "| continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent" - }, - { - "index": 107, - "db_id": "car_1", - "question": "Which of the countries has the most car makers? List the country name.", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countries.countryname from car_makers join countries on car_makers.country = countries.countryid group by car_makers.country order by count ( * ) desc limit 1" - }, - { - "index": 108, - "db_id": "car_1", - "question": "What is the name of the country with the most car makers?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countries.countryname from car_makers join countries on car_makers.country = countries.countryid group by car_makers.country order by count ( * ) desc limit 1" - }, - { - "index": 109, - "db_id": "car_1", - "question": "How many car models are produced by each maker ? Only list the count and the maker full name .", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) , car_makers.fullname from model_list join car_makers on model_list.maker = car_makers.id group by car_makers.id" - }, - { - "index": 110, - "db_id": "car_1", - "question": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?", - "db_info": "| continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) , car_makers.fullname , car_makers.id from model_list join car_makers on model_list.maker = car_makers.id group by car_makers.id" - }, - { - "index": 111, - "db_id": "car_1", - "question": "What is the accelerate of the car make amc hornet sportabout (sw)?", - "db_info": "| cars_data: accelerate, makeid | car_makers: maker, country | countries: countryname, continent | continents: continent, contid | model_list: maker | car_names: make, model |", - "ground_truth": "select cars_data.accelerate from cars_data join car_names on cars_data.id = car_names.makeid where car_names.make = 'amc hornet sportabout (sw)'" - }, - { - "index": 112, - "db_id": "car_1", - "question": "How much does the car accelerate that makes amc hornet sportabout (sw)?", - "db_info": "| cars_data: accelerate, id, mpg, cylinders, edispl, horsepower, weight, year | car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent |", - "ground_truth": "select cars_data.accelerate from cars_data join car_names on cars_data.id = car_names.makeid where car_names.make = 'amc hornet sportabout (sw)'" - }, - { - "index": 113, - "db_id": "car_1", - "question": "How many car makers are there in france?", - "db_info": "| car_makers: maker, country | countries: countryname, continent | continents: continent | model_list: maker, model | car_names: model, make | cars_data: id |", - "ground_truth": "select count ( * ) from car_makers join countries on car_makers.country = countries.countryid where countries.countryname = 'france'" - }, - { - "index": 114, - "db_id": "car_1", - "question": "What is the number of makers of care in France?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, horsepower, weight, year |", - "ground_truth": "select count ( * ) from car_makers join countries on car_makers.country = countries.countryid where countries.countryname = 'france'" - }, - { - "index": 115, - "db_id": "car_1", - "question": "How many car models are produced in the usa?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from model_list join car_makers on model_list.maker = car_makers.id join countries on car_makers.country = countries.countryid where countries.countryname = 'usa'" - }, - { - "index": 116, - "db_id": "car_1", - "question": "What is the count of the car models produced in the United States?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from model_list join car_makers on model_list.maker = car_makers.id join countries on car_makers.country = countries.countryid where countries.countryname = 'usa'" - }, - { - "index": 117, - "db_id": "car_1", - "question": "What is the average miles per gallon(mpg) of the cars with 4 cylinders?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select avg ( mpg ) from cars_data where cylinders = 4" - }, - { - "index": 118, - "db_id": "car_1", - "question": "What is the average miles per gallon of all the cards with 4 cylinders?", - "db_info": "| cars_data: mpg, cylinders | car_makers: maker, country | model_list: maker, model | car_names: model | countries: countryname, continent | continents: N/A |", - "ground_truth": "select avg ( mpg ) from cars_data where cylinders = 4" - }, - { - "index": 119, - "db_id": "car_1", - "question": "What is the smallest weight of the car produced with 8 cylinders on 1974 ?", - "db_info": "| cars_data: id, cylinders, weight | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, country, maker, fullname | model_list: modelid, maker, model | car_names: makeid, model |", - "ground_truth": "select min ( weight ) from cars_data where cylinders = 8 and year = 1974" - }, - { - "index": 120, - "db_id": "car_1", - "question": "What is the minimum weight of the car with 8 cylinders produced in 1974 ?", - "db_info": "| cars_data: id, cylinders, weight | car_names: makeid, model | model_list: modelid, maker, model | car_makers: id, maker, country | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select min ( weight ) from cars_data where cylinders = 8 and year = 1974" - }, - { - "index": 121, - "db_id": "car_1", - "question": "What are all the makers and models?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | model_list: modelid, maker, model | car_names: makeid, model, make | continents: continent | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select maker , model from model_list" - }, - { - "index": 122, - "db_id": "car_1", - "question": "What are the makers and models?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select maker , model from model_list" - }, - { - "index": 123, - "db_id": "car_1", - "question": "What are the countries having at least one car maker? List name and id.", - "db_info": "| countries: countryname, countryid, continent | continents: continent, contid | car_makers: maker, fullname, country, id | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countries.countryname , countries.countryid from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) >= 1" - }, - { - "index": 124, - "db_id": "car_1", - "question": "What are the names and ids of all countries with at least one car maker?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countries.countryname , countries.countryid from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) >= 1" - }, - { - "index": 125, - "db_id": "car_1", - "question": "What is the number of the cars with horsepower more than 150?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select count ( * ) from cars_data where horsepower > 150" - }, - { - "index": 126, - "db_id": "car_1", - "question": "What is the number of cars with a horsepower greater than 150?", - "db_info": "| countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | continents: contid, continent |", - "ground_truth": "select count ( * ) from cars_data where horsepower > 150" - }, - { - "index": 127, - "db_id": "car_1", - "question": "What is the average weight of cars each year?", - "db_info": "| cars_data: id, year, weight, mpg, cylinders, edispl, horsepower, accelerate | countries: countryid, continent, countryname | continents: contid, continent | car_makers: id, country, maker, fullname | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select avg ( weight ) , year from cars_data group by year" - }, - { - "index": 128, - "db_id": "car_1", - "question": "What is the average weight and year for each year?", - "db_info": "| cars_data: id, mpg, year, weight | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select avg ( weight ) , year from cars_data group by year" - }, - { - "index": 129, - "db_id": "car_1", - "question": "Which countries in europe have at least 3 car manufacturers?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countries.countryname from countries join continents on countries.continent = continents.contid join car_makers on countries.countryid = car_makers.country where continents.continent = 'europe' group by countries.countryname having count ( * ) >= 3" - }, - { - "index": 130, - "db_id": "car_1", - "question": "What are the names of all European countries with at least 3 manufacturers?", - "db_info": "| countries: countryname, continent | continents: continent | car_makers: maker, country | model_list: maker | car_names: model | cars_data: N/A |", - "ground_truth": "select countries.countryname from countries join continents on countries.continent = continents.contid join car_makers on countries.countryid = car_makers.country where continents.continent = 'europe' group by countries.countryname having count ( * ) >= 3" - }, - { - "index": 131, - "db_id": "car_1", - "question": "What is the maximum horsepower and the make of the car models with 3 cylinders?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_names: makeid, model, make | model_list: modelid, maker, model | car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select cars_data.horsepower , car_names.make from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 3 order by cars_data.horsepower desc limit 1" - }, - { - "index": 132, - "db_id": "car_1", - "question": "What is the largest amount of horsepower for the models with 3 cylinders and what make is it?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | car_names: makeid, model, make | model_list: modelid, maker, model | continents: contid, continent |", - "ground_truth": "select cars_data.horsepower , car_names.make from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 3 order by cars_data.horsepower desc limit 1" - }, - { - "index": 133, - "db_id": "car_1", - "question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.", - "db_info": "| continents: continent, contid | countries: countryname, continent, countryid | car_makers: maker, country, id | model_list: maker, model, modelid | car_names: make, model, makeid | cars_data: mpg, id, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1" - }, - { - "index": 134, - "db_id": "car_1", - "question": "What is the car model with the highest mpg ?", - "db_info": "| cars_data: mpg, id | continents: continent, contid | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1" - }, - { - "index": 135, - "db_id": "car_1", - "question": "What is the average horsepower of the cars before 1980?", - "db_info": "| cars_data: year, horsepower | continents: continent | countries: continent, countryname | car_makers: country, maker | model_list: maker, model | car_names: model, makeid |", - "ground_truth": "select avg ( horsepower ) from cars_data where year < 1980" - }, - { - "index": 136, - "db_id": "car_1", - "question": "What is the average horsepower for all cars produced before 1980 ?", - "db_info": "| cars_data: horsepower, year | continents: continent | countries: countryname, continent | car_makers: maker, country | model_list: maker, model | car_names: makeid, model |", - "ground_truth": "select avg ( horsepower ) from cars_data where year < 1980" - }, - { - "index": 137, - "db_id": "car_1", - "question": "What is the average edispl of the cars of model volvo?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select avg ( cars_data.edispl ) from car_names join cars_data on car_names.makeid = cars_data.id where car_names.model = 'volvo'" - }, - { - "index": 138, - "db_id": "car_1", - "question": "What is the average edispl for all volvos?", - "db_info": "| cars_data: edispl | continents: continent | countries: continent, countryname | car_makers: id, country | model_list: maker, model | car_names: makeid, model |", - "ground_truth": "select avg ( cars_data.edispl ) from car_names join cars_data on car_names.makeid = cars_data.id where car_names.model = 'volvo'" - }, - { - "index": 139, - "db_id": "car_1", - "question": "What is the maximum accelerate for different number of cylinders?", - "db_info": "| cars_data: cylinders, accelerate | continents: continent | countries: countryname, continent | car_makers: maker | model_list: maker, model | car_names: model, make |", - "ground_truth": "select max ( accelerate ) , cylinders from cars_data group by cylinders" - }, - { - "index": 140, - "db_id": "car_1", - "question": "What is the maximum accelerate for all the different cylinders?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent |", - "ground_truth": "select max ( accelerate ) , cylinders from cars_data group by cylinders" - }, - { - "index": 141, - "db_id": "car_1", - "question": "Which model has the most version(make) of cars?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select model from car_names group by model order by count ( * ) desc limit 1" - }, - { - "index": 142, - "db_id": "car_1", - "question": "What model has the most different versions?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select model from car_names group by model order by count ( * ) desc limit 1" - }, - { - "index": 143, - "db_id": "car_1", - "question": "How many cars have more than 4 cylinders?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select count ( * ) from cars_data where cylinders > 4" - }, - { - "index": 144, - "db_id": "car_1", - "question": "What is the number of cars with more than 4 cylinders?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select count ( * ) from cars_data where cylinders > 4" - }, - { - "index": 145, - "db_id": "car_1", - "question": "how many cars were produced in 1980?", - "db_info": "| cars_data: mpg, cylinders, edispl, horsepower, weight, accelerate, year | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent |", - "ground_truth": "select count ( * ) from cars_data where year = 1980" - }, - { - "index": 146, - "db_id": "car_1", - "question": "In 1980, how many cars were made?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from cars_data where year = 1980" - }, - { - "index": 147, - "db_id": "car_1", - "question": "How many car models were produced by the maker with full name American Motor Company?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'" - }, - { - "index": 148, - "db_id": "car_1", - "question": "What is the number of car models created by the car maker American Motor Company?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'" - }, - { - "index": 149, - "db_id": "car_1", - "question": "Which makers designed more than 3 car models? List full name and the id.", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_makers.fullname , car_makers.id from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) > 3" - }, - { - "index": 150, - "db_id": "car_1", - "question": "What are the names and ids of all makers with more than 3 models?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_makers.fullname , car_makers.id from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) > 3" - }, - { - "index": 151, - "db_id": "car_1", - "question": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?", - "db_info": "| car_makers: fullname, country | countries: countryname, continent | continents: continent | model_list: maker, model | car_names: model, make | cars_data: weight |", - "ground_truth": "select distinct model_list.model from car_names join model_list on car_names.model = model_list.model join car_makers on model_list.maker = car_makers.id join cars_data on car_names.makeid = cars_data.id where car_makers.fullname = 'General Motors' or cars_data.weight > 3500" - }, - { - "index": 152, - "db_id": "car_1", - "question": "What are the different models created by either the car maker General Motors or weighed more than 3500?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | | car_names: makeid, model, make | | model_list: modelid, maker, model | | car_makers: id, maker, fullname, country | | countries: countryid, countryname, continent | | continents: contid, continent |", - "ground_truth": "select distinct model_list.model from car_names join model_list on car_names.model = model_list.model join car_makers on model_list.maker = car_makers.id join cars_data on car_names.makeid = cars_data.id where car_makers.fullname = 'General Motors' or cars_data.weight > 3500" - }, - { - "index": 153, - "db_id": "car_1", - "question": "In which years cars were produced weighing no less than 3000 and no more than 4000 ?", - "db_info": "| cars_data: id, weight, year | continents: contid, continent | countries: countryid, continent, countryname | car_makers: id, maker, country | model_list: modelid, maker, model | car_names: makeid, model, make |", - "ground_truth": "select distinct year from cars_data where weight between 3000 and 4000" - }, - { - "index": 154, - "db_id": "car_1", - "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 ?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_names: makeid, model, make | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select distinct year from cars_data where weight between 3000 and 4000" - }, - { - "index": 155, - "db_id": "car_1", - "question": "What is the horsepower of the car with the largest accelerate?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_names: makeid, model, make | model_list: modelid, maker, model | car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select cars_data.horsepower from cars_data order by cars_data.accelerate desc limit 1" - }, - { - "index": 156, - "db_id": "car_1", - "question": "What is the horsepower of the car with the greatest accelerate?", - "db_info": "| cars_data: horsepower, accelerate, id, mpg, cylinders, edispl, weight, year | countries: continent, countryname, countryid | continents: continent, contid | car_makers: maker, fullname, country, id | model_list: maker, model, modelid | car_names: model, make, makeid |", - "ground_truth": "select cars_data.horsepower from cars_data order by cars_data.accelerate desc limit 1" - }, - { - "index": 157, - "db_id": "car_1", - "question": "For model volvo, how many cylinders does the car with the least accelerate have?", - "db_info": "| model_list: maker, model | car_names: model, make | cars_data: cylinders, accelerate | continents: contid, continent | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country |", - "ground_truth": "select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1" - }, - { - "index": 158, - "db_id": "car_1", - "question": "For a volvo model, how many cylinders does the version with least accelerate have?", - "db_info": "| cars_data: cylinders, accelerate | countries: continent | model_list: maker | car_names: model |", - "ground_truth": "select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1" - }, - { - "index": 159, - "db_id": "car_1", - "question": "How many cars have a larger accelerate than the car with the largest horsepower?", - "db_info": "| cars_data: id, horsepower, accelerate | car_makers: id, country | countries: countryid, continent | continents: contid | model_list: modelid | car_names: makeid |", - "ground_truth": "select count ( * ) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 )" - }, - { - "index": 160, - "db_id": "car_1", - "question": "What is the number of cars with a greater accelerate than the one with the most horsepower?", - "db_info": "| cars_data: horsepower, accelerate, id | car_names: model, makeid | model_list: modelid, maker, model | car_makers: maker, countryid, id | countries: countryname, continent, countryid | continents: continent, contid |", - "ground_truth": "select count ( * ) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 )" - }, - { - "index": 161, - "db_id": "car_1", - "question": "How many countries has more than 2 car makers ?", - "db_info": "| countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | continents: contid, continent |", - "ground_truth": "select count ( * ) from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 2" - }, - { - "index": 162, - "db_id": "car_1", - "question": "What is the number of countries with more than 2 car makers ?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select count ( * ) from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 2" - }, - { - "index": 163, - "db_id": "car_1", - "question": "How many cars has over 6 cylinders?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_names: makeid, model, make | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select count ( * ) from cars_data where cylinders > 6" - }, - { - "index": 164, - "db_id": "car_1", - "question": "What is the number of carsw ith over 6 cylinders?", - "db_info": "| cars_data: cylinders | continents: continent | countries: countryname, continent | car_makers: maker, country | model_list: maker, model | car_names: model, make |", - "ground_truth": "select count ( * ) from cars_data where cylinders > 6" - }, - { - "index": 165, - "db_id": "car_1", - "question": "For the cars with 4 cylinders, which model has the largest horsepower?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 4 order by cars_data.horsepower desc limit 1" - }, - { - "index": 166, - "db_id": "car_1", - "question": "For all of the 4 cylinder cars, which model has the most horsepower?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | countries: countryid, countryname, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent |", - "ground_truth": "select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 4 order by cars_data.horsepower desc limit 1" - }, - { - "index": 167, - "db_id": "car_1", - "question": "Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.", - "db_info": "| cars_data: cylinders, horsepower | car_makers: country | car_names: makeid, model, make | model_list: maker | countries: continent | continents: N/A |", - "ground_truth": "select car_names.makeid , car_names.make from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.horsepower > ( select min ( horsepower ) from cars_data ) and cars_data.cylinders <= 3" - }, - { - "index": 168, - "db_id": "car_1", - "question": "Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?", - "db_info": "| cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select car_names.makeid , car_names.make from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.horsepower > ( select min ( horsepower ) from cars_data ) and cars_data.cylinders < 4" - }, - { - "index": 169, - "db_id": "car_1", - "question": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?", - "db_info": "| cars_data: id, mpg, cylinders, year | car_makers: id, maker | model_list: modelid, maker, model | car_names: makeid, model, make | countries: countryid, countryname, continent | continents: contid, continent |", - "ground_truth": "select max ( mpg ) from cars_data where cylinders = 8 or year < 1980" - }, - { - "index": 170, - "db_id": "car_1", - "question": "What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ?", - "db_info": "| cars_data: mpg, cylinders, year | countries: countryname, continent | car_makers: maker, country | model_list: maker, model | car_names: model, makeid | continents: continent |", - "ground_truth": "select max ( mpg ) from cars_data where cylinders = 8 or year < 1980" - }, - { - "index": 171, - "db_id": "car_1", - "question": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, weight |", - "ground_truth": "select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname != 'Ford Motor Company'" - }, - { - "index": 172, - "db_id": "car_1", - "question": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname != 'Ford Motor Company'" - }, - { - "index": 173, - "db_id": "car_1", - "question": "What are the name of the countries where there is not a single car maker?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country" - }, - { - "index": 174, - "db_id": "car_1", - "question": "What are the names of the countries with no car makers?", - "db_info": "| countries: countryname, countryid, continent | car_makers: country, id, maker, fullname | continents: continent, contid | model_list: maker, model, modelid | car_names: model, makeid, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country" - }, - { - "index": 175, - "db_id": "car_1", - "question": "Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | continents: contid, continent | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3" - }, - { - "index": 176, - "db_id": "car_1", - "question": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?", - "db_info": "| car_makers: id, maker, fullname, country | countries: countryid, countryname, continent | model_list: modelid, maker, model | car_names: makeid, model, make | continents: contid, continent | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3" - }, - { - "index": 177, - "db_id": "car_1", - "question": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'" - }, - { - "index": 178, - "db_id": "car_1", - "question": "What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?", - "db_info": "| countries: countryid, countryname, continent | continents: contid, continent | car_makers: id, maker, fullname, country | model_list: modelid, maker, model | car_names: makeid, model, make | cars_data: id, mpg, cylinders, edispl, horsepower, weight, accelerate, year |", - "ground_truth": "select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'" - }, - { - "index": 179, - "db_id": "flight_2", - "question": "Which country does Airline \"JetBlue Airways\" belong to?", - "db_info": "| airlines: airline, country, abbreviation, uid | airports: country, airportname, city, airportcode | flights: airline, sourceairport, destairport, flightno |", - "ground_truth": "select country from airlines where airline = 'JetBlue Airways'" - }, - { - "index": 180, - "db_id": "flight_2", - "question": "What country is Jetblue Airways affiliated with?", - "db_info": "| airlines: country, uid, airline, abbreviation | airports: country, airportcode, airportname, city, countryabbrev | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select country from airlines where airline = 'JetBlue Airways'" - }, - { - "index": 181, - "db_id": "flight_2", - "question": "What is the abbreviation of Airline \"JetBlue Airways\"?", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: countryabbrev, airportname, airportcode, city, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select abbreviation from airlines where airline = 'JetBlue Airways'" - }, - { - "index": 182, - "db_id": "flight_2", - "question": "Which abbreviation corresponds to Jetblue Airways?", - "db_info": "| airlines: abbreviation, airline, country | | airports: countryabbrev, airportname, airportcode, city, country | | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select abbreviation from airlines where airline = 'JetBlue Airways'" - }, - { - "index": 183, - "db_id": "flight_2", - "question": "List all airline names and their abbreviations in \"USA\".", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select airline , abbreviation from airlines where country = 'USA'" - }, - { - "index": 184, - "db_id": "flight_2", - "question": "What are the airline names and abbreviations for airlines in the USA?", - "db_info": "| airlines: airline, abbreviation | | airports: airportcode | | flights: airline, sourceairport, destairport |", - "ground_truth": "select airline , abbreviation from airlines where country = 'USA'" - }, - { - "index": 185, - "db_id": "flight_2", - "question": "List the airport code and name in the city of Anthony.", - "db_info": "| airports: airportcode, airportname, city, country, countryabbrev | airlines: abbreviation, airline, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select airportcode , airportname from airports where city = 'Anthony'" - }, - { - "index": 186, - "db_id": "flight_2", - "question": "Give the airport code and airport name corresonding to the city Anthony.", - "db_info": "| airports: airportcode, airportname, city, country, countryabbrev | airlines: abbreviation, airline, country | flights: destairport, sourceairport, airline, flightno |", - "ground_truth": "select airportcode , airportname from airports where city = 'Anthony'" - }, - { - "index": 187, - "db_id": "flight_2", - "question": "How many airlines do we have?", - "db_info": "| airlines: airline, abbreviation, country | | airports: airportname, airportcode, country, city, countryabbrev | | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from airlines" - }, - { - "index": 188, - "db_id": "flight_2", - "question": "What is the total number of airlines?", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from airlines" - }, - { - "index": 189, - "db_id": "flight_2", - "question": "How many airports do we have?", - "db_info": "| airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from airports" - }, - { - "index": 190, - "db_id": "flight_2", - "question": "Return the number of airports.", - "db_info": "| airports: airportcode, airportname, country, city, countryabbrev | airlines: uid, airline, abbreviation, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from airports" - }, - { - "index": 191, - "db_id": "flight_2", - "question": "How many flights do we have?", - "db_info": "| airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights: sourceairport, destairport, airline, flightno |", - "ground_truth": "select count ( * ) from flights" - }, - { - "index": 192, - "db_id": "flight_2", - "question": "Return the number of flights.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev |", - "ground_truth": "select count ( * ) from flights" - }, - { - "index": 193, - "db_id": "flight_2", - "question": "Which airline has abbreviation 'UAL'?", - "db_info": "| airlines: abbreviation, uid, airline | airports: countryabbrev, airportcode, airportname, country, city | flights: airline, destairport, sourceairport, flightno |", - "ground_truth": "select airline from airlines where abbreviation = 'UAL'" - }, - { - "index": 194, - "db_id": "flight_2", - "question": "Give the airline with abbreviation 'UAL'.", - "db_info": "| airlines: abbreviation, airline, uid | airports: countryabbrev, airportcode, airportname, city, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select airline from airlines where abbreviation = 'UAL'" - }, - { - "index": 195, - "db_id": "flight_2", - "question": "How many airlines are from USA?", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from airlines where country = 'USA'" - }, - { - "index": 196, - "db_id": "flight_2", - "question": "Return the number of airlines in the USA.", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from airlines where country = 'USA'" - }, - { - "index": 197, - "db_id": "flight_2", - "question": "Which city and country is the Alton airport at?", - "db_info": "| airports: city, country, airportcode, airportname, countryabbrev | airlines: country, abbreviation, airline, uid | flights: sourceairport, destairport, airline, flightno |", - "ground_truth": "select city , country from airports where airportname = 'Alton'" - }, - { - "index": 198, - "db_id": "flight_2", - "question": "Give the city and country for the Alton airport.", - "db_info": "| airports: city, country, airportcode, airportname, countryabbrev | airlines: country, abbreviation, airline | flights: airline, sourceairport, destairport, flightno |", - "ground_truth": "select city , country from airports where airportname = 'Alton'" - }, - { - "index": 199, - "db_id": "flight_2", - "question": "What is the airport name for airport 'AKO'?", - "db_info": "| airports: airportname, airportcode, country, countryabbrev, city | airlines: abbreviation, airline, country | flights: destairport, sourceairport, airline, flightno |", - "ground_truth": "select airportname from airports where airportcode = 'AKO'" - }, - { - "index": 200, - "db_id": "flight_2", - "question": "Return the name of the airport with code 'AKO'.", - "db_info": "| airports: airportcode, airportname | | flights: sourceairport, destairport, airline | | airlines: abbreviation |", - "ground_truth": "select airportname from airports where airportcode = 'AKO'" - }, - { - "index": 201, - "db_id": "flight_2", - "question": "What are airport names at City 'Aberdeen'?", - "db_info": "| airports: airportname, city, airportcode, country, countryabbrev | airlines: airline, abbreviation, uid | flights: sourceairport, destairport, airline, flightno |", - "ground_truth": "select airportname from airports where city = 'Aberdeen'" - }, - { - "index": 202, - "db_id": "flight_2", - "question": "What are the names of airports in Aberdeen?", - "db_info": "| airports: airportname, city, airportcode, country, countryabbrev | flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airportname from airports where city = 'Aberdeen'" - }, - { - "index": 203, - "db_id": "flight_2", - "question": "How many flights depart from 'APG'?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: abbreviation, airline, country | airports: airportcode, airportname, country |", - "ground_truth": "select count ( * ) from flights where sourceairport = 'APG'" - }, - { - "index": 204, - "db_id": "flight_2", - "question": "Count the number of flights departing from 'APG'.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, abbreviation, airline, country | airports: airportcode, city, airportname, country, countryabbrev |", - "ground_truth": "select count ( * ) from flights where sourceairport = 'APG'" - }, - { - "index": 205, - "db_id": "flight_2", - "question": "How many flights have destination ATO?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, country, airportname, city, countryabbrev | airlines: abbreviation, airline, country |", - "ground_truth": "select count ( * ) from flights where destairport = 'ATO'" - }, - { - "index": 206, - "db_id": "flight_2", - "question": "Count the number of flights into ATO.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, country | airlines: airline, abbreviation, country |", - "ground_truth": "select count ( * ) from flights where destairport = 'ATO'" - }, - { - "index": 207, - "db_id": "flight_2", - "question": "How many flights depart from City Aberdeen?", - "db_info": "| airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 208, - "db_id": "flight_2", - "question": "Return the number of flights departing from Aberdeen.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev |", - "ground_truth": "select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 209, - "db_id": "flight_2", - "question": "How many flights arriving in Aberdeen city?", - "db_info": "| airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 210, - "db_id": "flight_2", - "question": "Return the number of flights arriving in Aberdeen.", - "db_info": "| flights: airline, sourceairport, destairport, flightno | airports: airportname, airportcode, city, country, countryabbrev | airlines: airline, abbreviation, country, uid |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 211, - "db_id": "flight_2", - "question": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'" - }, - { - "index": 212, - "db_id": "flight_2", - "question": "How many flights fly from Aberdeen to Ashley?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'" - }, - { - "index": 213, - "db_id": "flight_2", - "question": "How many flights does airline 'JetBlue Airways' have?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: airline, abbreviation, country | airports: airportcode, airportname, country, city, countryabbrev |", - "ground_truth": "select count ( * ) from flights join airlines on flights.airline = airlines.uid where airlines.airline = 'JetBlue Airways'" - }, - { - "index": 214, - "db_id": "flight_2", - "question": "Give the number of Jetblue Airways flights.", - "db_info": "| flights: flightno, airline, sourceairport, destairport | airlines: airline, abbreviation, uid, country | airports: airportcode, airportname, countryabbrev, city, country |", - "ground_truth": "select count ( * ) from flights join airlines on flights.airline = airlines.uid where airlines.airline = 'JetBlue Airways'" - }, - { - "index": 215, - "db_id": "flight_2", - "question": "How many 'United Airlines' flights go to Airport 'ASY'?", - "db_info": "| flights: airline, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: airportname, airportcode, city, countryabbrev, country |", - "ground_truth": "select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'" - }, - { - "index": 216, - "db_id": "flight_2", - "question": "Count the number of United Airlines flights arriving in ASY Airport.", - "db_info": "| flights: airline, sourceairport, destairport, flightno | airports: airportcode, countryabbrev, country, city, airportname | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'" - }, - { - "index": 217, - "db_id": "flight_2", - "question": "How many 'United Airlines' flights depart from Airport 'AHD'?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev |", - "ground_truth": "select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.sourceairport = 'AHD'" - }, - { - "index": 218, - "db_id": "flight_2", - "question": "Return the number of United Airlines flights leaving from AHD Airport.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev |", - "ground_truth": "select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.sourceairport = 'AHD'" - }, - { - "index": 219, - "db_id": "flight_2", - "question": "How many United Airlines flights go to City 'Aberdeen'?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | | airlines: airline, abbreviation, uid, country, countryabbrev | | airports: city, airportcode, airportname, country, countryabbrev |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'" - }, - { - "index": 220, - "db_id": "flight_2", - "question": "Count the number of United Airlines flights that arrive in Aberdeen.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: airline, abbreviation, country, uid |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'" - }, - { - "index": 221, - "db_id": "flight_2", - "question": "Which city has most number of arriving flights?", - "db_info": "| airports: city, airportcode, airportname, country, countryabbrev | flights: sourceairport, destairport, airline, flightno | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1" - }, - { - "index": 222, - "db_id": "flight_2", - "question": "Which city has the most frequent destination airport?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1" - }, - { - "index": 223, - "db_id": "flight_2", - "question": "Which city has most number of departing flights?", - "db_info": "| airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1" - }, - { - "index": 224, - "db_id": "flight_2", - "question": "Which city is the most frequent source airport?", - "db_info": "| airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1" - }, - { - "index": 225, - "db_id": "flight_2", - "question": "What is the code of airport that has the highest number of flights?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1" - }, - { - "index": 226, - "db_id": "flight_2", - "question": "What is the airport code of the airport with the most flights?", - "db_info": "| airports: airportcode, airportname, city, country, countryabbrev | flights: destairport, sourceairport, airline, flightno | airlines: abbreviation, airline, uid, country |", - "ground_truth": "select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1" - }, - { - "index": 227, - "db_id": "flight_2", - "question": "What is the code of airport that has fewest number of flights?", - "db_info": "| airports: airportcode, airportname, city, countryabbrev, country | airlines: abbreviation, airline, uid | flights: flightno, airline, sourceairport, destairport |", - "ground_truth": "select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) asc limit 1" - }, - { - "index": 228, - "db_id": "flight_2", - "question": "Give the code of the airport with the least flights.", - "db_info": "| flights: airline, destairport, flightno, sourceairport | airports: airportcode, country, city | airlines: airline, country, abbreviation |", - "ground_truth": "select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) asc limit 1" - }, - { - "index": 229, - "db_id": "flight_2", - "question": "Which airline has most number of flights?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname | airlines: airline, uid |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1" - }, - { - "index": 230, - "db_id": "flight_2", - "question": "What airline serves the most flights?", - "db_info": "| flights: airline, sourceairport, destairport, flightno | airlines: airline, abbreviation, country | airports: airportcode, airportname, city, country, countryabbrev |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1" - }, - { - "index": 231, - "db_id": "flight_2", - "question": "Find the abbreviation and country of the airline that has fewest number of flights?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev |", - "ground_truth": "select airlines.abbreviation , airlines.country from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) asc limit 1" - }, - { - "index": 232, - "db_id": "flight_2", - "question": "What is the abbreviation of the airilne has the fewest flights and what country is it in?", - "db_info": "| airlines: abbreviation, airline, country | | airports: countryabbrev, airportcode, airportname, city, country | | flights: airline, destairport, sourceairport, flightno |", - "ground_truth": "select airlines.abbreviation , airlines.country from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) asc limit 1" - }, - { - "index": 233, - "db_id": "flight_2", - "question": "What are airlines that have some flight departing from airport 'AHD'?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: airportcode, airportname, country, city, countryabbrev |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'" - }, - { - "index": 234, - "db_id": "flight_2", - "question": "Which airlines have a flight with source airport AHD?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'" - }, - { - "index": 235, - "db_id": "flight_2", - "question": "What are airlines that have flights arriving at airport 'AHD'?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, countryabbrev, city, country | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'" - }, - { - "index": 236, - "db_id": "flight_2", - "question": "Which airlines have a flight with destination airport AHD?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'" - }, - { - "index": 237, - "db_id": "flight_2", - "question": "Find all airlines that have flights from both airports 'APG' and 'CVO'.", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: airportcode, airportname, country, city, countryabbrev | flights: airline, sourceairport, destairport, flightno |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'" - }, - { - "index": 238, - "db_id": "flight_2", - "question": "Which airlines have departing flights from both APG and CVO airports?", - "db_info": "| flights: sourceairport, destairport, airline, flightno | airlines: abbreviation, airline, country, uid | airports: airportcode, airportname, country, city, countryabbrev |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'" - }, - { - "index": 239, - "db_id": "flight_2", - "question": "Find all airlines that have flights from airport 'CVO' but not from 'APG'.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, country | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'" - }, - { - "index": 240, - "db_id": "flight_2", - "question": "Which airlines have departures from CVO but not from APG airports?", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: airportcode, airportname, country, city, countryabbrev | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'" - }, - { - "index": 241, - "db_id": "flight_2", - "question": "Find all airlines that have at least 10 flights.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: airline, abbreviation, country, uid | airports: airportcode, airportname, city, countryabbrev, country |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10" - }, - { - "index": 242, - "db_id": "flight_2", - "question": "Which airlines have at least 10 flights?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10" - }, - { - "index": 243, - "db_id": "flight_2", - "question": "Find all airlines that have fewer than 200 flights.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, country | airlines: airline, abbreviation, country |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200" - }, - { - "index": 244, - "db_id": "flight_2", - "question": "Which airlines have less than 200 flights?", - "db_info": "| airlines: uid, airline, abbreviation, country | airports: airportcode, airportname, countryabbrev, city | flights: airline, flightno, sourceairport, destairport |", - "ground_truth": "select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200" - }, - { - "index": 245, - "db_id": "flight_2", - "question": "What are flight numbers of Airline \"United Airlines\"?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airlines: airline, uid | airports: airportname, airportcode |", - "ground_truth": "select flights.flightno from flights join airlines on airlines.uid = flights.airline where airlines.airline = 'United Airlines'" - }, - { - "index": 246, - "db_id": "flight_2", - "question": "Which flight numbers correspond to United Airlines flights?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname | airlines: airline |", - "ground_truth": "select flights.flightno from flights join airlines on airlines.uid = flights.airline where airlines.airline = 'United Airlines'" - }, - { - "index": 247, - "db_id": "flight_2", - "question": "What are flight numbers of flights departing from Airport \"APG\"?", - "db_info": "| flights: airline, flightno, sourceairport | airlines: airline, abbreviation | airports: airportcode, airportname, city, country, countryabbrev |", - "ground_truth": "select flightno from flights where sourceairport = 'APG'" - }, - { - "index": 248, - "db_id": "flight_2", - "question": "Give the flight numbers of flights leaving from APG.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, country, countryabbrev, city | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select flightno from flights where sourceairport = 'APG'" - }, - { - "index": 249, - "db_id": "flight_2", - "question": "What are flight numbers of flights arriving at Airport \"APG\"?", - "db_info": "| flights: flightno, airline, sourceairport, destairport | airports: airportcode, airportname, countryabbrev | airlines: airline, abbreviation, country |", - "ground_truth": "select flightno from flights where destairport = 'APG'" - }, - { - "index": 250, - "db_id": "flight_2", - "question": "Give the flight numbers of flights landing at APG.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select flightno from flights where destairport = 'APG'" - }, - { - "index": 251, - "db_id": "flight_2", - "question": "What are flight numbers of flights departing from City \"Aberdeen \"?", - "db_info": "| flights: flightno, sourceairport, destairport, airline | airlines: airline, abbreviation, country | airports: airportcode, airportname, city, country, countryabbrev |", - "ground_truth": "select flights.flightno from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 252, - "db_id": "flight_2", - "question": "Give the flight numbers of flights leaving from Aberdeen.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | | airports: airportcode, airportname, country, countryabbrev | | airlines: uid, airline, abbreviation, country | Database info string: | flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select flights.flightno from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 253, - "db_id": "flight_2", - "question": "What are flight numbers of flights arriving at City \"Aberdeen\"?", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: city, airportcode, airportname | airlines: uid, airline, abbreviation |", - "ground_truth": "select flights.flightno from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 254, - "db_id": "flight_2", - "question": "Give the flight numbers of flights arriving in Aberdeen.", - "db_info": "| flights: airline, flightno, sourceairport, destairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select flights.flightno from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'" - }, - { - "index": 255, - "db_id": "flight_2", - "question": "Find the number of flights landing in the city of Aberdeen or Abilene.", - "db_info": "| flights: destairport, sourceairport, airline, flightno | airports: city, airportcode, airportname, country, countryabbrev | airlines: airline, abbreviation, country, uid |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'" - }, - { - "index": 256, - "db_id": "flight_2", - "question": "How many flights land in Aberdeen or Abilene?", - "db_info": "| airports: airportcode, airportname, country, city, countryabbrev | flights: destairport, sourceairport, airline, flightno | airlines: abbreviation, country, airline, uid |", - "ground_truth": "select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'" - }, - { - "index": 257, - "db_id": "flight_2", - "question": "Find the name of airports which do not have any flight in and out.", - "db_info": "| airports: airportcode, airportname, country, city, countryabbrev | flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airportname from airports where airportcode not in ( select sourceairport from flights union select destairport from flights )" - }, - { - "index": 258, - "db_id": "flight_2", - "question": "Which airports do not have departing or arriving flights?", - "db_info": "| airports: airportcode, city, airportname, country, countryabbrev | flights: sourceairport, destairport, airline, flightno | airlines: uid, airline, abbreviation, country |", - "ground_truth": "select airportname from airports where airportcode not in ( select sourceairport from flights union select destairport from flights )" - }, - { - "index": 259, - "db_id": "employee_hire_evaluation", - "question": "How many employees are there?", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) from employee" - }, - { - "index": 260, - "db_id": "employee_hire_evaluation", - "question": "Count the number of employees", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) from employee" - }, - { - "index": 261, - "db_id": "employee_hire_evaluation", - "question": "Sort employee names by their age in ascending order.", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name from employee order by age asc" - }, - { - "index": 262, - "db_id": "employee_hire_evaluation", - "question": "List the names of employees and sort in ascending order of age.", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name from employee order by age asc" - }, - { - "index": 263, - "db_id": "employee_hire_evaluation", - "question": "What is the number of employees from each city?", - "db_info": "| employee: city, employee_id, name, age | shop: location, shop_id, name, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) , city from employee group by city" - }, - { - "index": 264, - "db_id": "employee_hire_evaluation", - "question": "Count the number of employees for each city.", - "db_info": "| employee: employee_id, name, age, city | | shop: shop_id, name, location, district, number_products, manager_name | | hiring: shop_id, employee_id, start_from, is_full_time | | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) , city from employee group by city" - }, - { - "index": 265, - "db_id": "employee_hire_evaluation", - "question": "Which cities do more than one employee under age 30 come from?", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select city from employee where age < 30 group by city having count ( * ) > 1" - }, - { - "index": 266, - "db_id": "employee_hire_evaluation", - "question": "Find the cities that have more than one employee under age 30.", - "db_info": "| employee: city, age, employee_id, name | shop: shop_id, manager_name | hiring: shop_id, employee_id | evaluation: employee_id |", - "ground_truth": "select city from employee where age < 30 group by city having count ( * ) > 1" - }, - { - "index": 267, - "db_id": "employee_hire_evaluation", - "question": "Find the number of shops in each location.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) , location from shop group by location" - }, - { - "index": 268, - "db_id": "employee_hire_evaluation", - "question": "How many shops are there in each location?", - "db_info": "| shop: location, shop_id, name, district, number_products, manager_name | employee: city, employee_id, name, age | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) , location from shop group by location" - }, - { - "index": 269, - "db_id": "employee_hire_evaluation", - "question": "Find the manager name and district of the shop whose number of products is the largest.", - "db_info": "| shop: number_products, manager_name, district, shop_id, name, location | employee: name, employee_id, age | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select manager_name , district from shop order by number_products desc limit 1" - }, - { - "index": 270, - "db_id": "employee_hire_evaluation", - "question": "What are the manager name and district of the shop that sells the largest number of products?", - "db_info": "| shop: number_products, manager_name, district, name | employee: name, city | hiring: shop_id, employee_id, start_from | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select manager_name , district from shop order by number_products desc limit 1" - }, - { - "index": 271, - "db_id": "employee_hire_evaluation", - "question": "find the minimum and maximum number of products of all stores.", - "db_info": "| hiring: shop_id, employee_id, start_from, is_full_time | employee: employee_id, name, age, city | evaluation: employee_id, year_awarded, bonus | shop: shop_id, name, location, district, number_products, manager_name |", - "ground_truth": "select min ( number_products ) , max ( number_products ) from shop" - }, - { - "index": 272, - "db_id": "employee_hire_evaluation", - "question": "What are the minimum and maximum number of products across all the shops?", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select min ( number_products ) , max ( number_products ) from shop" - }, - { - "index": 273, - "db_id": "employee_hire_evaluation", - "question": "Return the name, location and district of all shops in descending order of number of products.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name , location , district from shop order by number_products desc" - }, - { - "index": 274, - "db_id": "employee_hire_evaluation", - "question": "Sort all the shops by number products in descending order, and return the name, location and district of each shop.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name , location , district from shop order by number_products desc" - }, - { - "index": 275, - "db_id": "employee_hire_evaluation", - "question": "Find the names of stores whose number products is more than the average number of products.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name from shop where number_products > ( select avg ( number_products ) from shop )" - }, - { - "index": 276, - "db_id": "employee_hire_evaluation", - "question": "Which shops' number products is above the average? Give me the shop names.", - "db_info": "| shop: number_products, name, shop_id, location | employee: employee_id, name, city | hiring: shop_id, employee_id | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name from shop where number_products > ( select avg ( number_products ) from shop )" - }, - { - "index": 277, - "db_id": "employee_hire_evaluation", - "question": "find the name of employee who was awarded the most times in the evaluation.", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by evaluation.employee_id order by count ( * ) desc limit 1" - }, - { - "index": 278, - "db_id": "employee_hire_evaluation", - "question": "Which employee received the most awards in evaluations? Give me the employee name.", - "db_info": "| employee: employee_id, name | shop: shop_id | hiring: shop_id, employee_id | evaluation: employee_id |", - "ground_truth": "select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by evaluation.employee_id order by count ( * ) desc limit 1" - }, - { - "index": 279, - "db_id": "employee_hire_evaluation", - "question": "Find the name of the employee who got the highest one time bonus.", - "db_info": "| employee: employee_id, name | shop: shop_id | hiring: shop_id, employee_id | evaluation: employee_id, bonus |", - "ground_truth": "select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id order by evaluation.bonus desc limit 1" - }, - { - "index": 280, - "db_id": "employee_hire_evaluation", - "question": "Which employee received the biggest bonus? Give me the employee name.", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id order by evaluation.bonus desc limit 1" - }, - { - "index": 281, - "db_id": "employee_hire_evaluation", - "question": "Find the names of employees who never won any award in the evaluation.", - "db_info": "| employee: employee_id, name | shop: shop_id | hiring: shop_id, employee_id | evaluation: employee_id |", - "ground_truth": "select name from employee where employee_id not in ( select employee_id from evaluation )" - }, - { - "index": 282, - "db_id": "employee_hire_evaluation", - "question": "What are the names of the employees who never received any evaluation?", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name from employee where employee_id not in ( select employee_id from evaluation )" - }, - { - "index": 283, - "db_id": "employee_hire_evaluation", - "question": "What is the name of the shop that is hiring the largest number of employees?", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by hiring.shop_id order by count ( * ) desc limit 1" - }, - { - "index": 284, - "db_id": "employee_hire_evaluation", - "question": "Which shop has the most employees? Give me the shop name.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by hiring.shop_id order by count ( * ) desc limit 1" - }, - { - "index": 285, - "db_id": "employee_hire_evaluation", - "question": "Find the name of the shops that do not hire any employee.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name from shop where shop_id not in ( select shop_id from hiring )" - }, - { - "index": 286, - "db_id": "employee_hire_evaluation", - "question": "Which shops run with no employees? Find the shop names", - "db_info": "| shop: name, shop_id, location, district, number_products, manager_name | employee: name, employee_id, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select name from shop where shop_id not in ( select shop_id from hiring )" - }, - { - "index": 287, - "db_id": "employee_hire_evaluation", - "question": "Find the number of employees hired in each shop; show the shop name as well.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) , shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name" - }, - { - "index": 288, - "db_id": "employee_hire_evaluation", - "question": "For each shop, return the number of employees working there and the name of the shop.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( * ) , shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name" - }, - { - "index": 289, - "db_id": "employee_hire_evaluation", - "question": "What is total bonus given in all evaluations?", - "db_info": "| evaluation: employee_id, year_awarded, bonus | employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time |", - "ground_truth": "select sum ( bonus ) from evaluation" - }, - { - "index": 290, - "db_id": "employee_hire_evaluation", - "question": "Find the total amount of bonus given in all the evaluations.", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select sum ( bonus ) from evaluation" - }, - { - "index": 291, - "db_id": "employee_hire_evaluation", - "question": "Give me all the information about hiring.", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select * from hiring" - }, - { - "index": 292, - "db_id": "employee_hire_evaluation", - "question": "What is all the information about hiring?", - "db_info": "| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select * from hiring" - }, - { - "index": 293, - "db_id": "employee_hire_evaluation", - "question": "Which district has both stores with less than 3000 products and stores with more than 10000 products?", - "db_info": "| shop: shop_id, name, district, number_products, location, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select district from shop where number_products < 3000 intersect select district from shop where number_products > 10000" - }, - { - "index": 294, - "db_id": "employee_hire_evaluation", - "question": "Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.", - "db_info": "| shop: shop_id, name, location, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select district from shop where number_products < 3000 intersect select district from shop where number_products > 10000" - }, - { - "index": 295, - "db_id": "employee_hire_evaluation", - "question": "How many different store locations are there?", - "db_info": "| shop: location, district, shop_id, name, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( distinct location ) from shop" - }, - { - "index": 296, - "db_id": "employee_hire_evaluation", - "question": "Count the number of distinct store locations.", - "db_info": "| shop: location, shop_id, name, district, number_products, manager_name | employee: city, employee_id, name, age | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |", - "ground_truth": "select count ( distinct location ) from shop" - }, - { - "index": 297, - "db_id": "cre_Doc_Template_Mgt", - "question": "How many documents do we have?", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select count ( * ) from documents" - }, - { - "index": 298, - "db_id": "cre_Doc_Template_Mgt", - "question": "Count the number of documents.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from documents" - }, - { - "index": 299, - "db_id": "cre_Doc_Template_Mgt", - "question": "List document IDs, document names, and document descriptions for all documents.", - "db_info": "| templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id , document_name , document_description from documents" - }, - { - "index": 300, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids, names, and descriptions for all documents?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id , document_name , document_description from documents" - }, - { - "index": 301, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the document name and template id for document with description with the letter 'w' in it?", - "db_info": "| documents: document_name, template_id, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_name , template_id from documents where document_description like '%w%'" - }, - { - "index": 302, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the names and template ids for documents that contain the letter w in their description.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_name , template_id from documents where document_description like '%w%'" - }, - { - "index": 303, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the document id, template id and description for document named \"Robbin CV\"?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id , template_id , document_description from documents where document_name = 'Robbin CV'" - }, - { - "index": 304, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the document id, template id, and description for the document with the name Robbin CV.", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select document_id , template_id , document_description from documents where document_name = 'Robbin CV'" - }, - { - "index": 305, - "db_id": "cre_Doc_Template_Mgt", - "question": "How many different templates do all document use?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( distinct template_id ) from documents" - }, - { - "index": 306, - "db_id": "cre_Doc_Template_Mgt", - "question": "Count the number of different templates used for documents.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( distinct template_id ) from documents" - }, - { - "index": 307, - "db_id": "cre_Doc_Template_Mgt", - "question": "How many documents are using the template with type code 'PPT'?", - "db_info": "| templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'" - }, - { - "index": 308, - "db_id": "cre_Doc_Template_Mgt", - "question": "Count the number of documents that use the PPT template type.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'" - }, - { - "index": 309, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all template ids and number of documents using each template.", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id , count ( * ) from documents group by template_id" - }, - { - "index": 310, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are all different template ids used for documents, and how many times were each of them used?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id , count ( * ) from documents group by template_id" - }, - { - "index": 311, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the id and type code for the template used by the most documents?", - "db_info": "| documents: document_id, template_id | templates: template_id, template_type_code | ref_template_types: template_type_code | paragraphs: paragraph_id, document_id |", - "ground_truth": "select documents.template_id , templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by documents.template_id order by count ( * ) desc limit 1" - }, - { - "index": 312, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the id and type code of the template that is used for the greatest number of documents.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select documents.template_id , templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by documents.template_id order by count ( * ) desc limit 1" - }, - { - "index": 313, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show ids for all templates that are used by more than one document.", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | | paragraphs: paragraph_id, document_id, paragraph_text, other_details | | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select template_id from documents group by template_id having count ( * ) > 1" - }, - { - "index": 314, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the template ids of any templates used in more than a single document?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id from documents group by template_id having count ( * ) > 1" - }, - { - "index": 315, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show ids for all templates not used by any document.", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id from templates except select template_id from documents" - }, - { - "index": 316, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids for templates that are not used in any documents?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id from templates except select template_id from documents" - }, - { - "index": 317, - "db_id": "cre_Doc_Template_Mgt", - "question": "How many templates do we have?", - "db_info": "| templates: template_id, version_number, date_effective_from, date_effective_to, template_type_code, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from templates" - }, - { - "index": 318, - "db_id": "cre_Doc_Template_Mgt", - "question": "Count the number of templates.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from templates" - }, - { - "index": 319, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show template ids, version numbers, and template type codes for all templates.", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id , version_number , template_type_code from templates" - }, - { - "index": 320, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids, version numbers, and type codes for each template?", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id , version_number , template_type_code from templates" - }, - { - "index": 321, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all distinct template type codes for all templates.", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select distinct template_type_code from templates" - }, - { - "index": 322, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the different template type codes?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select distinct template_type_code from templates" - }, - { - "index": 323, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids of templates with template type code PP or PPT?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id from templates where template_type_code = 'PP' or template_type_code = 'PPT'" - }, - { - "index": 324, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the ids of templates that have the code PP or PPT.", - "db_info": "| templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_id from templates where template_type_code = 'PP' or template_type_code = 'PPT'" - }, - { - "index": 325, - "db_id": "cre_Doc_Template_Mgt", - "question": "How many templates have template type code CV?", - "db_info": "| templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from templates where template_type_code = 'CV'" - }, - { - "index": 326, - "db_id": "cre_Doc_Template_Mgt", - "question": "Count the number of templates of the type CV.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from templates where template_type_code = 'CV'" - }, - { - "index": 327, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the version number and template type code for the template with version number later than 5?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select version_number , template_type_code from templates where version_number > 5" - }, - { - "index": 328, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the version numbers and template type codes of templates with a version number greater than 5.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select version_number , template_type_code from templates where version_number > 5" - }, - { - "index": 329, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all template type codes and number of templates for each.", - "db_info": "| templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code , count ( * ) from templates group by template_type_code" - }, - { - "index": 330, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the different template type codes, and how many templates correspond to each?", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code , count ( * ) from templates group by template_type_code" - }, - { - "index": 331, - "db_id": "cre_Doc_Template_Mgt", - "question": "Which template type code has most number of templates?", - "db_info": "| templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1" - }, - { - "index": 332, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the type code of the template type that the most templates belong to.", - "db_info": "| templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1" - }, - { - "index": 333, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all template type codes with less than three templates.", - "db_info": "| templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from templates group by template_type_code having count ( * ) < 3" - }, - { - "index": 334, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the codes of template types that have fewer than 3 templates?", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from templates group by template_type_code having count ( * ) < 3" - }, - { - "index": 335, - "db_id": "cre_Doc_Template_Mgt", - "question": "What the smallest version number and its template type code?", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select min ( version_number ) , template_type_code from templates" - }, - { - "index": 336, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the lowest version number, along with its corresponding template type code.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select min ( version_number ) , template_type_code from templates" - }, - { - "index": 337, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the template type code of the template used by document with the name \"Data base\"?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select templates.template_type_code from templates join documents on templates.template_id = documents.template_id where documents.document_name = 'Data base'" - }, - { - "index": 338, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the template type code of the template that is used by a document named Data base.", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select templates.template_type_code from templates join documents on templates.template_id = documents.template_id where documents.document_name = 'Data base'" - }, - { - "index": 339, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all document names using templates with template type code BK.", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select documents.document_name from templates join documents on templates.template_id = documents.template_id where templates.template_type_code = 'BK'" - }, - { - "index": 340, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the names of documents that use templates with the code BK?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select documents.document_name from templates join documents on templates.template_id = documents.template_id where templates.template_type_code = 'BK'" - }, - { - "index": 341, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all template type codes and the number of documents using each type.", - "db_info": "| templates: template_type_code, template_id, version_number | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description | paragraphs: document_id, paragraph_id, paragraph_text |", - "ground_truth": "select templates.template_type_code , count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code" - }, - { - "index": 342, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the different template type codes, and how many documents use each type?", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select templates.template_type_code , count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code" - }, - { - "index": 343, - "db_id": "cre_Doc_Template_Mgt", - "question": "Which template type code is used by most number of documents?", - "db_info": "| templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1" - }, - { - "index": 344, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the code of the template type that is most commonly used in documents.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1" - }, - { - "index": 345, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all template type codes that are not used by any document.", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id" - }, - { - "index": 346, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the codes of template types that are not used for any document?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id" - }, - { - "index": 347, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all template type codes and descriptions.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code , template_type_description from ref_template_types" - }, - { - "index": 348, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the type codes and descriptions for all template types?", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code , template_type_description from ref_template_types" - }, - { - "index": 349, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the template type descriptions for template type code \"AD\".", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_description from ref_template_types where template_type_code = 'AD'" - }, - { - "index": 350, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the template type description of the template type with the code AD.", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_description from ref_template_types where template_type_code = 'AD'" - }, - { - "index": 351, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the template type code for template type description \"Book\".", - "db_info": "| templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from ref_template_types where template_type_description = 'Book'" - }, - { - "index": 352, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the type code of the template type with the description \"Book\".", - "db_info": "| templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select template_type_code from ref_template_types where template_type_description = 'Book'" - }, - { - "index": 353, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the distinct template type descriptions for the templates ever used by any document?", - "db_info": "| ref_template_types: template_type_code, template_type_description | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id" - }, - { - "index": 354, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the different descriptions for templates that have been used in a document.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id" - }, - { - "index": 355, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the template ids with template type description \"Presentation\".", - "db_info": "| templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details |", - "ground_truth": "select templates.template_id from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code where ref_template_types.template_type_description = 'Presentation'" - }, - { - "index": 356, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the ids corresponding to templates with the description 'Presentation'.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select templates.template_id from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code where ref_template_types.template_type_description = 'Presentation'" - }, - { - "index": 357, - "db_id": "cre_Doc_Template_Mgt", - "question": "How many paragraphs in total?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from paragraphs" - }, - { - "index": 358, - "db_id": "cre_Doc_Template_Mgt", - "question": "Count the number of paragraphs.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select count ( * ) from paragraphs" - }, - { - "index": 359, - "db_id": "cre_Doc_Template_Mgt", - "question": "How many paragraphs for the document with name 'Summer Show'?", - "db_info": "| documents: document_id, template_id, document_name | templates: template_id, template_type_code | ref_template_types: template_type_code | paragraphs: document_id |", - "ground_truth": "select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'" - }, - { - "index": 360, - "db_id": "cre_Doc_Template_Mgt", - "question": "Count the number of paragraphs in the document named 'Summer Show'.", - "db_info": "| templates: template_id, template_type_code | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id | paragraphs: document_id |", - "ground_truth": "select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'" - }, - { - "index": 361, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show paragraph details for paragraph with text 'Korea ' .", - "db_info": "| paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select other_details from paragraphs where paragraph_text like 'korea'" - }, - { - "index": 362, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the details for the paragraph that includes the text 'Korea ' ?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select other_details from paragraphs where paragraph_text like 'korea'" - }, - { - "index": 363, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all paragraph ids and texts for the document with name 'Welcome to NY'.", - "db_info": "| paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select paragraphs.paragraph_id , paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'" - }, - { - "index": 364, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?", - "db_info": "| paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select paragraphs.paragraph_id , paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'" - }, - { - "index": 365, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all paragraph texts for the document \"Customer reviews\".", - "db_info": "| templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Customer reviews'" - }, - { - "index": 366, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the paragraph texts for the document with the name 'Customer reviews'?", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Customer reviews'" - }, - { - "index": 367, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all document ids and the number of paragraphs in each document. Order by document id.", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id , count ( * ) from paragraphs group by document_id order by document_id asc" - }, - { - "index": 368, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id , count ( * ) from paragraphs group by document_id order by document_id asc" - }, - { - "index": 369, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show all document ids, names and the number of paragraphs in each document.", - "db_info": "| documents: document_id, template_id, document_name | templates: template_id, template_type_code | paragraphs: paragraph_id, document_id, paragraph_text | ref_template_types: template_type_code |", - "ground_truth": "select paragraphs.document_id , documents.document_name , count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id" - }, - { - "index": 370, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids and names of each document, as well as the number of paragraphs in each?", - "db_info": "| documents: document_id, template_id, document_name | templates: template_id, version_number, template_type_code | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text |", - "ground_truth": "select paragraphs.document_id , documents.document_name , count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id" - }, - { - "index": 371, - "db_id": "cre_Doc_Template_Mgt", - "question": "List all document ids with at least two paragraphs.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id from paragraphs group by document_id having count ( * ) >= 2" - }, - { - "index": 372, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids of documents that have 2 or more paragraphs?", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select document_id from paragraphs group by document_id having count ( * ) >= 2" - }, - { - "index": 373, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the document id and name with greatest number of paragraphs?", - "db_info": "| documents: document_id, template_id, document_name | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text |", - "ground_truth": "select paragraphs.document_id , documents.document_name from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id order by count ( * ) desc limit 1" - }, - { - "index": 374, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the id and name of the document with the most paragraphs.", - "db_info": "| documents: document_id, template_id, document_name | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | paragraphs: paragraph_id, document_id, paragraph_text | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select paragraphs.document_id , documents.document_name from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id order by count ( * ) desc limit 1" - }, - { - "index": 375, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the document id with least number of paragraphs?", - "db_info": "| paragraphs: document_id | documents: document_id, template_id | templates: template_id, template_type_code | ref_template_types: template_type_code |", - "ground_truth": "select document_id from paragraphs group by document_id order by count ( * ) asc limit 1" - }, - { - "index": 376, - "db_id": "cre_Doc_Template_Mgt", - "question": "Return the id of the document with the fewest paragraphs.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id from paragraphs group by document_id order by count ( * ) asc limit 1" - }, - { - "index": 377, - "db_id": "cre_Doc_Template_Mgt", - "question": "What is the document id with 1 to 2 paragraphs?", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select document_id from paragraphs group by document_id having count ( * ) between 1 and 2" - }, - { - "index": 378, - "db_id": "cre_Doc_Template_Mgt", - "question": "Give the ids of documents that have between one and two paragraphs.", - "db_info": "| templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: paragraph_id, document_id, paragraph_text, other_details |", - "ground_truth": "select document_id from paragraphs group by document_id having count ( * ) between 1 and 2" - }, - { - "index": 379, - "db_id": "cre_Doc_Template_Mgt", - "question": "Show the document id with paragraph text 'Brazil' and 'Ireland'.", - "db_info": "| paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'" - }, - { - "index": 380, - "db_id": "cre_Doc_Template_Mgt", - "question": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?", - "db_info": "| documents: document_id, template_id, document_name, document_description, other_details | | paragraphs: paragraph_id, document_id, paragraph_text, other_details | | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to | | ref_template_types: template_type_code, template_type_description | The database info string in the required format is: | paragraphs: paragraph_id, document_id, paragraph_text, other_details | | documents: document_id, template_id, document_name, document_description, other_details | | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to | | ref_template_types: template_type_code, template_type_description |", - "ground_truth": "select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'" - }, - { - "index": 381, - "db_id": "course_teach", - "question": "How many teachers are there?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select count ( * ) from teacher" - }, - { - "index": 382, - "db_id": "course_teach", - "question": "What is the total count of teachers?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select count ( * ) from teacher" - }, - { - "index": 383, - "db_id": "course_teach", - "question": "List the names of teachers in ascending order of age.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select name from teacher order by age asc" - }, - { - "index": 384, - "db_id": "course_teach", - "question": "What are the names of the teachers ordered by ascending age?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select name from teacher order by age asc" - }, - { - "index": 385, - "db_id": "course_teach", - "question": "What are the age and hometown of teachers?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select age , hometown from teacher" - }, - { - "index": 386, - "db_id": "course_teach", - "question": "What is the age and hometown of every teacher?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select age , hometown from teacher" - }, - { - "index": 387, - "db_id": "course_teach", - "question": "List the name of teachers whose hometown is not `` Little Lever Urban District '' .", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select name from teacher where hometown != 'little lever urban district'" - }, - { - "index": 388, - "db_id": "course_teach", - "question": "What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select name from teacher where hometown != 'little lever urban district'" - }, - { - "index": 389, - "db_id": "course_teach", - "question": "Show the name of teachers aged either 32 or 33?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select name from teacher where age = 32 or age = 33" - }, - { - "index": 390, - "db_id": "course_teach", - "question": "What are the names of the teachers who are aged either 32 or 33?", - "db_info": "| teacher: name, age, hometown | course: course_id, starting_date, course | course_arrange: teacher_id, course_id, grade |", - "ground_truth": "select name from teacher where age = 32 or age = 33" - }, - { - "index": 391, - "db_id": "course_teach", - "question": "What is the hometown of the youngest teacher?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select hometown from teacher order by age asc limit 1" - }, - { - "index": 392, - "db_id": "course_teach", - "question": "Where is the youngest teacher from?", - "db_info": "| teacher: teacher_id, name, age, hometown | course_arrange: course_id, teacher_id, grade | course: course_id, starting_date, course |", - "ground_truth": "select hometown from teacher order by age asc limit 1" - }, - { - "index": 393, - "db_id": "course_teach", - "question": "Show different hometown of teachers and the number of teachers from each hometown.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select hometown , count ( * ) from teacher group by hometown" - }, - { - "index": 394, - "db_id": "course_teach", - "question": "For each hometown, how many teachers are there?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select hometown , count ( * ) from teacher group by hometown" - }, - { - "index": 395, - "db_id": "course_teach", - "question": "List the most common hometown of teachers.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select hometown from teacher group by hometown order by count ( * ) desc limit 1" - }, - { - "index": 396, - "db_id": "course_teach", - "question": "What is the most commmon hometowns for teachers?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select hometown from teacher group by hometown order by count ( * ) desc limit 1" - }, - { - "index": 397, - "db_id": "course_teach", - "question": "Show the hometowns shared by at least two teachers.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select hometown from teacher group by hometown having count ( * ) >= 2" - }, - { - "index": 398, - "db_id": "course_teach", - "question": "What are the towns from which at least two teachers come from?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select hometown from teacher group by hometown having count ( * ) >= 2" - }, - { - "index": 399, - "db_id": "course_teach", - "question": "Show names of teachers and the courses they are arranged to teach.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id" - }, - { - "index": 400, - "db_id": "course_teach", - "question": "What is the name of each teacher and what course they teach?", - "db_info": "| course: course_id, starting_date, course | teacher: teacher_id, name, age, hometown | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id" - }, - { - "index": 401, - "db_id": "course_teach", - "question": "Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id order by teacher.name asc" - }, - { - "index": 402, - "db_id": "course_teach", - "question": "What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id order by teacher.name asc" - }, - { - "index": 403, - "db_id": "course_teach", - "question": "Show the name of the teacher for the math course.", - "db_info": "| course: course_id, course | teacher: teacher_id, name | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id where course.course = 'Math'" - }, - { - "index": 404, - "db_id": "course_teach", - "question": "What are the names of the people who teach math courses?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id where course.course = 'Math'" - }, - { - "index": 405, - "db_id": "course_teach", - "question": "Show names of teachers and the number of courses they teach.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name , count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name" - }, - { - "index": 406, - "db_id": "course_teach", - "question": "What are the names of the teachers and how many courses do they teach?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name , count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name" - }, - { - "index": 407, - "db_id": "course_teach", - "question": "Show names of teachers that teach at least two courses.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name having count ( * ) >= 2" - }, - { - "index": 408, - "db_id": "course_teach", - "question": "What are the names of the teachers who teach at least two courses?", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select teacher.name from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name having count ( * ) >= 2" - }, - { - "index": 409, - "db_id": "course_teach", - "question": "List the names of teachers who have not been arranged to teach courses.", - "db_info": "| teacher: teacher_id, name, age, hometown | course: course_id, starting_date | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select name from teacher where teacher_id not in ( select teacher_id from course_arrange )" - }, - { - "index": 410, - "db_id": "course_teach", - "question": "What are the names of the teachers whose courses have not been arranged?", - "db_info": "| teacher: teacher_id, name | course: course_id, starting_date | course_arrange: course_id, teacher_id, grade |", - "ground_truth": "select name from teacher where teacher_id not in ( select teacher_id from course_arrange )" - }, - { - "index": 411, - "db_id": "museum_visit", - "question": "How many visitors below age 30 are there?", - "db_info": "| visitor: id, age | museum: museum_id, name | visit: visitor_id, museum_id, num_of_ticket, total_spent |", - "ground_truth": "select count ( * ) from visitor where age < 30" - }, - { - "index": 412, - "db_id": "museum_visit", - "question": "Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.", - "db_info": "| museum: museum_id, name | visitor: id, name, level_of_membership | visit: visitor_id, museum_id |", - "ground_truth": "select name from visitor where level_of_membership > 4 order by level_of_membership desc" - }, - { - "index": 413, - "db_id": "museum_visit", - "question": "What is the average age of the visitors whose membership level is not higher than 4?", - "db_info": "| visitor: id, name, level_of_membership, age | museum: museum_id, name, num_of_staff, open_year | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select avg ( age ) from visitor where level_of_membership <= 4" - }, - { - "index": 414, - "db_id": "museum_visit", - "question": "Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.", - "db_info": "| visitor: level_of_membership, age | museum: museum_id, name | visit: visitor_id, museum_id, num_of_ticket, total_spent |", - "ground_truth": "select name , level_of_membership from visitor where level_of_membership > 4 order by age desc" - }, - { - "index": 415, - "db_id": "museum_visit", - "question": "Find the id and name of the museum that has the most staff members?", - "db_info": "| museum: num_of_staff, museum_id, name, open_year | visitor: id, name, level_of_membership, age | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select museum_id , name from museum order by num_of_staff desc limit 1" - }, - { - "index": 416, - "db_id": "museum_visit", - "question": "Find the average number of staff working for the museums that were open before 2009.", - "db_info": "| museum: open_year, num_of_staff | visitor: id, name, level_of_membership, age | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select avg ( num_of_staff ) from museum where open_year < 2009" - }, - { - "index": 417, - "db_id": "museum_visit", - "question": "What are the opening year and staff number of the museum named Plaza Museum?", - "db_info": "| museum: name, open_year, museum_id, num_of_staff | visitor: id, name, level_of_membership, age | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select num_of_staff , open_year from museum where name = 'Plaza Museum'" - }, - { - "index": 418, - "db_id": "museum_visit", - "question": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.", - "db_info": "| museum: museum_id, name, num_of_staff, open_year | visitor: id | visit: museum_id, visitor_id |", - "ground_truth": "select name from museum where num_of_staff > ( select min ( num_of_staff ) from museum where open_year > 2010 )" - }, - { - "index": 419, - "db_id": "museum_visit", - "question": "find the id, name and age for visitors who visited some museums more than once.", - "db_info": "| visit: museum_id, visitor_id, num_of_ticket, total_spent | visitor: id, name, age, level_of_membership | museum: museum_id, name, num_of_staff, open_year |", - "ground_truth": "select visitor.id , visitor.name , visitor.age from visitor join visit on visitor.id = visit.visitor_id group by visitor.id having count ( * ) > 1" - }, - { - "index": 420, - "db_id": "museum_visit", - "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?", - "db_info": "| visitor: id, name, level_of_membership | museum: museum_id, name | visit: visitor_id, museum_id, num_of_ticket, total_spent |", - "ground_truth": "select visit.visitor_id , visitor.name , visitor.level_of_membership from visitor join visit on visitor.id = visit.visitor_id group by visit.visitor_id order by sum ( visit.total_spent ) desc limit 1" - }, - { - "index": 421, - "db_id": "museum_visit", - "question": "What are the id and name of the museum visited most times?", - "db_info": "| visit: museum_id, visitor_id, num_of_ticket, total_spent | museum: museum_id, name, num_of_staff, open_year | visitor: id, name, level_of_membership, age |", - "ground_truth": "select visit.museum_id , museum.name from museum join visit on museum.museum_id = visit.museum_id group by visit.museum_id order by count ( * ) desc limit 1" - }, - { - "index": 422, - "db_id": "museum_visit", - "question": "What is the name of the museum that had no visitor yet?", - "db_info": "| museum: name, museum_id, num_of_staff, open_year | visitor: name, id, level_of_membership, age | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select name from museum where museum_id not in ( select museum_id from visit )" - }, - { - "index": 423, - "db_id": "museum_visit", - "question": "Find the name and age of the visitor who bought the most tickets at once.", - "db_info": "| museum: museum_id, name | visitor: id, name, age | visit: museum_id, visitor_id, num_of_ticket |", - "ground_truth": "select visitor.name , visitor.age from visitor join visit on visitor.id = visit.visitor_id order by visit.num_of_ticket desc limit 1" - }, - { - "index": 424, - "db_id": "museum_visit", - "question": "What are the average and maximum number of tickets bought in all visits?", - "db_info": "| visit: visitor_id, museum_id, num_of_ticket, total_spent | visitor: id, name, level_of_membership, age | museum: museum_id, name, num_of_staff, open_year |", - "ground_truth": "select avg ( num_of_ticket ) , max ( num_of_ticket ) from visit" - }, - { - "index": 425, - "db_id": "museum_visit", - "question": "What is the total ticket expense of the visitors whose membership level is 1?", - "db_info": "| visitor: id, name, level_of_membership, age | museum: museum_id, name, num_of_staff, open_year | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select sum ( visit.total_spent ) from visitor join visit on visitor.id = visit.visitor_id where visitor.level_of_membership = 1" - }, - { - "index": 426, - "db_id": "museum_visit", - "question": "What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?", - "db_info": "| museum: museum_id, name, open_year, num_of_staff | visitor: id, name, level_of_membership, age | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select visitor.name from visitor join visit on visitor.id = visit.visitor_id join museum on museum.museum_id = visit.museum_id where museum.open_year < 2009 intersect select visitor.name from visitor join visit on visitor.id = visit.visitor_id join museum on museum.museum_id = visit.museum_id where museum.open_year > 2011" - }, - { - "index": 427, - "db_id": "museum_visit", - "question": "Find the number of visitors who did not visit any museum opened after 2010.", - "db_info": "| museum: open_year, museum_id, name, num_of_staff | | visitor: id, name, level_of_membership, age | | visit: visitor_id, museum_id, num_of_ticket, total_spent |", - "ground_truth": "select count ( * ) from visitor where id not in ( select visit.visitor_id from museum join visit on museum.museum_id = visit.museum_id where museum.open_year > 2010 )" - }, - { - "index": 428, - "db_id": "museum_visit", - "question": "How many museums were opened after 2013 or before 2008?", - "db_info": "| museum: museum_id, name, num_of_staff, open_year | visitor: id, name, level_of_membership, age | visit: museum_id, visitor_id, num_of_ticket, total_spent |", - "ground_truth": "select count ( * ) from museum where open_year > 2013 or open_year < 2008" - }, - { - "index": 429, - "db_id": "wta_1", - "question": "Find the total number of players.", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id | rankings: player_id, ranking_date, ranking, ranking_points, tours |", - "ground_truth": "select count ( * ) from players" - }, - { - "index": 430, - "db_id": "wta_1", - "question": "How many players are there?", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, match_num, tourney_date, tourney_id, winner_name, loser_name | rankings: ranking_date, ranking, player_id, ranking_points |", - "ground_truth": "select count ( * ) from players" - }, - { - "index": 431, - "db_id": "wta_1", - "question": "Find the total number of matches.", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_name, loser_name, year | rankings: ranking_date, ranking, player_id, ranking_points, tours |", - "ground_truth": "select count ( * ) from matches" - }, - { - "index": 432, - "db_id": "wta_1", - "question": "Count the number of matches.", - "db_info": "| matches: match_num, winner_id, loser_id, winner_name, loser_name, round, score, surface | players: player_id, first_name, last_name, hand, birth_date, country_code | rankings: ranking_date, ranking, player_id, ranking_points, tours |", - "ground_truth": "select count ( * ) from matches" - }, - { - "index": 433, - "db_id": "wta_1", - "question": "List the first name and birth date of all players from the country with code USA.", - "db_info": "| players: first_name, birth_date, country_code, player_id | | matches: winner_id, loser_id | | rankings: player_id |", - "ground_truth": "select first_name , birth_date from players where country_code = 'USA'" - }, - { - "index": 434, - "db_id": "wta_1", - "question": "What are the first names and birth dates of players from the USA?", - "db_info": "| players: first_name, birth_date | matches: winner_name, loser_name, winner_id, loser_id | rankings: player_id, ranking_date |", - "ground_truth": "select first_name , birth_date from players where country_code = 'USA'" - }, - { - "index": 435, - "db_id": "wta_1", - "question": "Find the average age of losers and winners of all matches.", - "db_info": "| matches: loser_age, loser_id, winner_age, winner_id | players: player_id, first_name, last_name, birth_date | rankings: ranking_date, player_id |", - "ground_truth": "select avg ( loser_age ) , avg ( winner_age ) from matches" - }, - { - "index": 436, - "db_id": "wta_1", - "question": "What are the average ages of losers and winners across matches?", - "db_info": "| matches: loser_age, winner_age, loser_id, winner_id | players: player_id, birth_date, first_name, last_name | rankings: player_id |", - "ground_truth": "select avg ( loser_age ) , avg ( winner_age ) from matches" - }, - { - "index": 437, - "db_id": "wta_1", - "question": "Find the average rank of winners in all matches.", - "db_info": "| players: player_id, first_name, last_name, hand, country_code | matches: winner_id, winner_rank, winner_rank_points | rankings: player_id, ranking, ranking_points |", - "ground_truth": "select avg ( winner_rank ) from matches" - }, - { - "index": 438, - "db_id": "wta_1", - "question": "What is the average rank for winners in all matches?", - "db_info": "| matches: winner_id, match_num, minutes, round, score, surface, tourney_date, winner_age | players: player_id, first_name, last_name, hand, birth_date, country_code | rankings: ranking_date, player_id, ranking, ranking_points |", - "ground_truth": "select avg ( winner_rank ) from matches" - }, - { - "index": 439, - "db_id": "wta_1", - "question": "Find the highest rank of losers in all matches.", - "db_info": "| matches: match_num, loser_rank, loser_name, score, surface, tourney_date, tourney_name | players: player_id, first_name, last_name, hand, birth_date, country_code | rankings: ranking_date, player_id, ranking, ranking_points |", - "ground_truth": "select min ( loser_rank ) from matches" - }, - { - "index": 440, - "db_id": "wta_1", - "question": "What is the best rank of losers across all matches?", - "db_info": "| matches: loser_rank, loser_rank_points, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_name, winner_rank, winner_rank_points, year | players: player_id, first_name, last_name, hand, birth_date, country_code | rankings: ranking_date, ranking, ranking_points |", - "ground_truth": "select min ( loser_rank ) from matches" - }, - { - "index": 441, - "db_id": "wta_1", - "question": "find the number of distinct country codes of all players.", - "db_info": "| players: country_code, player_id, first_name, last_name, hand, birth_date | | matches: winner_id, loser_id, best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed, year | | rankings: player_id, ranking_date, ranking, ranking_points, tours |", - "ground_truth": "select count ( distinct country_code ) from players" - }, - { - "index": 442, - "db_id": "wta_1", - "question": "How many distinct countries do players come from?", - "db_info": "| players: country_code, player_id, first_name, last_name, hand, birth_date | matches: winner_id, loser_id, country_code, tourney_date, tourney_id, winner_name, loser_name | rankings: player_id, ranking_date, ranking |", - "ground_truth": "select count ( distinct country_code ) from players" - }, - { - "index": 443, - "db_id": "wta_1", - "question": "Find the number of distinct name of losers.", - "db_info": "| matches: loser_name, loser_id | players: player_id, first_name, last_name | rankings: player_id |", - "ground_truth": "select count ( distinct loser_name ) from matches" - }, - { - "index": 444, - "db_id": "wta_1", - "question": "How many different loser names are there?", - "db_info": "| matches: loser_name, loser_id, loser_rank | players: loser_name, player_id, first_name, last_name | rankings: player_id, ranking_date, ranking |", - "ground_truth": "select count ( distinct loser_name ) from matches" - }, - { - "index": 445, - "db_id": "wta_1", - "question": "Find the name of tourney that has more than 10 matches.", - "db_info": "| matches: match_num, tourney_name, winner_id, loser_id | players: player_id, first_name, last_name, birth_date, country_code | rankings: player_id, ranking_date |", - "ground_truth": "select tourney_name from matches group by tourney_name having count ( * ) > 10" - }, - { - "index": 446, - "db_id": "wta_1", - "question": "What are the names of tournaments that have more than 10 matches?", - "db_info": "| matches: match_num, tourney_name | players: first_name, last_name, birth_date, country_code | rankings: ranking |", - "ground_truth": "select tourney_name from matches group by tourney_name having count ( * ) > 10" - }, - { - "index": 447, - "db_id": "wta_1", - "question": "List the names of all winners who played in both 2013 and 2016.", - "db_info": "| matches: match_num, winner_id, year | players: player_id, first_name, last_name, birth_date, country_code | rankings: player_id, ranking_date |", - "ground_truth": "select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016" - }, - { - "index": 448, - "db_id": "wta_1", - "question": "What are the names of players who won in both 2013 and 2016?", - "db_info": "| players: player_id, first_name, last_name, birth_date, country_code, hand | matches: winner_id, loser_id, year | rankings: player_id, ranking_date |", - "ground_truth": "select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016" - }, - { - "index": 449, - "db_id": "wta_1", - "question": "List the number of all matches who played in years of 2013 or 2016.", - "db_info": "| players: player_id, first_name, last_name, birth_date, country_code | matches: tourney_date, winner_id, loser_id, year | rankings: ranking_date, player_id, ranking |", - "ground_truth": "select count ( * ) from matches where year = 2013 or year = 2016" - }, - { - "index": 450, - "db_id": "wta_1", - "question": "How many matches were played in 2013 or 2016?", - "db_info": "| matches: match_num, tourney_date, year | players: player_id, birth_date, country_code | rankings: ranking_date, player_id |", - "ground_truth": "select count ( * ) from matches where year = 2013 or year = 2016" - }, - { - "index": 451, - "db_id": "wta_1", - "question": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?", - "db_info": "| players: country_code, first_name | matches: tourney_id, winner_id, tourney_name | rankings: player_id |", - "ground_truth": "select players.country_code , players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'WTA Championships' intersect select players.country_code , players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'Australian Open'" - }, - { - "index": 452, - "db_id": "wta_1", - "question": "What are the first names and country codes for players who won both the WTA Championships and the Australian Open?", - "db_info": "| players: first_name, country_code | matches: winner_id, loser_id, tourney_name | rankings: player_id |", - "ground_truth": "select players.country_code , players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'WTA Championships' intersect select players.country_code , players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'Australian Open'" - }, - { - "index": 453, - "db_id": "wta_1", - "question": "Find the first name and country code of the oldest player.", - "db_info": "| players: first_name, birth_date, country_code | matches: loser_age, winner_age, winner_id, loser_id | rankings: ranking_date, ranking, player_id |", - "ground_truth": "select first_name , country_code from players order by birth_date asc limit 1" - }, - { - "index": 454, - "db_id": "wta_1", - "question": "What is the first name and country code of the oldest player?", - "db_info": "| players: birth_date, first_name, country_code | matches: winner_id, loser_id, loser_age | rankings: player_id, ranking_date, ranking_points |", - "ground_truth": "select first_name , country_code from players order by birth_date asc limit 1" - }, - { - "index": 455, - "db_id": "wta_1", - "question": "List the first and last name of all players in the order of birth date.", - "db_info": "| players: first_name, last_name, birth_date | | matches: winner_name, loser_name, tourney_date | | rankings: player_id |", - "ground_truth": "select first_name , last_name from players order by birth_date asc" - }, - { - "index": 456, - "db_id": "wta_1", - "question": "What are the full names of all players, sorted by birth date?", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_id, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed, year | rankings: ranking_date, ranking, player_id, ranking_points, tours |", - "ground_truth": "select first_name , last_name from players order by birth_date asc" - }, - { - "index": 457, - "db_id": "wta_1", - "question": "List the first and last name of all players who are left / L hand in the order of birth date.", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, winner_name, loser_name, winner_hand, loser_hand, birth_date | rankings: ranking_date, player_id, ranking, ranking_points, tours |", - "ground_truth": "select first_name , last_name from players where hand = 'L' order by birth_date asc" - }, - { - "index": 458, - "db_id": "wta_1", - "question": "What are the full names of all left handed players, in order of birth date?", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_id, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed, year | rankings: ranking_date, ranking, player_id, ranking_points, tours |", - "ground_truth": "select first_name , last_name from players where hand = 'L' order by birth_date asc" - }, - { - "index": 459, - "db_id": "wta_1", - "question": "Find the first name and country code of the player who did the most number of tours.", - "db_info": "| players: player_id, first_name, country_code, last_name | matches: winner_id, loser_id | rankings: player_id, tours |", - "ground_truth": "select players.country_code , players.first_name from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1" - }, - { - "index": 460, - "db_id": "wta_1", - "question": "What is the first name and country code of the player with the most tours?", - "db_info": "| players: player_id, first_name, last_name, country_code | matches: winner_id, loser_id, tourney_id | rankings: player_id, tours |", - "ground_truth": "select players.country_code , players.first_name from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1" - }, - { - "index": 461, - "db_id": "wta_1", - "question": "Find the year that has the most number of matches.", - "db_info": "| matches: winner_id, loser_id, year | players: player_id, first_name, last_name, hand, birth_date, country_code | rankings: player_id, ranking_date, ranking, ranking_points |", - "ground_truth": "select year from matches group by year order by count ( * ) desc limit 1" - }, - { - "index": 462, - "db_id": "wta_1", - "question": "Which year had the most matches?", - "db_info": "| players: year, player_id, first_name, last_name, hand, birth_date, country_code | matches: year, best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_id, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed | rankings: player_id, ranking_date, ranking, ranking_points, tours |", - "ground_truth": "select year from matches group by year order by count ( * ) desc limit 1" - }, - { - "index": 463, - "db_id": "wta_1", - "question": "Find the name and rank points of the winner who won the most times.", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, winner_name, winner_rank_points, tourney_id | rankings: ranking_date, ranking, player_id, ranking_points |", - "ground_truth": "select winner_name , winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1" - }, - { - "index": 464, - "db_id": "wta_1", - "question": "What is the name of the winner who has won the most matches, and how many rank points does this player have?", - "db_info": "| matches: winner_name, winner_rank_points, winner_id, loser_id | players: player_id, first_name, last_name, birth_date, country_code | rankings: player_id, ranking_points |", - "ground_truth": "select winner_name , winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1" - }, - { - "index": 465, - "db_id": "wta_1", - "question": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.", - "db_info": "| players: player_id, first_name, last_name, winner_rank_points | | matches: winner_id, tourney_name | | rankings: player_id, ranking_points | Therefore, the database info string is: | players: player_id, first_name, last_name, winner_rank_points | matches: winner_id, tourney_name | rankings: player_id, ranking_points |", - "ground_truth": "select winner_name from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1" - }, - { - "index": 466, - "db_id": "wta_1", - "question": "What is the name of the winner with the most rank points who participated in the Australian Open tournament?", - "db_info": "| matches: winner_id, winner_name, winner_rank_points, tournament_id, round | players: player_id, first_name, last_name, hand, birth_date, country_code | rankings: player_id, ranking_points |", - "ground_truth": "select winner_name from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1" - }, - { - "index": 467, - "db_id": "wta_1", - "question": "find the names of loser and winner who played in the match with greatest number of minutes.", - "db_info": "| matches: winner_id, loser_id, minutes | players: player_id, first_name, last_name | rankings: player_id |", - "ground_truth": "select winner_name , loser_name from matches order by minutes desc limit 1" - }, - { - "index": 468, - "db_id": "wta_1", - "question": "What are the names of the winner and loser who played in the longest match?", - "db_info": "| players: player_id, winner_name, loser_name, first_name, last_name | rankings: player_id, ranking_date, ranking, ranking_points | matches: winner_id, loser_id, minutes, score, match_num |", - "ground_truth": "select winner_name , loser_name from matches order by minutes desc limit 1" - }, - { - "index": 469, - "db_id": "wta_1", - "question": "Find the average ranking for each player and their first name.", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, winner_name, loser_name, winner_rank, loser_rank | rankings: ranking_date, ranking, player_id, ranking_points, tours |", - "ground_truth": "select avg ( ranking ) , players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" - }, - { - "index": 470, - "db_id": "wta_1", - "question": "What are the first names of all players, and their average rankings?", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_id, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed, year | rankings: ranking_date, ranking, player_id, ranking_points, tours |", - "ground_truth": "select avg ( ranking ) , players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" - }, - { - "index": 471, - "db_id": "wta_1", - "question": "Find the total ranking points for each player and their first name.", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, winner_name, loser_name, winner_rank_points, loser_rank_points | rankings: ranking_date, player_id, ranking_points |", - "ground_truth": "select sum ( ranking_points ) , players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" - }, - { - "index": 472, - "db_id": "wta_1", - "question": "What are the first names of all players, and their total ranking points?", - "db_info": "| players: player_id, first_name | matches: winner_id, loser_id | rankings: player_id, ranking_points |", - "ground_truth": "select sum ( ranking_points ) , players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" - }, - { - "index": 473, - "db_id": "wta_1", - "question": "find the number of players for each country.", - "db_info": "| players: player_id, country_code, first_name, last_name, hand, birth_date | matches: winner_id, loser_id, country_code, tourney_date, tourney_id, surface | rankings: player_id, ranking_date, ranking, ranking_points |", - "ground_truth": "select count ( * ) , country_code from players group by country_code" - }, - { - "index": 474, - "db_id": "wta_1", - "question": "How many players are from each country?", - "db_info": "| players: country_code, player_id, first_name, last_name, hand, birth_date | matches: winner_id, loser_id, best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed, year | rankings: player_id, ranking_date, ranking, ranking_points, tours |", - "ground_truth": "select count ( * ) , country_code from players group by country_code" - }, - { - "index": 475, - "db_id": "wta_1", - "question": "find the code of the country where has the greatest number of players.", - "db_info": "| players: country_code, player_id | matches: winner_id, loser_id | rankings: player_id, ranking_points |", - "ground_truth": "select country_code from players group by country_code order by count ( * ) desc limit 1" - }, - { - "index": 476, - "db_id": "wta_1", - "question": "What is the code of the country with the most players?", - "db_info": "| players: country_code, player_id, first_name, last_name, hand, birth_date | matches: winner_id, loser_id, country_code, tourney_date, winner_name, loser_name | rankings: player_id, ranking_date, ranking, ranking_points |", - "ground_truth": "select country_code from players group by country_code order by count ( * ) desc limit 1" - }, - { - "index": 477, - "db_id": "wta_1", - "question": "Find the codes of countries that have more than 50 players.", - "db_info": "| players: player_id, country_code, first_name, last_name, hand, birth_date | matches: winner_id, loser_id, country_code, tourney_date, round, score | rankings: ranking_date, player_id, ranking, ranking_points |", - "ground_truth": "select country_code from players group by country_code having count ( * ) > 50" - }, - { - "index": 478, - "db_id": "wta_1", - "question": "What are the codes of countries with more than 50 players?", - "db_info": "| players: country_code, player_id, first_name, last_name, hand, birth_date | matches: best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_id, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed, year |", - "ground_truth": "select country_code from players group by country_code having count ( * ) > 50" - }, - { - "index": 479, - "db_id": "wta_1", - "question": "Find the total number of tours for each ranking date.", - "db_info": "| rankings: ranking_date, player_id, tours | players: player_id, tours, ranking_date, first_name, last_name, hand, birth_date, country_code | matches: tourney_date, tourney_id, winner_id, loser_id, tours, round |", - "ground_truth": "select sum ( tours ) , ranking_date from rankings group by ranking_date" - }, - { - "index": 480, - "db_id": "wta_1", - "question": "How many total tours were there for each ranking date?", - "db_info": "| rankings: ranking_date, player_id, tours | players: player_id, first_name, last_name, hand, birth_date, country_code | matches: tourney_date, winner_id, loser_id, round |", - "ground_truth": "select sum ( tours ) , ranking_date from rankings group by ranking_date" - }, - { - "index": 481, - "db_id": "wta_1", - "question": "Find the number of matches happened in each year.", - "db_info": "| players: birth_date, country_code, player_id, first_name, last_name | matches: year, winner_id, loser_id | rankings: ranking_date, player_id |", - "ground_truth": "select count ( * ) , year from matches group by year" - }, - { - "index": 482, - "db_id": "wta_1", - "question": "How many matches were played in each year?", - "db_info": "| matches: best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, score, surface, tourney_date, tourney_id, tourney_level, tourney_name, winner_age, winner_entry, winner_hand, winner_ht, winner_id, winner_ioc, winner_name, winner_rank, winner_rank_points, winner_seed, year | players: player_id, first_name, last_name, hand, birth_date, country_code | rankings: ranking_date, ranking, player_id, ranking_points, tours |", - "ground_truth": "select count ( * ) , year from matches group by year" - }, - { - "index": 483, - "db_id": "wta_1", - "question": "Find the name and rank of the 3 youngest winners across all matches.", - "db_info": "| players: player_id, first_name, last_name, birth_date | matches: winner_id, winner_name, winner_age | rankings: player_id, ranking_date, ranking |", - "ground_truth": "select distinct winner_name , winner_rank from matches order by winner_age asc limit 3" - }, - { - "index": 484, - "db_id": "wta_1", - "question": "What are the names and ranks of the three youngest winners across all matches?", - "db_info": "| matches: winner_age, winner_name | players: birth_date, first_name, last_name | rankings: player_id, ranking_date, ranking |", - "ground_truth": "select distinct winner_name , winner_rank from matches order by winner_age asc limit 3" - }, - { - "index": 485, - "db_id": "wta_1", - "question": "How many different winners both participated in the WTA Championships and were left handed?", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, winner_hand | rankings: player_id |", - "ground_truth": "select count ( distinct winner_name ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'L'" - }, - { - "index": 486, - "db_id": "wta_1", - "question": "Find the number of left handed winners who participated in the WTA Championships.", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, winner_hand, loser_hand, tourney_id, year | rankings: player_id, ranking_date, ranking, ranking_points |", - "ground_truth": "select count ( distinct winner_name ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'L'" - }, - { - "index": 487, - "db_id": "wta_1", - "question": "Find the first name, country code and birth date of the winner who has the highest rank points in all matches.", - "db_info": "| players: first_name, country_code, birth_date | matches: winner_id, winner_rank_points | rankings: ranking_points |", - "ground_truth": "select players.first_name , players.country_code , players.birth_date from players join matches on players.player_id = matches.winner_id order by matches.winner_rank_points desc limit 1" - }, - { - "index": 488, - "db_id": "wta_1", - "question": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches?", - "db_info": "| players: player_id, first_name, country_code, birth_date | matches: winner_id, loser_id, winner_rank_points | rankings: player_id, ranking_points |", - "ground_truth": "select players.first_name , players.country_code , players.birth_date from players join matches on players.player_id = matches.winner_id order by matches.winner_rank_points desc limit 1" - }, - { - "index": 489, - "db_id": "wta_1", - "question": "Find the number of players for each hand type.", - "db_info": "| players: player_id, hand, birth_date, country_code, first_name | matches: winner_id, loser_id, hand, best_of, draw_size | rankings: player_id, ranking_date, ranking, ranking_points, tours |", - "ground_truth": "select count ( * ) , hand from players group by hand" - }, - { - "index": 490, - "db_id": "wta_1", - "question": "How many players are there for each hand type?", - "db_info": "| players: player_id, first_name, last_name, hand, birth_date, country_code | matches: winner_id, loser_id, hand, round | rankings: player_id, ranking, ranking_points |", - "ground_truth": "select count ( * ) , hand from players group by hand" - }, - { - "index": 491, - "db_id": "battle_death", - "question": "How many ships ended up being 'Captured'?", - "db_info": "| ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | battle: result, name, id, date, bulgarian_commander, latin_commander | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select count ( * ) from ship where disposition_of_ship = 'Captured'" - }, - { - "index": 492, - "db_id": "battle_death", - "question": "List the name and tonnage ordered by in descending alphaetical order for the names.", - "db_info": "| battle: name, tonnage, id, date | ship: name, tonnage, id, lost_in_battle, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select name , tonnage from ship order by name desc" - }, - { - "index": 493, - "db_id": "battle_death", - "question": "List the name, date and result of each battle.", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select name , date from battle" - }, - { - "index": 494, - "db_id": "battle_death", - "question": "What is maximum and minimum death toll caused each time?", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select max ( killed ) , min ( killed ) from death" - }, - { - "index": 495, - "db_id": "battle_death", - "question": "What is the average number of injuries caused each time?", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select avg ( injured ) from death" - }, - { - "index": 496, - "db_id": "battle_death", - "question": "What are the death and injury situations caused by the ship with tonnage 't'?", - "db_info": "| ship: tonnage, name, lost_in_battle, location, disposition_of_ship | battle: name, date, bulgarian_commander, latin_commander, result | death: caused_by_ship_id, note, killed, injured |", - "ground_truth": "select death.killed , death.injured from death join ship on death.caused_by_ship_id = ship.id where ship.tonnage = 't'" - }, - { - "index": 497, - "db_id": "battle_death", - "question": "What are the name and results of the battles when the bulgarian commander is not 'Boril'", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select name , result from battle where bulgarian_commander != 'Boril'" - }, - { - "index": 498, - "db_id": "battle_death", - "question": "What are the different ids and names of the battles that lost any 'Brig' type shipes?", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select distinct battle.id , battle.name from battle join ship on battle.id = ship.lost_in_battle where ship.ship_type = 'Brig'" - }, - { - "index": 499, - "db_id": "battle_death", - "question": "What are the ids and names of the battles that led to more than 10 people killed in total.", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select battle.id , battle.name from battle join ship on battle.id = ship.lost_in_battle join death on ship.id = death.caused_by_ship_id group by battle.id having sum ( death.killed ) > 10" - }, - { - "index": 500, - "db_id": "battle_death", - "question": "What is the ship id and name that caused most total injuries?", - "db_info": "| death: caused_by_ship_id, id, note, killed, injured | battle: id, name, date, bulgarian_commander, latin_commander, result | ship: id, name, lost_in_battle, tonnage, ship_type, location, disposition_of_ship |", - "ground_truth": "select ship.id , ship.name from death join ship on death.caused_by_ship_id = ship.id group by ship.id order by count ( * ) desc limit 1" - }, - { - "index": 501, - "db_id": "battle_death", - "question": "What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: id, name, lost_in_battle, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select name from battle where bulgarian_commander = 'Kaloyan' and latin_commander = 'Baldwin I'" - }, - { - "index": 502, - "db_id": "battle_death", - "question": "How many different results are there for the battles?", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select count ( distinct result ) from battle" - }, - { - "index": 503, - "db_id": "battle_death", - "question": "How many battles did not lose any ship with tonnage '225'?", - "db_info": "| ship: id, name, lost_in_battle, tonnage, ship_type, location, disposition_of_ship | battle: id, name, date, result | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select count ( * ) from battle where id not in ( select lost_in_battle from ship where tonnage = '225' )" - }, - { - "index": 504, - "db_id": "battle_death", - "question": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'", - "db_info": "| battle: id, name, date, bulgarian_commander, latin_commander, result | ship: lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship | death: caused_by_ship_id, id, note, killed, injured |", - "ground_truth": "select battle.name , battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'Lettice' intersect select battle.name , battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'HMS Atalanta'" - }, - { - "index": 505, - "db_id": "battle_death", - "question": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.", - "db_info": "| battle: name, result, bulgarian_commander, latin_commander, id | ship: lost_in_battle, name, location, tonnage, ship_type, id | death: caused_by_ship_id, note, killed, injured, id |", - "ground_truth": "select name , result , bulgarian_commander from battle except select battle.name , battle.result , battle.bulgarian_commander from battle join ship on battle.id = ship.lost_in_battle where ship.location = 'English Channel'" - }, - { - "index": 506, - "db_id": "battle_death", - "question": "What are the notes of the death events which has substring 'East'?", - "db_info": "| death: note, id, caused_by_ship_id, killed, injured | battle: name, note, id, date, bulgarian_commander, latin_commander, result | ship: name, id, lost_in_battle, tonnage, ship_type, location, disposition_of_ship |", - "ground_truth": "select note from death where note like '%East%'" - }, - { - "index": 507, - "db_id": "student_transcripts_tracking", - "question": "what are all the addresses including line 1 and line 2?", - "db_info": "| addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country | | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | | courses: course_id, course_name, course_description, other_details | | departments: department_id, department_name, department_description, other_details | | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | | sections: section_id, course_id, section_name, section_description, other_details | | semesters: semester_id, semester_name, semester_description, other_details | | student_enrollment: student_enrollment_id, degree_program_id, semester_id, student_id, other_details | | student_enrollment_courses: student_course_id, course_id, student_enrollment_id | | transcripts: transcript_id, transcript_date, other_details | | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select line_1 , line_2 from addresses" - }, - { - "index": 508, - "db_id": "student_transcripts_tracking", - "question": "What is the first and second line for all addresses?", - "db_info": "| addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select line_1 , line_2 from addresses" - }, - { - "index": 509, - "db_id": "student_transcripts_tracking", - "question": "How many courses in total are listed?", - "db_info": "| courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | transcripts: transcript_id, transcript_date, other_details |", - "ground_truth": "select count ( * ) from courses" - }, - { - "index": 510, - "db_id": "student_transcripts_tracking", - "question": "How many courses are there?", - "db_info": "| |", - "ground_truth": "select count ( * ) from courses" - }, - { - "index": 511, - "db_id": "student_transcripts_tracking", - "question": "How is the math course described?", - "db_info": "| courses: course_name, course_description, other_details | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | departments: department_name, department_description, other_details | sections: section_name, section_description, other_details | semesters: semester_name, semester_description, other_details | students: first_name, middle_name, last_name, email_address, other_student_details | degree_programs: degree_summary_name, degree_summary_description, other_details | student_enrolment: other_details | student_enrolment_courses: | transcripts: transcript_date, other_details |", - "ground_truth": "select course_description from courses where course_name = 'math'" - }, - { - "index": 512, - "db_id": "student_transcripts_tracking", - "question": "What are the descriptions for all the math courses?", - "db_info": "| courses: course_description, course_id, course_name, other_details | departments: department_description, department_id, department_name, other_details | degree_programs: degree_summary_description, degree_program_id, degree_summary_name, department_id, other_details | sections: course_id, section_description, section_id, section_name, other_details | semesters: semester_description, semester_id, semester_name, other_details | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | students: cell_mobile_number, current_address_id, email_address, first_name, last_name, middle_name, other_student_details, permanent_address_id, ssn, student_id, date_first_registered, date_left | student_enrolment: degree_program_id, other_details, semester_id, student_enrolment_id, student_id | student_enrolment_courses: course_id, student_course_id, student_enrolment_id | transcripts: other_details, transcript_date, transcript_id | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select course_description from courses where course_name = 'math'" - }, - { - "index": 513, - "db_id": "student_transcripts_tracking", - "question": "What is the zip code of the address in the city Port Chelsea?", - "db_info": "| addresses: zip_postcode, city | students: current_address_id, permanent_address_id | departments: department_id | degree_programs: department_id |", - "ground_truth": "select zip_postcode from addresses where city = 'Port Chelsea'" - }, - { - "index": 514, - "db_id": "student_transcripts_tracking", - "question": "What is the zip code for Port Chelsea?", - "db_info": "| addresses: zip_postcode, city | courses: - | departments: - | degree_programs: - | sections: - | semesters: - | students: - | student_enrollment: - | student_enrollment_courses: - | transcripts: - | transcript_contents: - |", - "ground_truth": "select zip_postcode from addresses where city = 'Port Chelsea'" - }, - { - "index": 515, - "db_id": "student_transcripts_tracking", - "question": "Which department offers the most number of degrees? List department name and id.", - "db_info": "| departments: department_id, department_name | degree_programs: department_id, degree_program_id | courses: course_id, course_name | student_enrolment: degree_program_id, student_enrolment_id | students: student_id, permanent_address_id, current_address_id | addresses: address_id, line_1, line_2 |", - "ground_truth": "select departments.department_name , degree_programs.department_id from degree_programs join departments on degree_programs.department_id = departments.department_id group by degree_programs.department_id order by count ( * ) desc limit 1" - }, - { - "index": 516, - "db_id": "student_transcripts_tracking", - "question": "What is the name and id of the department with the most number of degrees ?", - "db_info": "| departments: department_id, department_name | degree_programs: department_id, degree_summary_name | courses: course_id, course_name | sections: course_id, section_name | student_enrolment: degree_program_id, student_id | students: student_id, first_name, last_name | addresses: address_id, city |", - "ground_truth": "select departments.department_name , degree_programs.department_id from degree_programs join departments on degree_programs.department_id = departments.department_id group by degree_programs.department_id order by count ( * ) desc limit 1" - }, - { - "index": 517, - "db_id": "student_transcripts_tracking", - "question": "How many departments offer any degree?", - "db_info": "| departments: department_id, department_name, department_description | degree_programs: department_id | courses: course_id |", - "ground_truth": "select count ( distinct department_id ) from degree_programs" - }, - { - "index": 518, - "db_id": "student_transcripts_tracking", - "question": "How many different departments offer degrees?", - "db_info": "| departments: department_id, department_name | degree_programs: department_id | courses: course_id | student_enrolment: degree_program_id | student_enrolment_courses: course_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | sections: course_id | semesters: | students: current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | transcripts: | transcript_contents: student_course_id |", - "ground_truth": "select count ( distinct department_id ) from degree_programs" - }, - { - "index": 519, - "db_id": "student_transcripts_tracking", - "question": "How many different degree names are offered?", - "db_info": "| departments: department_name | degree_programs: degree_summary_name | courses: course_name | student_enrolment: degree_program_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select count ( distinct degree_summary_name ) from degree_programs" - }, - { - "index": 520, - "db_id": "student_transcripts_tracking", - "question": "How many different degrees are offered?", - "db_info": "| degree_programs: degree_summary_name, degree_summary_description |", - "ground_truth": "select count ( distinct degree_summary_name ) from degree_programs" - }, - { - "index": 521, - "db_id": "student_transcripts_tracking", - "question": "How many degrees does the engineering department offer?", - "db_info": "| departments: department_id, department_name, department_description | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description | courses: course_id, course_name, course_description | student_enrolment: student_enrolment_id, degree_program_id | students: student_id | addresses: address_id | sections: section_id, course_id, section_name, section_description | semesters: semester_id, semester_name, semester_description | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'" - }, - { - "index": 522, - "db_id": "student_transcripts_tracking", - "question": "How many degrees does the engineering department have?", - "db_info": "| departments: department_id, department_name | degree_programs: department_id, degree_summary_name, degree_summary_description | courses: course_id, course_name, course_description | student_enrolment: degree_program_id, semester_id | students: student_id | addresses: address_id | semesters: semester_id | student_enrolment_courses: course_id | transcript_contents: student_course_id | transcripts: transcript_id |", - "ground_truth": "select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'" - }, - { - "index": 523, - "db_id": "student_transcripts_tracking", - "question": "What are the names and descriptions of all the sections?", - "db_info": "| sections: section_name, section_description, course_id, other_details | courses: course_name, course_description, other_details | departments: department_name, department_description, other_details | degree_programs: degree_summary_name, degree_summary_description, department_id, other_details | semesters: semester_name, semester_description, other_details | students: first_name, last_name, other_student_details, current_address_id, permanent_address_id | student_enrolment: degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: course_id, student_enrolment_id | addresses: city, line_1, line_2, line_3, country, zip_postcode, state_province_county, other_address_details | transcripts: transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select section_name , section_description from sections" - }, - { - "index": 524, - "db_id": "student_transcripts_tracking", - "question": "What are the names and descriptions for all the sections?", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select section_name , section_description from sections" - }, - { - "index": 525, - "db_id": "student_transcripts_tracking", - "question": "What are the names and id of courses having at most 2 sections?", - "db_info": "| courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select courses.course_name , courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_id having count ( * ) <= 2" - }, - { - "index": 526, - "db_id": "student_transcripts_tracking", - "question": "What are the names and ids of every course with less than 2 sections?", - "db_info": "| courses: course_name, course_id | sections: course_id, section_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select courses.course_name , courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_id having count ( * ) <= 2" - }, - { - "index": 527, - "db_id": "student_transcripts_tracking", - "question": "List the section_name in reversed lexicographical order.", - "db_info": "| sections: section_id, course_id, section_name, section_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | courses: course_id, course_name, course_description, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details |", - "ground_truth": "select section_name from sections order by section_name desc" - }, - { - "index": 528, - "db_id": "student_transcripts_tracking", - "question": "What are the names of the sections in reverse alphabetical order?", - "db_info": "| sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | student_enrolment_courses.course_id = courses.course_id | transcript_contents.transcript_id = transcripts.transcript_id | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | sections.course_id = courses.course_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | students.current_address_id = addresses.address_id | students.permanent_address_id = addresses.address_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id | degree_programs.department_id = departments.department_id |", - "ground_truth": "select section_name from sections order by section_name desc" - }, - { - "index": 529, - "db_id": "student_transcripts_tracking", - "question": "What is the semester which most student registered in? Show both the name and the id.", - "db_info": "| |", - "ground_truth": "select semesters.semester_name , semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_id order by count ( * ) desc limit 1" - }, - { - "index": 530, - "db_id": "student_transcripts_tracking", - "question": "For each semester, what is the name and id of the one with the most students registered?", - "db_info": "| semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select semesters.semester_name , semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_id order by count ( * ) desc limit 1" - }, - { - "index": 531, - "db_id": "student_transcripts_tracking", - "question": "What is the description of the department whose name has the substring the computer?", - "db_info": "| departments: department_name, department_description | degree_programs: department_id, degree_summary_description | addresses: address_id, line_1, line_2, line_3 | courses: course_id, course_description |", - "ground_truth": "select department_description from departments where department_name like '%computer%'" - }, - { - "index": 532, - "db_id": "student_transcripts_tracking", - "question": "What is the department description for the one whose name has the word computer?", - "db_info": "| departments: department_id, department_name, department_description, other_details | courses: course_id, course_name, course_description, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select department_description from departments where department_name like '%computer%'" - }, - { - "index": 533, - "db_id": "student_transcripts_tracking", - "question": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | courses: course_id, course_name, course_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select students.first_name , students.middle_name , students.last_name , students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id having count ( * ) = 2" - }, - { - "index": 534, - "db_id": "student_transcripts_tracking", - "question": "What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select students.first_name , students.middle_name , students.last_name , students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id having count ( * ) = 2" - }, - { - "index": 535, - "db_id": "student_transcripts_tracking", - "question": "Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.", - "db_info": "| students: first_name, middle_name, last_name | | student_enrolment: student_id, degree_program_id, semester_id | | degree_programs: degree_summary_name, department_id |", - "ground_truth": "select distinct students.first_name , students.middle_name , students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id join degree_programs on student_enrolment.degree_program_id = degree_programs.degree_program_id where degree_programs.degree_summary_name = 'Bachelor'" - }, - { - "index": 536, - "db_id": "student_transcripts_tracking", - "question": "What are the first, middle, and last names for everybody enrolled in a Bachelors program?", - "db_info": "| students: first_name, middle_name, last_name, current_address_id, permanent_address_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select distinct students.first_name , students.middle_name , students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id join degree_programs on student_enrolment.degree_program_id = degree_programs.degree_program_id where degree_programs.degree_summary_name = 'Bachelor'" - }, - { - "index": 537, - "db_id": "student_transcripts_tracking", - "question": "Find the kind of program which most number of students are enrolled in?", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_summary_name order by count ( * ) desc limit 1" - }, - { - "index": 538, - "db_id": "student_transcripts_tracking", - "question": "What is the degree summary name that has the most number of students enrolled?", - "db_info": "| degree_programs: degree_summary_name, department_id, degree_summary_description, other_details | student_enrolment: degree_program_id, semester_id, student_id, other_details | students: permanent_address_id, current_address_id, student_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment_courses: course_id, student_enrolment_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_summary_name order by count ( * ) desc limit 1" - }, - { - "index": 539, - "db_id": "student_transcripts_tracking", - "question": "Find the program which most number of students are enrolled in. List both the id and the summary.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | departments: department_id, department_name, department_description, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select degree_programs.degree_program_id , degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_program_id order by count ( * ) desc limit 1" - }, - { - "index": 540, - "db_id": "student_transcripts_tracking", - "question": "What is the program id and the summary of the degree that has the most students enrolled?", - "db_info": "| degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description | | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id | | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | | sections: section_id, course_id, section_name, section_description, other_details | | courses: course_id, course_name, course_description, other_details | | departments: department_id, department_name, department_description, other_details | | transcripts: transcript_id, transcript_date, other_details | | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | | semesters: semester_id, semester_name, semester_description, other_details | | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select degree_programs.degree_program_id , degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_program_id order by count ( * ) desc limit 1" - }, - { - "index": 541, - "db_id": "student_transcripts_tracking", - "question": "Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.", - "db_info": "| students: student_id, first_name, middle_name, last_name | student_enrolment: student_id | student_enrolment_courses: student_enrolment_id | degree_programs: degree_program_id | semesters: semester_id | courses: course_id | sections: course_id | transcripts: transcript_id | addresses: address_id |", - "ground_truth": "select students.student_id , students.first_name , students.middle_name , students.last_name , count ( * ) , students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id order by count ( * ) desc limit 1" - }, - { - "index": 542, - "db_id": "student_transcripts_tracking", - "question": "What is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program?", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | departments: department_id, department_name, department_description, other_details | courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select students.student_id , students.first_name , students.middle_name , students.last_name , count ( * ) , students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id order by count ( * ) desc limit 1" - }, - { - "index": 543, - "db_id": "student_transcripts_tracking", - "question": "Which semesters do not have any student enrolled? List the semester name.", - "db_info": "| semesters: semester_name | student_enrolment: semester_id, student_id | students: student_id, first_name, middle_name, last_name |", - "ground_truth": "select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )" - }, - { - "index": 544, - "db_id": "student_transcripts_tracking", - "question": "What is the name of the semester with no students enrolled?", - "db_info": "| semesters: semester_name | addresses: city, state_province_county, country | courses: N/A | departments: N/A | degree_programs: N/A | sections: N/A | students: N/A | student_enrolment: N/A | student_enrolment_courses: N/A | transcripts: N/A | transcript_contents: N/A |", - "ground_truth": "select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )" - }, - { - "index": 545, - "db_id": "student_transcripts_tracking", - "question": "What are all the course names of the courses which ever have students enrolled in?", - "db_info": "| courses: course_name, course_id, course_description, other_details | | student_enrolment_courses: course_id, student_enrolment_id | | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | | sections: section_id, course_id, section_name, section_description, other_details | | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | | semesters: semester_id, semester_name, semester_description, other_details | | departments: department_id, department_name, department_description, other_details | | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | | transcripts: transcript_id, transcript_date, other_details | | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select distinct courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id" - }, - { - "index": 546, - "db_id": "student_transcripts_tracking", - "question": "What are the names of all courses that have some students enrolled?", - "db_info": "| student_enrolment_courses: course_id, student_enrolment_id | courses: course_name | students: student_id | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country | departments: department_name | degree_programs: degree_summary_name | sections: course_id | semesters: semester_id | student_enrolment: degree_program_id, semester_id, student_id | transcripts: transcript_id | transcript_contents: student_course_id |", - "ground_truth": "select distinct courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id" - }, - { - "index": 547, - "db_id": "student_transcripts_tracking", - "question": "What's the name of the course with most number of enrollments?", - "db_info": "| courses: course_name | | addresses: city, zip_postcode | | departments: department_name | | degree_programs: N/A | | sections: N/A | | semesters: N/A | | students: N/A | | student_enrolment: N/A | | student_enrolment_courses: N/A | | transcripts: N/A | | transcript_contents: N/A |", - "ground_truth": "select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1" - }, - { - "index": 548, - "db_id": "student_transcripts_tracking", - "question": "What is the name of the course with the most students enrolled?", - "db_info": "| courses: course_name | student_enrolment_courses: course_id | student_enrolment: student_id | students: student_id | departments: department_id | degree_programs: degree_program_id |", - "ground_truth": "select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1" - }, - { - "index": 549, - "db_id": "student_transcripts_tracking", - "question": "Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.", - "db_info": "| students: last_name, current_address_id, permanent_address_id | addresses: state_province_county, line_1, line_2, line_3, city |", - "ground_truth": "select students.last_name from students join addresses on students.current_address_id = addresses.address_id where addresses.state_province_county = 'NorthCarolina' except select distinct students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id" - }, - { - "index": 550, - "db_id": "student_transcripts_tracking", - "question": "What are the last name of the students who live in North Carolina but have not registered in any degree programs?", - "db_info": "| students: last_name | addresses: state_province_county, other_address_details, city, zip_postcode |", - "ground_truth": "select students.last_name from students join addresses on students.current_address_id = addresses.address_id where addresses.state_province_county = 'NorthCarolina' except select distinct students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id" - }, - { - "index": 551, - "db_id": "student_transcripts_tracking", - "question": "Show the date and id of the transcript with at least 2 course results.", - "db_info": "| students: student_id, permanent_address_id, current_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select transcripts.transcript_date , transcript_contents.transcript_id from transcript_contents join transcripts on transcript_contents.transcript_id = transcripts.transcript_id group by transcript_contents.transcript_id having count ( * ) >= 2" - }, - { - "index": 552, - "db_id": "student_transcripts_tracking", - "question": "What is the date and id of the transcript with at least 2 courses listed?", - "db_info": "| transcripts: transcript_id, transcript_date, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | sections: section_id, course_id, section_name, section_description, other_details | courses: course_id, course_name, course_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | student_enrolment_courses.course_id = courses.course_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | students.permanent_address_id = addresses.address_id | students.current_address_id = addresses.address_id | transcript_contents.transcript_id = transcripts.transcript_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id |", - "ground_truth": "select transcripts.transcript_date , transcript_contents.transcript_id from transcript_contents join transcripts on transcript_contents.transcript_id = transcripts.transcript_id group by transcript_contents.transcript_id having count ( * ) >= 2" - }, - { - "index": 553, - "db_id": "student_transcripts_tracking", - "question": "What is the phone number of the man with the first name Timmothy and the last name Ward?", - "db_info": "| students: first_name, last_name | addresses: address_id | student_enrolment: student_id | transcripts: | transcript_contents: | courses: | departments: | degree_programs: | sections: | semesters: |", - "ground_truth": "select cell_mobile_number from students where first_name = 'Timmothy' and last_name = 'Ward'" - }, - { - "index": 554, - "db_id": "student_transcripts_tracking", - "question": "What is the mobile phone number of the student named Timmothy Ward ?", - "db_info": "| students: cell_mobile_number, first_name, last_name | addresses: address_id, line_1, line_2, line_3 |", - "ground_truth": "select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward'" - }, - { - "index": 555, - "db_id": "student_transcripts_tracking", - "question": "Who is the first student to register? List the first name, middle name and last name.", - "db_info": "| students: first_name, middle_name, last_name, date_first_registered | student_enrolment: student_id, degree_program_id, semester_id | student_enrolment_courses: student_enrolment_id, course_id |", - "ground_truth": "select first_name , middle_name , last_name from students order by date_first_registered asc limit 1" - }, - { - "index": 556, - "db_id": "student_transcripts_tracking", - "question": "What is the first, middle, and last name of the first student to register?", - "db_info": "| students: first_name, middle_name, last_name | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | degree_programs: department_id, degree_program_id, degree_summary_name, degree_summary_description, other_details | sections: course_id, section_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | student_enrolment: student_id, student_enrolment_id, degree_program_id, semester_id, other_details | student_enrolment_courses: course_id, student_course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: transcript_id, student_course_id |", - "ground_truth": "select first_name , middle_name , last_name from students order by date_first_registered asc limit 1" - }, - { - "index": 557, - "db_id": "student_transcripts_tracking", - "question": "Who is the earliest graduate of the school? List the first name, middle name and last name.", - "db_info": "| students: current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | degree_programs: department_id, degree_summary_name, degree_summary_description, other_details | sections: course_id, section_name, section_description, other_details | courses: course_name, course_description, other_details | semesters: semester_name, semester_description, other_details | departments: department_name, department_description, other_details | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment: degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: course_id, student_enrolment_id | transcripts: transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select first_name , middle_name , last_name from students order by date_left asc limit 1" - }, - { - "index": 558, - "db_id": "student_transcripts_tracking", - "question": "What is the first, middle, and last name of the earliest school graduate?", - "db_info": "| students: first_name, middle_name, last_name | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country |", - "ground_truth": "select first_name , middle_name , last_name from students order by date_left asc limit 1" - }, - { - "index": 559, - "db_id": "student_transcripts_tracking", - "question": "Whose permanent address is different from his or her current address? List his or her first name.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | courses: course_id, course_name, course_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select first_name from students where current_address_id != permanent_address_id" - }, - { - "index": 560, - "db_id": "student_transcripts_tracking", - "question": "What is the first name of the student whose permanent address is different from his or her current one?", - "db_info": "| students: permanent_address_id, current_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: permanent_address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment: student_id, degree_program_id, semester_id, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | student_enrolment_courses: student_enrolment_id, course_id, student_course_id | courses: course_id, course_name, course_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id | departments: department_id, department_name, department_description, other_details | sections: course_id, section_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details |", - "ground_truth": "select first_name from students where current_address_id != permanent_address_id" - }, - { - "index": 561, - "db_id": "student_transcripts_tracking", - "question": "Which address holds the most number of students currently? List the address id and all lines.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | courses: course_id, course_name, course_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select addresses.address_id , addresses.line_1 , addresses.line_2 from addresses join students on addresses.address_id = students.current_address_id group by addresses.address_id order by count ( * ) desc limit 1" - }, - { - "index": 562, - "db_id": "student_transcripts_tracking", - "question": "What is the id, line 1, and line 2 of the address with the most students?", - "db_info": "| addresses: address_id, line_1, line_2 | students: student_id, current_address_id, permanent_address_id |", - "ground_truth": "select addresses.address_id , addresses.line_1 , addresses.line_2 from addresses join students on addresses.address_id = students.current_address_id group by addresses.address_id order by count ( * ) desc limit 1" - }, - { - "index": 563, - "db_id": "student_transcripts_tracking", - "question": "On average, when were the transcripts printed?", - "db_info": "| semesters: semester_id, semester_name, semester_description | | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | | transcripts: transcript_id, transcript_date, other_details | | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | | courses: course_id, course_name, course_description, other_details | | departments: department_id, department_name, department_description, other_details | | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | | sections: section_id, course_id, section_name, section_description, other_details | | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select avg ( transcript_date ) from transcripts" - }, - { - "index": 564, - "db_id": "student_transcripts_tracking", - "question": "What is the average transcript date?", - "db_info": "| transcripts: transcript_id, transcript_date | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | student_enrolment_courses: course_id, student_enrolment_id | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details |", - "ground_truth": "select avg ( transcript_date ) from transcripts" - }, - { - "index": 565, - "db_id": "student_transcripts_tracking", - "question": "When is the first transcript released? List the date and details.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select transcript_date , other_details from transcripts order by transcript_date asc limit 1" - }, - { - "index": 566, - "db_id": "student_transcripts_tracking", - "question": "What is the earliest date of a transcript release, and what details can you tell me?", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | courses: course_id, course_name, course_description, other_details | transcripts: transcript_id, transcript_date, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select transcript_date , other_details from transcripts order by transcript_date asc limit 1" - }, - { - "index": 567, - "db_id": "student_transcripts_tracking", - "question": "How many transcripts are released?", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | | transcripts: transcript_id, transcript_date, other_details | | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | | courses: course_id, course_name, course_description, other_details | | semesters: semester_id, semester_name, semester_description, other_details | | sections: section_id, course_id, section_name, section_description, other_details | | departments: department_id, department_name, department_description, other_details | | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select count ( * ) from transcripts" - }, - { - "index": 568, - "db_id": "student_transcripts_tracking", - "question": "How many transcripts are listed?", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select count ( * ) from transcripts" - }, - { - "index": 569, - "db_id": "student_transcripts_tracking", - "question": "What is the last transcript release date?", - "db_info": "| transcripts: transcript_id, transcript_date | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select transcript_date from transcripts order by transcript_date desc limit 1" - }, - { - "index": 570, - "db_id": "student_transcripts_tracking", - "question": "When was the last transcript released?", - "db_info": "| transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id | student_enrolment_courses: student_enrolment_id, course_id | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | courses: course_id, course_name, course_description, other_details |", - "ground_truth": "select transcript_date from transcripts order by transcript_date desc limit 1" - }, - { - "index": 571, - "db_id": "student_transcripts_tracking", - "question": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select count ( * ) , student_course_id from transcript_contents group by student_course_id order by count ( * ) desc limit 1" - }, - { - "index": 572, - "db_id": "student_transcripts_tracking", - "question": "What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?", - "db_info": "| student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | courses: course_id, course_name, course_description, other_details | transcripts: transcript_id, transcript_date, other_details |", - "ground_truth": "select count ( * ) , student_course_id from transcript_contents group by student_course_id order by count ( * ) desc limit 1" - }, - { - "index": 573, - "db_id": "student_transcripts_tracking", - "question": "Show the date of the transcript which shows the least number of results, also list the id.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | semesters: semester_id, semester_name, semester_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | transcripts: transcript_id, transcript_date, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select transcripts.transcript_date , transcript_contents.transcript_id from transcript_contents join transcripts on transcript_contents.transcript_id = transcripts.transcript_id group by transcript_contents.transcript_id order by count ( * ) asc limit 1" - }, - { - "index": 574, - "db_id": "student_transcripts_tracking", - "question": "What is the date and id of the transcript with the least number of results?", - "db_info": "| transcripts: transcript_id, transcript_date | student_enrolment: student_enrolment_id, student_id, semester_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details | student_enrolment_courses: student_enrolment_id, course_id, student_course_id | student_course_id: course_id, other_details |", - "ground_truth": "select transcripts.transcript_date , transcript_contents.transcript_id from transcript_contents join transcripts on transcript_contents.transcript_id = transcripts.transcript_id group by transcript_contents.transcript_id order by count ( * ) asc limit 1" - }, - { - "index": 575, - "db_id": "student_transcripts_tracking", - "question": "Find the semester when both Master students and Bachelor students got enrolled in.", - "db_info": "| students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | semesters: semester_id, semester_name, semester_description, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | departments: department_id, department_name, department_description, other_details | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details |", - "ground_truth": "select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Master' intersect select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Bachelor'" - }, - { - "index": 576, - "db_id": "student_transcripts_tracking", - "question": "What is the id of the semester that had both Masters and Bachelors students enrolled?", - "db_info": "| semesters: semester_id, semester_name, semester_description | student_enrolment: semester_id, student_id, degree_program_id | degree_programs: degree_program_id, department_id | departments: department_id, department_name, department_description | students: student_id, current_address_id, permanent_address_id | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country | student_enrolment_courses: student_enrolment_id, course_id | courses: course_id, course_name, course_description |", - "ground_truth": "select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Master' intersect select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Bachelor'" - }, - { - "index": 577, - "db_id": "student_transcripts_tracking", - "question": "How many different addresses do the students currently live?", - "db_info": "| students: current_address_id, permanent_address_id, student_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | student_enrolment: student_id, semester_id, degree_program_id, student_enrolment_id, other_details | student_enrolment_courses: student_enrolment_id, course_id, student_course_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id | courses: course_id, course_name, course_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | departments: department_id, department_name, department_description, other_details |", - "ground_truth": "select count ( distinct current_address_id ) from students" - }, - { - "index": 578, - "db_id": "student_transcripts_tracking", - "question": "What are the different addresses that have students living there?", - "db_info": "| addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | sections: section_id, course_id, section_name, section_description, other_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select count ( distinct current_address_id ) from students" - }, - { - "index": 579, - "db_id": "student_transcripts_tracking", - "question": "List all the student details in reversed lexicographical order.", - "db_info": "| students: first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_name, course_description, other_details | departments: department_name, department_description, other_details | degree_programs: degree_summary_name, degree_summary_description, other_details | sections: section_name, section_description, other_details | semesters: semester_name, semester_description, other_details | student_enrolment: other_details | student_enrolment_courses: other_details | transcripts: transcript_date, other_details | transcript_contents: other_details |", - "ground_truth": "select other_student_details from students order by other_student_details desc" - }, - { - "index": 580, - "db_id": "student_transcripts_tracking", - "question": "What other details can you tell me about students in reverse alphabetical order?", - "db_info": "| students: first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | sections: section_id, course_id, section_name, section_description, other_details | semesters: semester_id, semester_name, semester_description, other_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select other_student_details from students order by other_student_details desc" - }, - { - "index": 581, - "db_id": "student_transcripts_tracking", - "question": "Describe the section h.", - "db_info": "| sections: section_name, section_description, other_details | courses: course_name, course_description, other_details | semesters: semester_name, semester_description, other_details | addresses: line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details |", - "ground_truth": "select section_description from sections where section_name = 'h'" - }, - { - "index": 582, - "db_id": "student_transcripts_tracking", - "question": "What is the description for the section named h?", - "db_info": "| sections: section_id, course_id, section_name, section_description, other_details | courses: course_id, course_name, course_description, other_details | departments: department_id, department_name, department_description, other_details | degree_programs: degree_program_id, department_id, degree_summary_name, degree_summary_description, other_details | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details | students: student_id, current_address_id, permanent_address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, ssn, date_first_registered, date_left, other_student_details | student_enrolment: student_enrolment_id, degree_program_id, semester_id, student_id, other_details | semesters: semester_id, semester_name, semester_description, other_details | student_enrolment_courses: student_course_id, course_id, student_enrolment_id | transcripts: transcript_id, transcript_date, other_details | transcript_contents: student_course_id, transcript_id |", - "ground_truth": "select section_description from sections where section_name = 'h'" - }, - { - "index": 583, - "db_id": "student_transcripts_tracking", - "question": "Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .", - "db_info": "| students: first_name, cell_mobile_number | addresses: country, city, zip_postcode |", - "ground_truth": "select students.first_name from students join addresses on students.permanent_address_id = addresses.address_id where addresses.country = 'haiti' or students.cell_mobile_number = '09700166582'" - }, - { - "index": 584, - "db_id": "student_transcripts_tracking", - "question": "What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ?", - "db_info": "| students: first_name, permanent_address_id, cell_mobile_number | addresses: address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country | courses: course_name | departments: department_name | degree_programs: degree_summary_name | sections: section_name | semesters: semester_name | student_enrolment: student_id, degree_program_id | student_enrolment_courses: course_id | transcripts: transcript_id | transcript_contents: student_course_id |", - "ground_truth": "select students.first_name from students join addresses on students.permanent_address_id = addresses.address_id where addresses.country = 'haiti' or students.cell_mobile_number = '09700166582'" - }, - { - "index": 585, - "db_id": "tvshow", - "question": "List the title of all cartoons in alphabetical order.", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select title from cartoon order by title asc" - }, - { - "index": 586, - "db_id": "tvshow", - "question": "What are the titles of the cartoons sorted alphabetically?", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select title from cartoon order by title asc" - }, - { - "index": 587, - "db_id": "tvshow", - "question": "List all cartoon directed by \"Ben Jones\".", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select title from cartoon where directed_by = 'Ben Jones'" - }, - { - "index": 588, - "db_id": "tvshow", - "question": "What are the names of all cartoons directed by Ben Jones?", - "db_info": "| cartoon: title, directed_by, channel, written_by, original_air_date, production_code | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select title from cartoon where directed_by = 'Ben Jones'" - }, - { - "index": 589, - "db_id": "tvshow", - "question": "How many cartoons were written by \"Joseph Kuhr\"?", - "db_info": "| cartoon: written_by | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select count ( * ) from cartoon where written_by = 'Joseph Kuhr'" - }, - { - "index": 590, - "db_id": "tvshow", - "question": "What is the number of cartoones written by Joseph Kuhr?", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select count ( * ) from cartoon where written_by = 'Joseph Kuhr'" - }, - { - "index": 591, - "db_id": "tvshow", - "question": "list all cartoon titles and their directors ordered by their air date", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select title , directed_by from cartoon order by original_air_date asc" - }, - { - "index": 592, - "db_id": "tvshow", - "question": "What is the name and directors of all the cartoons that are ordered by air date?", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select title , directed_by from cartoon order by original_air_date asc" - }, - { - "index": 593, - "db_id": "tvshow", - "question": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'" - }, - { - "index": 594, - "db_id": "tvshow", - "question": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'" - }, - { - "index": 595, - "db_id": "tvshow", - "question": "Which country has the most of TV Channels? List the country and number of TV Channels it has.", - "db_info": "| tv_channel: country, id, series_name, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: channel, id, title, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select country , count ( * ) from tv_channel group by country order by count ( * ) desc limit 1" - }, - { - "index": 596, - "db_id": "tvshow", - "question": "What is the country with the most number of TV Channels and how many does it have?", - "db_info": "| tv_channel: country, id, series_name, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: channel, id, title, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select country , count ( * ) from tv_channel group by country order by count ( * ) desc limit 1" - }, - { - "index": 597, - "db_id": "tvshow", - "question": "List the number of different series names and contents in the TV Channel table.", - "db_info": "| tv_channel: series_name, content, id | tv_series: channel, id | cartoon: channel, title, id |", - "ground_truth": "select count ( distinct series_name ) , count ( distinct content ) from tv_channel" - }, - { - "index": 598, - "db_id": "tvshow", - "question": "How many different series and contents are listed in the TV Channel table?", - "db_info": "| tv_channel: series_name, content, id, country, language, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: episode, channel, id, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: title, channel, id, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select count ( distinct series_name ) , count ( distinct content ) from tv_channel" - }, - { - "index": 599, - "db_id": "tvshow", - "question": "What is the content of TV Channel with serial name \"Sky Radio\"?", - "db_info": "| tv_channel: series_name, content, country, language, id, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: series_name, channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: title, channel, id, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select content from tv_channel where series_name = 'Sky Radio'" - }, - { - "index": 600, - "db_id": "tvshow", - "question": "What is the content of the series Sky Radio?", - "db_info": "| tv_channel: series_name, content, country, language | tv_series: series_name, channel, episode, air_date | cartoon: title, channel, original_air_date |", - "ground_truth": "select content from tv_channel where series_name = 'Sky Radio'" - }, - { - "index": 601, - "db_id": "tvshow", - "question": "What is the Package Option of TV Channel with serial name \"Sky Radio\"?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel, series_name | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select package_option from tv_channel where series_name = 'Sky Radio'" - }, - { - "index": 602, - "db_id": "tvshow", - "question": "What are the Package Options of the TV Channels whose series names are Sky Radio?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select package_option from tv_channel where series_name = 'Sky Radio'" - }, - { - "index": 603, - "db_id": "tvshow", - "question": "How many TV Channel using language English?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select count ( * ) from tv_channel where language = 'English'" - }, - { - "index": 604, - "db_id": "tvshow", - "question": "How many TV Channels use the English language?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select count ( * ) from tv_channel where language = 'English'" - }, - { - "index": 605, - "db_id": "tvshow", - "question": "List the language used least number of TV Channel. List language and number of TV Channel.", - "db_info": "| tv_channel: language, id, country, series_name, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: channel, id, title, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select language , count ( * ) from tv_channel group by language order by count ( * ) asc limit 1" - }, - { - "index": 606, - "db_id": "tvshow", - "question": "What are the languages used by the least number of TV Channels and how many channels use it?", - "db_info": "| tv_channel: id, language, series_name, country, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: id, channel, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: id, channel, title, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select language , count ( * ) from tv_channel group by language order by count ( * ) asc limit 1" - }, - { - "index": 607, - "db_id": "tvshow", - "question": "List each language and the number of TV Channels using it.", - "db_info": "| tv_channel: id, language | tv_series: channel, language | cartoon: channel, language |", - "ground_truth": "select language , count ( * ) from tv_channel group by language" - }, - { - "index": 608, - "db_id": "tvshow", - "question": "For each language, list the number of TV Channels that use it.", - "db_info": "| tv_channel: language, id, series_name, country, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: channel, id, title, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select language , count ( * ) from tv_channel group by language" - }, - { - "index": 609, - "db_id": "tvshow", - "question": "What is the TV Channel that shows the cartoon \"The Rise of the Blue Beetle!\"? List the TV Channel's series name.", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select tv_channel.series_name from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.title = 'The Rise of the Blue Beetle!'" - }, - { - "index": 610, - "db_id": "tvshow", - "question": "What is the series name of the TV Channel that shows the cartoon \"The Rise of the Blue Beetle\"?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select tv_channel.series_name from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.title = 'The Rise of the Blue Beetle!'" - }, - { - "index": 611, - "db_id": "tvshow", - "question": "List the title of all Cartoons showed on TV Channel with series name \"Sky Radio\".", - "db_info": "| cartoon: title, directed_by, written_by, original_air_date, production_code, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select cartoon.title from tv_channel join cartoon on tv_channel.id = cartoon.channel where tv_channel.series_name = 'Sky Radio'" - }, - { - "index": 612, - "db_id": "tvshow", - "question": "What is the title of all the cartools that are on the TV Channel with the series name \"Sky Radio\"?", - "db_info": "| cartoon: title, id, directed_by, written_by, original_air_date, production_code, channel | tv_series: series_name, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select cartoon.title from tv_channel join cartoon on tv_channel.id = cartoon.channel where tv_channel.series_name = 'Sky Radio'" - }, - { - "index": 613, - "db_id": "tvshow", - "question": "List the Episode of all TV series sorted by rating.", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select episode from tv_series order by rating asc" - }, - { - "index": 614, - "db_id": "tvshow", - "question": "What are all of the episodes ordered by ratings?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select episode from tv_series order by rating asc" - }, - { - "index": 615, - "db_id": "tvshow", - "question": "List top 3 highest Rating TV series. List the TV series's Episode and Rating.", - "db_info": "| tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select episode , rating from tv_series order by rating desc limit 3" - }, - { - "index": 616, - "db_id": "tvshow", - "question": "What are 3 most highly rated episodes in the TV series table and what were those ratings?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select episode , rating from tv_series order by rating desc limit 3" - }, - { - "index": 617, - "db_id": "tvshow", - "question": "What is minimum and maximum share of TV series?", - "db_info": "| tv_channel: share, id, series_name | tv_series: share, id, channel | cartoon: channel, id, title |", - "ground_truth": "select max ( share ) , min ( share ) from tv_series" - }, - { - "index": 618, - "db_id": "tvshow", - "question": "What is the maximum and minimum share for the TV series?", - "db_info": "| tv_channel: id, series_name, share, country | tv_series: id, share, episode, rating | cartoon: id, title, channel |", - "ground_truth": "select max ( share ) , min ( share ) from tv_series" - }, - { - "index": 619, - "db_id": "tvshow", - "question": "What is the air date of TV series with Episode \"A Love of a Lifetime\"?", - "db_info": "| tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select air_date from tv_series where episode = 'A Love of a Lifetime'" - }, - { - "index": 620, - "db_id": "tvshow", - "question": "When did the episode \"A Love of a Lifetime\" air?", - "db_info": "| tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select air_date from tv_series where episode = 'A Love of a Lifetime'" - }, - { - "index": 621, - "db_id": "tvshow", - "question": "What is Weekly Rank of TV series with Episode \"A Love of a Lifetime\"?", - "db_info": "| tv_series: episode, weekly_rank, channel | tv_channel: series_name, country, language, channel | cartoon: title, channel |", - "ground_truth": "select weekly_rank from tv_series where episode = 'A Love of a Lifetime'" - }, - { - "index": 622, - "db_id": "tvshow", - "question": "What is the weekly rank for the episode \"A Love of a Lifetime\"?", - "db_info": "| tv_series: id, episode, weekly_rank, channel | cartoon: id, title, channel | tv_channel: id, series_name, channel |", - "ground_truth": "select weekly_rank from tv_series where episode = 'A Love of a Lifetime'" - }, - { - "index": 623, - "db_id": "tvshow", - "question": "What is the TV Channel of TV series with Episode \"A Love of a Lifetime\"? List the TV Channel's series name.", - "db_info": "| tv_channel: series_name, channel | tv_series: channel, episode, series_name | cartoon: channel, title |", - "ground_truth": "select tv_channel.series_name from tv_channel join tv_series on tv_channel.id = tv_series.channel where tv_series.episode = 'A Love of a Lifetime'" - }, - { - "index": 624, - "db_id": "tvshow", - "question": "What is the name of the series that has the episode \"A Love of a Lifetime\"?", - "db_info": "| tv_series: episode, id, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: title, id, directed_by, written_by, original_air_date, production_code, channel | tv_channel: series_name, id, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option |", - "ground_truth": "select tv_channel.series_name from tv_channel join tv_series on tv_channel.id = tv_series.channel where tv_series.episode = 'A Love of a Lifetime'" - }, - { - "index": 625, - "db_id": "tvshow", - "question": "List the Episode of all TV series showed on TV Channel with series name \"Sky Radio\".", - "db_info": "| tv_channel: series_name, id | tv_series: episode, channel, id | cartoon: title, channel, id |", - "ground_truth": "select tv_series.episode from tv_channel join tv_series on tv_channel.id = tv_series.channel where tv_channel.series_name = 'Sky Radio'" - }, - { - "index": 626, - "db_id": "tvshow", - "question": "What is the episode for the TV series named \"Sky Radio\"?", - "db_info": "| tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select tv_series.episode from tv_channel join tv_series on tv_channel.id = tv_series.channel where tv_channel.series_name = 'Sky Radio'" - }, - { - "index": 627, - "db_id": "tvshow", - "question": "Find the number of cartoons directed by each of the listed directors.", - "db_info": "| tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select count ( * ) , directed_by from cartoon group by directed_by" - }, - { - "index": 628, - "db_id": "tvshow", - "question": "How many cartoons did each director create?", - "db_info": "| cartoon: directed_by, title, channel, id, written_by | tv_series: channel | tv_channel: id |", - "ground_truth": "select count ( * ) , directed_by from cartoon group by directed_by" - }, - { - "index": 629, - "db_id": "tvshow", - "question": "Find the production code and channel of the most recently aired cartoon .", - "db_info": "| cartoon: id, title, original_air_date, production_code, channel | tv_series: id, air_date, channel, episode | tv_channel: id, channel, series_name, production_code |", - "ground_truth": "select production_code , channel from cartoon order by original_air_date desc limit 1" - }, - { - "index": 630, - "db_id": "tvshow", - "question": "What is the produdction code and channel of the most recent cartoon ?", - "db_info": "| cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | tv_channel: id, channel, production_code |", - "ground_truth": "select production_code , channel from cartoon order by original_air_date desc limit 1" - }, - { - "index": 631, - "db_id": "tvshow", - "question": "Find the package choice and series name of the TV channel that has high definition TV.", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select package_option , series_name from tv_channel where hight_definition_tv = 'yes'" - }, - { - "index": 632, - "db_id": "tvshow", - "question": "What are the package options and the name of the series for the TV Channel that supports high definition TV?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select package_option , series_name from tv_channel where hight_definition_tv = 'yes'" - }, - { - "index": 633, - "db_id": "tvshow", - "question": "which countries' tv channels are playing some cartoon written by Todd Casey?", - "db_info": "| tv_channel: country, channel, series_name, content, language, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, series_name, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: channel, title, written_by, directed_by, original_air_date, production_code |", - "ground_truth": "select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" - }, - { - "index": 634, - "db_id": "tvshow", - "question": "What are the countries that have cartoons on TV that were written by Todd Casey?", - "db_info": "| tv_channel: country, id | cartoon: written_by, channel | tv_series: channel, id |", - "ground_truth": "select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" - }, - { - "index": 635, - "db_id": "tvshow", - "question": "which countries' tv channels are not playing any cartoon written by Todd Casey?", - "db_info": "| cartoon: written_by, channel, id, title, directed_by, original_air_date, production_code | tv_channel: country, id, series_name, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank |", - "ground_truth": "select country from tv_channel except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" - }, - { - "index": 636, - "db_id": "tvshow", - "question": "What are the countries that are not playing cartoons written by Todd Casey?", - "db_info": "| tv_channel: id, country | tv_series: id, channel, series_name | cartoon: id, title, written_by, channel |", - "ground_truth": "select country from tv_channel except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" - }, - { - "index": 637, - "db_id": "tvshow", - "question": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?", - "db_info": "| tv_channel: series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: channel, id, title, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select tv_channel.series_name , tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang' intersect select tv_channel.series_name , tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones'" - }, - { - "index": 638, - "db_id": "tvshow", - "question": "What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?", - "db_info": "| tv_channel: series_name, country, id | tv_series: channel, id, series_name | cartoon: channel, directed_by, title |", - "ground_truth": "select tv_channel.series_name , tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang' intersect select tv_channel.series_name , tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones'" - }, - { - "index": 639, - "db_id": "tvshow", - "question": "find the pixel aspect ratio and nation of the tv channels that do not use English.", - "db_info": "| tv_channel: language, country, pixel_aspect_ratio_par, id, series_name, content, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | cartoon: channel, id, title, directed_by, written_by, original_air_date, production_code |", - "ground_truth": "select pixel_aspect_ratio_par , country from tv_channel where language != 'English'" - }, - { - "index": 640, - "db_id": "tvshow", - "question": "What is the pixel aspect ratio and country of origin for all TV channels that do not use English?", - "db_info": "| tv_channel: country, pixel_aspect_ratio_par, language, series_name | tv_series: channel, id, episode, air_date | cartoon: channel, title, id, original_air_date |", - "ground_truth": "select pixel_aspect_ratio_par , country from tv_channel where language != 'English'" - }, - { - "index": 641, - "db_id": "tvshow", - "question": "find id of the tv channels that from the countries where have more than two tv channels.", - "db_info": "| tv_channel: country, id | tv_series: channel, id | cartoon: channel, id |", - "ground_truth": "select id from tv_channel group by country having count ( * ) > 2" - }, - { - "index": 642, - "db_id": "tvshow", - "question": "What are the ids of all tv channels that have more than 2 TV channels?", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, high_definition_tv, pay_per_view_ppv, package_option | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select id from tv_channel group by country having count ( * ) > 2" - }, - { - "index": 643, - "db_id": "tvshow", - "question": "find the id of tv channels that do not play any cartoon directed by Ben Jones.", - "db_info": "| tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel |", - "ground_truth": "select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'" - }, - { - "index": 644, - "db_id": "tvshow", - "question": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?", - "db_info": "| cartoon: id, channel, directed_by, title, written_by, original_air_date, production_code | tv_channel: id, content, series_name, country, language, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | tv_series: id, channel, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank |", - "ground_truth": "select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'" - }, - { - "index": 645, - "db_id": "tvshow", - "question": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones.", - "db_info": "| tv_channel: package_option, id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv | | tv_series: channel, id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank | | cartoon: channel, id, directed_by, title, written_by, original_air_date, production_code | The database info string: | tv_channel: id, series_name, country, language, content, pixel_aspect_ratio_par, hight_definition_tv, pay_per_view_ppv, package_option | | tv_series: id, episode, air_date, rating, share, 18_49_rating_share, viewers_m, weekly_rank, channel | | cartoon: id, title, directed_by, written_by, original_air_date, production_code, channel |", - "ground_truth": "select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )" - }, - { - "index": 646, - "db_id": "tvshow", - "question": "What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?", - "db_info": "| tv_channel: package_option, id, series_name | tv_series: channel, id, episode | cartoon: channel, directed_by, id |", - "ground_truth": "select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )" - }, - { - "index": 647, - "db_id": "poker_player", - "question": "How many poker players are there?", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height | poker_player.people_id = people.people_id |", - "ground_truth": "select count ( * ) from poker_player" - }, - { - "index": 648, - "db_id": "poker_player", - "question": "Count the number of poker players.", - "db_info": "| poker_player: poker_player_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height | poker_player.people_id = people.people_id |", - "ground_truth": "select count ( * ) from poker_player" - }, - { - "index": 649, - "db_id": "poker_player", - "question": "List the earnings of poker players in descending order.", - "db_info": "| poker_player: earnings, money_rank, final_table_made, best_finish, poker_player_id, people_id | people: people_id, height, birth_date, nationality, name |", - "ground_truth": "select earnings from poker_player order by earnings desc" - }, - { - "index": 650, - "db_id": "poker_player", - "question": "What are the earnings of poker players, ordered descending by value?", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select earnings from poker_player order by earnings desc" - }, - { - "index": 651, - "db_id": "poker_player", - "question": "List the final tables made and the best finishes of poker players.", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select final_table_made , best_finish from poker_player" - }, - { - "index": 652, - "db_id": "poker_player", - "question": "What are the final tables made and best finishes for all poker players?", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select final_table_made , best_finish from poker_player" - }, - { - "index": 653, - "db_id": "poker_player", - "question": "What is the average earnings of poker players?", - "db_info": "| poker_player: earnings, poker_player_id, final_table_made, best_finish, money_rank, people_id | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select avg ( earnings ) from poker_player" - }, - { - "index": 654, - "db_id": "poker_player", - "question": "Return the average earnings across all poker players.", - "db_info": "| poker_player: earnings, money_rank, best_finish, final_table_made, poker_player_id, people_id | people: nationality, name, birth_date, height, people_id |", - "ground_truth": "select avg ( earnings ) from poker_player" - }, - { - "index": 655, - "db_id": "poker_player", - "question": "What is the money rank of the poker player with the highest earnings?", - "db_info": "| poker_player: money_rank, earnings, best_finish, final_table_made, poker_player_id, people_id | people: name, nationality, birth_date, height, people_id |", - "ground_truth": "select money_rank from poker_player order by earnings desc limit 1" - }, - { - "index": 656, - "db_id": "poker_player", - "question": "Return the money rank of the player with the greatest earnings.", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select money_rank from poker_player order by earnings desc limit 1" - }, - { - "index": 657, - "db_id": "poker_player", - "question": "What is the maximum number of final tables made among poker players with earnings less than 200000?", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select max ( final_table_made ) from poker_player where earnings < 200000" - }, - { - "index": 658, - "db_id": "poker_player", - "question": "Return the maximum final tables made across all poker players who have earnings below 200000.", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select max ( final_table_made ) from poker_player where earnings < 200000" - }, - { - "index": 659, - "db_id": "poker_player", - "question": "What are the names of poker players?", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id" - }, - { - "index": 660, - "db_id": "poker_player", - "question": "Return the names of all the poker players.", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id" - }, - { - "index": 661, - "db_id": "poker_player", - "question": "What are the names of poker players whose earnings is higher than 300000?", - "db_info": "| poker_player: earnings, poker_player_id, people_id, final_table_made, best_finish, money_rank | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id where poker_player.earnings > 300000" - }, - { - "index": 662, - "db_id": "poker_player", - "question": "Give the names of poker players who have earnings above 300000.", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id where poker_player.earnings > 300000" - }, - { - "index": 663, - "db_id": "poker_player", - "question": "List the names of poker players ordered by the final tables made in ascending order.", - "db_info": "| poker_player: final_table_made, best_finish, money_rank, poker_player_id, people_id, earnings | people: people_id, name, nationality, birth_date, height |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id order by poker_player.final_table_made asc" - }, - { - "index": 664, - "db_id": "poker_player", - "question": "What are the names of poker players, ordered ascending by the number of final tables they have made?", - "db_info": "| poker_player: final_table_made, poker_player_id, people_id, best_finish, money_rank, earnings | people: name, birth_date, people_id, nationality, height |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id order by poker_player.final_table_made asc" - }, - { - "index": 665, - "db_id": "poker_player", - "question": "What is the birth date of the poker player with the lowest earnings?", - "db_info": "| poker_player: earnings, final_table_made, best_finish, money_rank, poker_player_id, people_id | people: birth_date, nationality, name, people_id, height |", - "ground_truth": "select people.birth_date from people join poker_player on people.people_id = poker_player.people_id order by poker_player.earnings asc limit 1" - }, - { - "index": 666, - "db_id": "poker_player", - "question": "Return the birth date of the poker player with the lowest earnings.", - "db_info": "| poker_player: earnings, poker_player_id, people_id, final_table_made, best_finish, money_rank | people: birth_date, people_id, nationality, name, height |", - "ground_truth": "select people.birth_date from people join poker_player on people.people_id = poker_player.people_id order by poker_player.earnings asc limit 1" - }, - { - "index": 667, - "db_id": "poker_player", - "question": "What is the money rank of the tallest poker player?", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select poker_player.money_rank from people join poker_player on people.people_id = poker_player.people_id order by people.height desc limit 1" - }, - { - "index": 668, - "db_id": "poker_player", - "question": "Return the money rank of the poker player with the greatest height.", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height | poker_player.people_id = people.people_id |", - "ground_truth": "select poker_player.money_rank from people join poker_player on people.people_id = poker_player.people_id order by people.height desc limit 1" - }, - { - "index": 669, - "db_id": "poker_player", - "question": "What is the average earnings of poker players with height higher than 200?", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select avg ( poker_player.earnings ) from people join poker_player on people.people_id = poker_player.people_id where people.height > 200" - }, - { - "index": 670, - "db_id": "poker_player", - "question": "Give average earnings of poker players who are taller than 200.", - "db_info": "| people: height, nationality, name, birth_date | poker_player: earnings, money_rank, final_table_made, best_finish, poker_player_id, people_id |", - "ground_truth": "select avg ( poker_player.earnings ) from people join poker_player on people.people_id = poker_player.people_id where people.height > 200" - }, - { - "index": 671, - "db_id": "poker_player", - "question": "What are the names of poker players in descending order of earnings?", - "db_info": "| poker_player: earnings, poker_player_id, people_id, final_table_made, best_finish, money_rank | people: name, people_id, nationality, birth_date, height |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id order by poker_player.earnings desc" - }, - { - "index": 672, - "db_id": "poker_player", - "question": "Return the names of poker players sorted by their earnings descending.", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select people.name from people join poker_player on people.people_id = poker_player.people_id order by poker_player.earnings desc" - }, - { - "index": 673, - "db_id": "poker_player", - "question": "What are different nationalities of people and the corresponding number of people from each nation?", - "db_info": "| people: people_id, nationality, name, birth_date | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select nationality , count ( * ) from people group by nationality" - }, - { - "index": 674, - "db_id": "poker_player", - "question": "How many people are there of each nationality?", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | poker_player.people_id = people.people_id |", - "ground_truth": "select nationality , count ( * ) from people group by nationality" - }, - { - "index": 675, - "db_id": "poker_player", - "question": "What is the most common nationality of people?", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | poker_player.people_id = people.people_id |", - "ground_truth": "select nationality from people group by nationality order by count ( * ) desc limit 1" - }, - { - "index": 676, - "db_id": "poker_player", - "question": "Give the nationality that is most common across all people.", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select nationality from people group by nationality order by count ( * ) desc limit 1" - }, - { - "index": 677, - "db_id": "poker_player", - "question": "What are the nationalities that are shared by at least two people?", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | poker_player.people_id = people.people_id |", - "ground_truth": "select nationality from people group by nationality having count ( * ) >= 2" - }, - { - "index": 678, - "db_id": "poker_player", - "question": "Return the nationalities for which there are two or more people.", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select nationality from people group by nationality having count ( * ) >= 2" - }, - { - "index": 679, - "db_id": "poker_player", - "question": "List the names and birth dates of people in ascending alphabetical order of name.", - "db_info": "| people: name, birth_date, people_id, nationality, height | poker_player: people_id, final_table_made, best_finish, money_rank, earnings, poker_player_id |", - "ground_truth": "select name , birth_date from people order by name asc" - }, - { - "index": 680, - "db_id": "poker_player", - "question": "What are the names and birth dates of people, ordered by their names in alphabetical order?", - "db_info": "| people: name, birth_date, nationality, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | poker_player.people_id = people.people_id |", - "ground_truth": "select name , birth_date from people order by name asc" - }, - { - "index": 681, - "db_id": "poker_player", - "question": "Show names of people whose nationality is not \"Russia\".", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | poker_player.people_id = people.people_id |", - "ground_truth": "select name from people where nationality != 'Russia'" - }, - { - "index": 682, - "db_id": "poker_player", - "question": "What are the names of people who are not from Russia?", - "db_info": "| poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings | people: people_id, nationality, name, birth_date, height |", - "ground_truth": "select name from people where nationality != 'Russia'" - }, - { - "index": 683, - "db_id": "poker_player", - "question": "List the names of people that are not poker players.", - "db_info": "| poker_player: people_id, poker_player_id, final_table_made, best_finish, money_rank, earnings | people: people_id, name, nationality, birth_date, height |", - "ground_truth": "select name from people where people_id not in ( select people_id from poker_player )" - }, - { - "index": 684, - "db_id": "poker_player", - "question": "What are the names of people who do not play poker?", - "db_info": "| people: people_id, name, nationality, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select name from people where people_id not in ( select people_id from poker_player )" - }, - { - "index": 685, - "db_id": "poker_player", - "question": "How many distinct nationalities are there?", - "db_info": "| people: nationality, people_id, name, birth_date, height | poker_player: nationality, people_id, poker_player_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select count ( distinct nationality ) from people" - }, - { - "index": 686, - "db_id": "poker_player", - "question": "Count the number of different nationalities.", - "db_info": "| people: people_id, nationality, name, birth_date, height | poker_player: poker_player_id, people_id, final_table_made, best_finish, money_rank, earnings |", - "ground_truth": "select count ( distinct nationality ) from people" - }, - { - "index": 687, - "db_id": "voter_1", - "question": "How many states are there?", - "db_info": "| area_code_state: state, area_code | contestants: contestant_number | votes: state, contestant_number, created |", - "ground_truth": "select count ( * ) from area_code_state" - }, - { - "index": 688, - "db_id": "voter_1", - "question": "List the contestant numbers and names, ordered by contestant name descending.", - "db_info": "| contestants: contestant_number, contestant_name | area_code_state: area_code, state | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select contestant_number , contestant_name from contestants order by contestant_name desc" - }, - { - "index": 689, - "db_id": "voter_1", - "question": "List the vote ids, phone numbers and states of all votes.", - "db_info": "| votes: vote_id, phone_number, state, contestant_number, created | contestants: contestant_number, contestant_name | area_code_state: area_code, state |", - "ground_truth": "select vote_id , phone_number , state from votes" - }, - { - "index": 690, - "db_id": "voter_1", - "question": "What are the maximum and minimum values of area codes?", - "db_info": "| area_code_state: area_code, state | contestants: contestant_number, contestant_name | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select max ( area_code ) , min ( area_code ) from area_code_state" - }, - { - "index": 691, - "db_id": "voter_1", - "question": "What is last date created of votes from the state 'CA'?", - "db_info": "| votes: vote_id, phone_number, state, contestant_number, created | contestants: contestant_number, contestant_name | area_code_state: area_code, state |", - "ground_truth": "select max ( created ) from votes where state = 'CA'" - }, - { - "index": 692, - "db_id": "voter_1", - "question": "What are the names of the contestants whose names are not 'Jessie Alloway'", - "db_info": "| contestants: contestant_number, contestant_name | area_code_state: state | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select contestant_name from contestants where contestant_name != 'Jessie Alloway'" - }, - { - "index": 693, - "db_id": "voter_1", - "question": "What are the distinct states and create time of all votes?", - "db_info": "| area_code_state: state, area_code | contestants: contestant_number, contestant_name | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select distinct state , created from votes" - }, - { - "index": 694, - "db_id": "voter_1", - "question": "What are the contestant numbers and names of the contestants who had at least two votes?", - "db_info": "| contestants: contestant_number, contestant_name | area_code_state: area_code, state | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select contestants.contestant_number , contestants.contestant_name from contestants join votes on contestants.contestant_number = votes.contestant_number group by contestants.contestant_number having count ( * ) >= 2" - }, - { - "index": 695, - "db_id": "voter_1", - "question": "Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?", - "db_info": "| contestants: contestant_number, contestant_name | area_code_state: state, area_code | votes: contestant_number, state, vote_id, phone_number, created | The database info string is: | contestants: contestant_number, contestant_name | area_code_state: state, area_code | votes: contestant_number, state, vote_id, phone_number, created |", - "ground_truth": "select contestants.contestant_number , contestants.contestant_name from contestants join votes on contestants.contestant_number = votes.contestant_number group by contestants.contestant_number order by count ( * ) asc limit 1" - }, - { - "index": 696, - "db_id": "voter_1", - "question": "What are the number of votes from state 'NY' or 'CA'?", - "db_info": "| area_code_state: area_code, state | contestants: contestant_number, contestant_name | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select count ( * ) from votes where state = 'NY' or state = 'CA'" - }, - { - "index": 697, - "db_id": "voter_1", - "question": "How many contestants did not get voted?", - "db_info": "| votes: vote_id, phone_number, state, contestant_number, created | area_code_state: area_code, state | contestants: contestant_number, contestant_name | votes.contestant_number = contestants.contestant_number | votes.state = area_code_state.state |", - "ground_truth": "select count ( * ) from contestants where contestant_number not in ( select contestant_number from votes )" - }, - { - "index": 698, - "db_id": "voter_1", - "question": "What is the area code in which the most voters voted?", - "db_info": "| area_code_state: area_code, state | contestants: contestant_number, contestant_name | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select area_code_state.area_code from area_code_state join votes on area_code_state.state = votes.state group by area_code_state.area_code order by count ( * ) desc limit 1" - }, - { - "index": 699, - "db_id": "voter_1", - "question": "What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?", - "db_info": "| votes: vote_id, phone_number, state, contestant_number, created | contestants: contestant_number, contestant_name | area_code_state: area_code, state |", - "ground_truth": "select votes.created , votes.state , votes.phone_number from contestants join votes on contestants.contestant_number = votes.contestant_number where contestants.contestant_name = 'Tabatha Gehling'" - }, - { - "index": 700, - "db_id": "voter_1", - "question": "List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.", - "db_info": "| area_code_state: area_code, state | contestants: contestant_number, contestant_name | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select area_code_state.area_code from contestants join votes on contestants.contestant_number = votes.contestant_number join area_code_state on votes.state = area_code_state.state where contestants.contestant_name = 'Tabatha Gehling' intersect select area_code_state.area_code from contestants join votes on contestants.contestant_number = votes.contestant_number join area_code_state on votes.state = area_code_state.state where contestants.contestant_name = 'Kelly Clauss'" - }, - { - "index": 701, - "db_id": "voter_1", - "question": "Return the names of the contestants whose names contain the substring 'Al' .", - "db_info": "| contestants: contestant_number, contestant_name | area_code_state: area_code, state | votes: vote_id, phone_number, state, contestant_number, created |", - "ground_truth": "select contestant_name from contestants where contestant_name like '%al%'" - }, - { - "index": 702, - "db_id": "world_1", - "question": "What are the names of all the countries that became independent after 1950?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select name from country where indepyear > 1950" - }, - { - "index": 703, - "db_id": "world_1", - "question": "Give the names of the nations that were founded after 1950.", - "db_info": "| country: name, indepyear, code, population | city: name, countrycode, population | countrylanguage: language, countrycode, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select name from country where indepyear > 1950" - }, - { - "index": 704, - "db_id": "world_1", - "question": "How many countries have a republic as their form of government?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) from country where governmentform = 'Republic'" - }, - { - "index": 705, - "db_id": "world_1", - "question": "How many countries have governments that are republics?", - "db_info": "| country: governmentform, name | city: countrycode | countrylanguage: countrycode | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) from country where governmentform = 'Republic'" - }, - { - "index": 706, - "db_id": "world_1", - "question": "What is the total surface area of the countries in the Caribbean region?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( surfacearea ) from country where region = 'Caribbean'" - }, - { - "index": 707, - "db_id": "world_1", - "question": "How much surface area do the countires in the Carribean cover together?", - "db_info": "| country: code, name, continent, region, surfacearea, population | city: countrycode, name, population | countrylanguage: countrycode |", - "ground_truth": "select sum ( surfacearea ) from country where region = 'Caribbean'" - }, - { - "index": 708, - "db_id": "world_1", - "question": "Which continent is Anguilla in?", - "db_info": "| country: continent | city: name, countrycode | sqlite_sequence: N/A | countrylanguage: N/A |", - "ground_truth": "select continent from country where name = 'Anguilla'" - }, - { - "index": 709, - "db_id": "world_1", - "question": "What is the continent name which Anguilla belongs to?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select continent from country where name = 'Anguilla'" - }, - { - "index": 710, - "db_id": "world_1", - "question": "Which region is the city Kabul located in?", - "db_info": "| city: name, countrycode, id, district, population | sqlite_sequence: name, seq | country: region, name, code, continent, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select region from country join city on country.code = city.countrycode where city.name = 'Kabul'" - }, - { - "index": 711, - "db_id": "world_1", - "question": "What region is Kabul in?", - "db_info": "| country: name, region, code, continent, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: name, countrycode, district, population, id | sqlite_sequence: name, seq | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select region from country join city on country.code = city.countrycode where city.name = 'Kabul'" - }, - { - "index": 712, - "db_id": "world_1", - "question": "Which language is the most popular in Aruba?", - "db_info": "| city: name, population, countrycode | sqlite_sequence: name | country: name, population, code | countrylanguage: language, percentage, countrycode |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' order by percentage desc limit 1" - }, - { - "index": 713, - "db_id": "world_1", - "question": "What language is predominantly spoken in Aruba?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' order by percentage desc limit 1" - }, - { - "index": 714, - "db_id": "world_1", - "question": "What are the population and life expectancies in Brazil?", - "db_info": "| country: population, lifeexpectancy, name, continent, region, surfacearea, indepyear, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: population, name, countrycode, district | countrylanguage: percentage, countrycode, language, isofficial | sqlite_sequence: name, seq |", - "ground_truth": "select population , lifeexpectancy from country where name = 'Brazil'" - }, - { - "index": 715, - "db_id": "world_1", - "question": "Give me Brazil’s population and life expectancies.", - "db_info": "| country: population, lifeexpectancy | city: population, name | sqlite_sequence: name, seq | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select population , lifeexpectancy from country where name = 'Brazil'" - }, - { - "index": 716, - "db_id": "world_1", - "question": "What are the region and population of Angola?", - "db_info": "| country: name, region, population | city: name, countrycode, population | countrylanguage: language, countrycode | sqlite_sequence: name, seq |", - "ground_truth": "select population , region from country where name = 'Angola'" - }, - { - "index": 717, - "db_id": "world_1", - "question": "What region does Angola belong to and what is its population?", - "db_info": "| country: region, population | city: countrycode, name, population | countrylanguage: countrycode, language, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select population , region from country where name = 'Angola'" - }, - { - "index": 718, - "db_id": "world_1", - "question": "What is the average expected life expectancy for countries in the region of Central Africa?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select avg ( lifeexpectancy ) from country where region = 'Central Africa'" - }, - { - "index": 719, - "db_id": "world_1", - "question": "How long is the people’s average life expectancy in Central Africa?", - "db_info": "| country: lifeexpectancy, population, continent, name | city: population, district, name, countrycode | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select avg ( lifeexpectancy ) from country where region = 'Central Africa'" - }, - { - "index": 720, - "db_id": "world_1", - "question": "What is the name of country that has the shortest life expectancy in Asia?", - "db_info": "| country: name, lifeexpectancy | city: name, countrycode | countrylanguage: countrycode |", - "ground_truth": "select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1" - }, - { - "index": 721, - "db_id": "world_1", - "question": "Give the name of the country in Asia with the lowest life expectancy.", - "db_info": "| country: name, continent, lifeexpectancy, code | city: countrycode, name | countrylanguage: countrycode, percentage |", - "ground_truth": "select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1" - }, - { - "index": 722, - "db_id": "world_1", - "question": "What is the total population and maximum GNP in Asia?", - "db_info": "| country: population, gnp, continent, name | city: population, countrycode | countrylanguage: countrycode |", - "ground_truth": "select sum ( population ) , max ( gnp ) from country where continent = 'Asia'" - }, - { - "index": 723, - "db_id": "world_1", - "question": "How many people live in Asia, and what is the largest GNP among them?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( population ) , max ( gnp ) from country where continent = 'Asia'" - }, - { - "index": 724, - "db_id": "world_1", - "question": "What is the average life expectancy in African countries that are republics?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic'" - }, - { - "index": 725, - "db_id": "world_1", - "question": "Give the average life expectancy for countries in Africa which are republics?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic'" - }, - { - "index": 726, - "db_id": "world_1", - "question": "What is the total surface area of the continents Asia and Europe?", - "db_info": "| country: surfacearea, name, continent | city: countrycode, name, population | countrylanguage: countrycode | sqlite_sequence: name |", - "ground_truth": "select sum ( surfacearea ) from country where continent = 'Asia' or continent = 'Europe'" - }, - { - "index": 727, - "db_id": "world_1", - "question": "Give the total surface area covered by countries in Asia or Europe.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( surfacearea ) from country where continent = 'Asia' or continent = 'Europe'" - }, - { - "index": 728, - "db_id": "world_1", - "question": "How many people live in Gelderland district?", - "db_info": "| country: code, name, continent, region, population | city: district, population, countrycode | countrylanguage: countrycode, language | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( population ) from city where district = 'Gelderland'" - }, - { - "index": 729, - "db_id": "world_1", - "question": "What is the total population of Gelderland district?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select sum ( population ) from city where district = 'Gelderland'" - }, - { - "index": 730, - "db_id": "world_1", - "question": "What is the average GNP and total population in all nations whose government is US territory?", - "db_info": "| country: gnp, population, governmentform | | city: population, countrycode |", - "ground_truth": "select avg ( gnp ) , sum ( population ) from country where governmentform = 'US Territory'" - }, - { - "index": 731, - "db_id": "world_1", - "question": "Give the mean GNP and total population of nations which are considered US territory.", - "db_info": "| country: code, population, gnp | city: countrycode, population | countrylanguage: countrycode |", - "ground_truth": "select avg ( gnp ) , sum ( population ) from country where governmentform = 'US Territory'" - }, - { - "index": 732, - "db_id": "world_1", - "question": "How many unique languages are spoken in the world?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: countrycode, name, id, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( distinct language ) from countrylanguage" - }, - { - "index": 733, - "db_id": "world_1", - "question": "What is the number of distinct languages used around the world?", - "db_info": "| country: code, name, continent, region, surfacearea, population | city: countrycode, name, population | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select count ( distinct language ) from countrylanguage" - }, - { - "index": 734, - "db_id": "world_1", - "question": "How many type of governments are in Africa?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( distinct governmentform ) from country where continent = 'Africa'" - }, - { - "index": 735, - "db_id": "world_1", - "question": "How many different forms of governments are there in Africa?", - "db_info": "| country: governmentform, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, headofstate, capital, code2 | city: countrycode, name, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( distinct governmentform ) from country where continent = 'Africa'" - }, - { - "index": 736, - "db_id": "world_1", - "question": "What is the total number of languages used in Aruba?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select count ( countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba'" - }, - { - "index": 737, - "db_id": "world_1", - "question": "How many languages are spoken in Aruba?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select count ( countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba'" - }, - { - "index": 738, - "db_id": "world_1", - "question": "How many official languages does Afghanistan have?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T'" - }, - { - "index": 739, - "db_id": "world_1", - "question": "How many official languages are spoken in Afghanistan?", - "db_info": "| country: code, name, governmentform, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T'" - }, - { - "index": 740, - "db_id": "world_1", - "question": "What is name of the country that speaks the largest number of languages?", - "db_info": "| country: name, population | city: name, countrycode | countrylanguage: countrycode, language |", - "ground_truth": "select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1" - }, - { - "index": 741, - "db_id": "world_1", - "question": "Give the name of the nation that uses the greatest amount of languages.", - "db_info": "| country: code, name | city: countrycode, name | countrylanguage: countrycode, language, percentage |", - "ground_truth": "select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1" - }, - { - "index": 742, - "db_id": "world_1", - "question": "Which continent has the most diverse languages?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1" - }, - { - "index": 743, - "db_id": "world_1", - "question": "Which continent speaks the most languages?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1" - }, - { - "index": 744, - "db_id": "world_1", - "question": "How many countries speak both English and Dutch?", - "db_info": "| country: code, name, population | city: id, name, countrycode, district, population | countrylanguage: countrycode, language | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) from ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' )" - }, - { - "index": 745, - "db_id": "world_1", - "question": "What is the number of nations that use English and Dutch?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) from ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' )" - }, - { - "index": 746, - "db_id": "world_1", - "question": "What are the names of nations speak both English and French?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage | city: id, name, countrycode, district, population | sqlite_sequence: name, seq |", - "ground_truth": "select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'" - }, - { - "index": 747, - "db_id": "world_1", - "question": "Give the names of nations that speak both English and French.", - "db_info": "| country: code, name | city: countrycode, id, name | countrylanguage: countrycode, language | sqlite_sequence: name, seq |", - "ground_truth": "select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'" - }, - { - "index": 748, - "db_id": "world_1", - "question": "What are the names of nations where both English and French are official languages?", - "db_info": "| country: code, name, continent, surfacearea | city: countrycode, name | countrylanguage: countrycode, language | sqlite_sequence: name, seq |", - "ground_truth": "select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T'" - }, - { - "index": 749, - "db_id": "world_1", - "question": "Give the names of countries with English and French as official languages.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T'" - }, - { - "index": 750, - "db_id": "world_1", - "question": "What is the number of distinct continents where Chinese is spoken?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'" - }, - { - "index": 751, - "db_id": "world_1", - "question": "How many continents speak Chinese?", - "db_info": "| country : code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city : id, name, countrycode, district, population | countrylanguage : countrycode, language, isofficial, percentage | sqlite_sequence : name, seq |", - "ground_truth": "select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'" - }, - { - "index": 752, - "db_id": "world_1", - "question": "What are the regions that use English or Dutch?", - "db_info": "| country: name, region, population | city: name, countrycode, population | countrylanguage: language, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'" - }, - { - "index": 753, - "db_id": "world_1", - "question": "Which regions speak Dutch or English?", - "db_info": "| country: name, continent, region | city: name, countrycode, population | countrylanguage: language | sqlite_sequence: |", - "ground_truth": "select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'" - }, - { - "index": 754, - "db_id": "world_1", - "question": "What are the countries where either English or Dutch is the official language ?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'english' and isofficial = 't' union select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'dutch' and isofficial = 't'" - }, - { - "index": 755, - "db_id": "world_1", - "question": "Which countries have either English or Dutch as an official language?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and isofficial = 'T' union select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' and isofficial = 'T'" - }, - { - "index": 756, - "db_id": "world_1", - "question": "Which language is the most popular on the Asian continent?", - "db_info": "| country: code, name, continent, population | city: countrycode, population | countrylanguage: countrycode, language, percentage |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1" - }, - { - "index": 757, - "db_id": "world_1", - "question": "What is the language that is used by the largest number of Asian nations?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1" - }, - { - "index": 758, - "db_id": "world_1", - "question": "Which languages are spoken by only one country in republic governments?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.governmentform = 'Republic' group by countrylanguage.language having count ( * ) = 1" - }, - { - "index": 759, - "db_id": "world_1", - "question": "What languages are only used by a single country with a republic government?", - "db_info": "| country: code, name, governmentform, population | city: countrycode, name, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.governmentform = 'Republic' group by countrylanguage.language having count ( * ) = 1" - }, - { - "index": 760, - "db_id": "world_1", - "question": "Find the city with the largest population that uses English.", - "db_info": "| city: population, name, countrycode, id, district | country: population, name, code, continent, region | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select city.name , city.population from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' order by city.population desc limit 1" - }, - { - "index": 761, - "db_id": "world_1", - "question": "What is the most populace city that speaks English?", - "db_info": "| city: population, name, countrycode, district, id | sqlite_sequence: name, seq | country: population, name, continent, region, surfacearea, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: percentage, language, isofficial |", - "ground_truth": "select city.name , city.population from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' order by city.population desc limit 1" - }, - { - "index": 762, - "db_id": "world_1", - "question": "Find the name, population and expected life length of asian country with the largest area?", - "db_info": "| country: name, population, surfacearea, lifeexpectancy | city: name, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select name , population , lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1" - }, - { - "index": 763, - "db_id": "world_1", - "question": "What are the name, population, and life expectancy of the largest Asian country by land?", - "db_info": "| country: name, population, lifeexpectancy | city: name, population, countrycode | sqlite_sequence: N/A | countrylanguage: N/A |", - "ground_truth": "select name , population , lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1" - }, - { - "index": 764, - "db_id": "world_1", - "question": "What is average life expectancy in the countries where English is not the official language?", - "db_info": "| country: code, name, population, lifeexpectancy, governmentform | city: countrycode, population | countrylanguage: countrycode, language, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select avg ( lifeexpectancy ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' )" - }, - { - "index": 765, - "db_id": "world_1", - "question": "Give the mean life expectancy of countries in which English is not the official language.", - "db_info": "| country: code, name, population, lifeexpectancy, gnp | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select avg ( lifeexpectancy ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' )" - }, - { - "index": 766, - "db_id": "world_1", - "question": "What is the total number of people living in the nations that do not use English?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' )" - }, - { - "index": 767, - "db_id": "world_1", - "question": "How many people live in countries that do not speak English?", - "db_info": "| country: name, population | city: countrycode, population | countrylanguage: countrycode, language |", - "ground_truth": "select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' )" - }, - { - "index": 768, - "db_id": "world_1", - "question": "What is the official language spoken in the country whose head of state is Beatrix?", - "db_info": "| country: headofstate, name, code, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, capital, code2 | city: countrycode, name, id, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T'" - }, - { - "index": 769, - "db_id": "world_1", - "question": "What is the official language used in the country the name of whose head of state is Beatrix.", - "db_info": "| country: name, code, headofstate, continent, population | city: name, countrycode, population | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T'" - }, - { - "index": 770, - "db_id": "world_1", - "question": "What is the total number of unique official languages spoken in the countries that are founded before 1930?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T'" - }, - { - "index": 771, - "db_id": "world_1", - "question": "For the countries founded before 1930, what is the total number of distinct official languages?", - "db_info": "| country: code, name, indepyear, population | city: countrycode, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T'" - }, - { - "index": 772, - "db_id": "world_1", - "question": "What are the countries that have greater surface area than any country in Europe?", - "db_info": "| country: code, name, continent, surfacearea, population | city: id, name, countrycode | countrylanguage: countrycode, language |", - "ground_truth": "select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )" - }, - { - "index": 773, - "db_id": "world_1", - "question": "Which countries have greater area than that of any country in Europe?", - "db_info": "| country: code, name, continent, surfacearea | city: countrycode, name | countrylanguage: countrycode, language | sqlite_sequence: name, seq |", - "ground_truth": "select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )" - }, - { - "index": 774, - "db_id": "world_1", - "question": "What are the African countries that have a population less than any country in Asia?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select name from country where continent = 'Africa' and population < ( select max ( population ) from country where continent = 'Asia' )" - }, - { - "index": 775, - "db_id": "world_1", - "question": "Which African countries have a smaller population than that of any country in Asia?", - "db_info": "| country: population, continent, name | city: population | sqlite_sequence: | countrylanguage: |", - "ground_truth": "select name from country where continent = 'Africa' and population < ( select min ( population ) from country where continent = 'Asia' )" - }, - { - "index": 776, - "db_id": "world_1", - "question": "Which Asian countries have a population that is larger than any country in Africa?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: population, countrycode, name, district, id | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select name from country where continent = 'Asia' and population > ( select max ( population ) from country where continent = 'Africa' )" - }, - { - "index": 777, - "db_id": "world_1", - "question": "What are the Asian countries which have a population larger than that of any country in Africa?", - "db_info": "| country: population, continent, name, code, region, surfacearea, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: population, countrycode, name, id | countrylanguage: percentage, countrycode, language, isofficial | sqlite_sequence: name, seq |", - "ground_truth": "select name from country where continent = 'Asia' and population > ( select min ( population ) from country where continent = 'Africa' )" - }, - { - "index": 778, - "db_id": "world_1", - "question": "What are the country codes for countries that do not speak English?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select countrycode from countrylanguage except select countrycode from countrylanguage where language = 'English'" - }, - { - "index": 779, - "db_id": "world_1", - "question": "Return the country codes for countries that do not speak English.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select countrycode from countrylanguage except select countrycode from countrylanguage where language = 'English'" - }, - { - "index": 780, - "db_id": "world_1", - "question": "What are the country codes of countries where people use languages other than English?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | countrylanguage: countrycode, language, isofficial, percentage | | city: id, name, countrycode, district, population | | sqlite_sequence: name, seq |", - "ground_truth": "select distinct countrycode from countrylanguage where language != 'English'" - }, - { - "index": 781, - "db_id": "world_1", - "question": "Give the country codes for countries in which people speak langauges that are not English.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select distinct countrycode from countrylanguage where language != 'English'" - }, - { - "index": 782, - "db_id": "world_1", - "question": "What are the codes of the countries that do not speak English and whose government forms are not Republic?", - "db_info": "| country: code, governmentform, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, headofstate, capital, code2 | city: countrycode, name, id, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select code from country where governmentform != 'Republic' except select countrycode from countrylanguage where language = 'English'" - }, - { - "index": 783, - "db_id": "world_1", - "question": "Return the codes of countries that do not speak English and do not have Republics for governments.", - "db_info": "| country: code, name, governmentform, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select code from country where governmentform != 'Republic' except select countrycode from countrylanguage where language = 'English'" - }, - { - "index": 784, - "db_id": "world_1", - "question": "Which cities are in European countries where English is not the official language?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage | city: id, name, countrycode, district, population | sqlite_sequence: name, seq |", - "ground_truth": "select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' )" - }, - { - "index": 785, - "db_id": "world_1", - "question": "What are the names of cities in Europe for which English is not the official language?", - "db_info": "| city: name, countrycode, population, district, id | country: name, code, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: language, countrycode, isofficial, percentage |", - "ground_truth": "select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' )" - }, - { - "index": 786, - "db_id": "world_1", - "question": "Which unique cities are in Asian countries where Chinese is the official language ?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 't' and countrylanguage.language = 'chinese' and country.continent = 'asia'" - }, - { - "index": 787, - "db_id": "world_1", - "question": "Return the different names of cities that are in Asia and for which Chinese is the official language.", - "db_info": "| country: name, continent, governmentform, capital | city: name, countrycode, district, population | countrylanguage: language, countrycode, isofficial, percentage |", - "ground_truth": "select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'Chinese' and country.continent = 'Asia'" - }, - { - "index": 788, - "db_id": "world_1", - "question": "What are the name, independence year, and surface area of the country with the smallest population?", - "db_info": "| country: population, name, indepyear, surfacearea | city: population, name, countrycode | sqlite_sequence: - | countrylanguage: - |", - "ground_truth": "select name , surfacearea , indepyear from country order by population asc limit 1" - }, - { - "index": 789, - "db_id": "world_1", - "question": "Give the name, year of independence, and surface area of the country that has the lowest population.", - "db_info": "| country: population, name, surfacearea, indepyear | city: population, countrycode | sqlite_sequence: N/A | countrylanguage: N/A |", - "ground_truth": "select name , surfacearea , indepyear from country order by population asc limit 1" - }, - { - "index": 790, - "db_id": "world_1", - "question": "What are the population, name and leader of the country with the largest area?", - "db_info": "| country: population, name, surfacearea | city: population, name | countrylanguage: countrycode, language |", - "ground_truth": "select name , population , headofstate from country order by surfacearea desc limit 1" - }, - { - "index": 791, - "db_id": "world_1", - "question": "Give the name, population, and head of state for the country that has the largest area.", - "db_info": "| country: name, population, headofstate, surfacearea, code | city: countrycode, name, population, district | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select name , population , headofstate from country order by surfacearea desc limit 1" - }, - { - "index": 792, - "db_id": "world_1", - "question": "Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select count ( countrylanguage.language ) , country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name having count ( * ) > 2" - }, - { - "index": 793, - "db_id": "world_1", - "question": "What are the names of countries that speak more than 2 languages, as well as how many languages they speak?", - "db_info": "| country: code, name | countrylanguage: countrycode, language, isofficial, percentage | city: countrycode, name, district, population | sqlite_sequence: name, seq |", - "ground_truth": "select count ( countrylanguage.language ) , country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name having count ( * ) > 2" - }, - { - "index": 794, - "db_id": "world_1", - "question": "Find the number of cities in each district whose population is greater than the average population of cities?", - "db_info": "| city: population, district, countrycode, name, id | country: population, code, name, continent, region, surfacearea, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) , district from city where population > ( select avg ( population ) from city ) group by district" - }, - { - "index": 795, - "db_id": "world_1", - "question": "How many cities in each district have a population that is above the average population across all cities?", - "db_info": "| city: population, district, name, countrycode | country: population, name, code, continent, region | countrylanguage: percentage, countrycode | sqlite_sequence: seq |", - "ground_truth": "select count ( * ) , district from city where population > ( select avg ( population ) from city ) group by district" - }, - { - "index": 796, - "db_id": "world_1", - "question": "Find the government form name and total population for each government form whose average life expectancy is longer than 72.", - "db_info": "| country: governmentform, population, lifeexpectancy | city: name, countrycode, population | countrylanguage: countrycode, percentage | sqlite_sequence: name |", - "ground_truth": "select sum ( population ) , governmentform from country group by governmentform having avg ( lifeexpectancy ) > 72" - }, - { - "index": 797, - "db_id": "world_1", - "question": "What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72?", - "db_info": "| country: governmentform, population | city: name, population | countrylanguage: countrycode, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( population ) , governmentform from country group by governmentform having avg ( lifeexpectancy ) > 72" - }, - { - "index": 798, - "db_id": "world_1", - "question": "Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( population ) , avg ( lifeexpectancy ) , continent from country group by continent having avg ( lifeexpectancy ) < 72" - }, - { - "index": 799, - "db_id": "world_1", - "question": "What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72?", - "db_info": "| country: continent, population, lifeexpectancy | city: population, countrycode | sqlite_sequence: N/A | countrylanguage: N/A |", - "ground_truth": "select sum ( population ) , avg ( lifeexpectancy ) , continent from country group by continent having avg ( lifeexpectancy ) < 72" - }, - { - "index": 800, - "db_id": "world_1", - "question": "What are the names and areas of countries with the top 5 largest area?", - "db_info": "| country: name, surfacearea | city: countrycode | countrylanguage: countrycode |", - "ground_truth": "select name , surfacearea from country order by surfacearea desc limit 5" - }, - { - "index": 801, - "db_id": "world_1", - "question": "Return the names and surface areas of the 5 largest countries.", - "db_info": "| country: name, surfacearea, code, continent, region | city: name, countrycode, population, district | countrylanguage: language, countrycode, percentage, isofficial | sqlite_sequence: name, seq |", - "ground_truth": "select name , surfacearea from country order by surfacearea desc limit 5" - }, - { - "index": 802, - "db_id": "world_1", - "question": "What are names of countries with the top 3 largest population?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage | | sqlite_sequence: name, seq |", - "ground_truth": "select name from country order by population desc limit 3" - }, - { - "index": 803, - "db_id": "world_1", - "question": "Return the names of the 3 most populated countries.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select name from country order by population desc limit 3" - }, - { - "index": 804, - "db_id": "world_1", - "question": "What are the names of the nations with the 3 lowest populations?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select name from country order by population asc limit 3" - }, - { - "index": 805, - "db_id": "world_1", - "question": "Return the names of the 3 countries with the fewest people.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select name from country order by population asc limit 3" - }, - { - "index": 806, - "db_id": "world_1", - "question": "how many countries are in Asia?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) from country where continent = 'Asia'" - }, - { - "index": 807, - "db_id": "world_1", - "question": "Count the number of countries in Asia.", - "db_info": "| country: code, continent, name, population | city: countrycode, name | countrylanguage: countrycode, language | sqlite_sequence: N/A |", - "ground_truth": "select count ( * ) from country where continent = 'Asia'" - }, - { - "index": 808, - "db_id": "world_1", - "question": "What are the names of the countries that are in the continent of Europe and have a population of 80000?", - "db_info": "| country: name, continent, population | | city: name, countrycode, population | | countrylanguage: countrycode |", - "ground_truth": "select name from country where continent = 'Europe' and population = '80000'" - }, - { - "index": 809, - "db_id": "world_1", - "question": "Give the names of countries that are in Europe and have a population equal to 80000.", - "db_info": "| country: code, name, continent, population | city: countrycode, name, population | sqlite_sequence: name | countrylanguage: countrycode, language |", - "ground_truth": "select name from country where continent = 'Europe' and population = '80000'" - }, - { - "index": 810, - "db_id": "world_1", - "question": "What is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select sum ( population ) , avg ( surfacearea ) from country where continent = 'north america' and surfacearea > 3000" - }, - { - "index": 811, - "db_id": "world_1", - "question": "Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 .", - "db_info": "| country: surfacearea, population | city: population, countrycode |", - "ground_truth": "select sum ( population ) , avg ( surfacearea ) from country where continent = 'north america' and surfacearea > 3000" - }, - { - "index": 812, - "db_id": "world_1", - "question": "What are the cities whose population is between 160000 and 900000?", - "db_info": "| city: population, name, countrycode, district, id | country: population, name, code, continent, region | countrylanguage: language, isofficial, percentage, countrycode | sqlite_sequence: name, seq |", - "ground_truth": "select name from city where population between 160000 and 900000" - }, - { - "index": 813, - "db_id": "world_1", - "question": "Return the names of cities that have a population between 160000 and 900000 .", - "db_info": "| city: population, name, countrycode, district, id | country: population, name, code, continent | countrylanguage: countrycode | sqlite_sequence: name, seq |", - "ground_truth": "select name from city where population between 160000 and 900000" - }, - { - "index": 814, - "db_id": "world_1", - "question": "Which language is spoken by the largest number of countries?", - "db_info": "| country: code, name, population | city: countrycode, name, population | countrylanguage: countrycode, language, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select language from countrylanguage group by language order by count ( * ) desc limit 1" - }, - { - "index": 815, - "db_id": "world_1", - "question": "Give the language that is spoken in the most countries.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage | city: id, name, countrycode, district, population | sqlite_sequence: name, seq |", - "ground_truth": "select language from countrylanguage group by language order by count ( * ) desc limit 1" - }, - { - "index": 816, - "db_id": "world_1", - "question": "What is the language spoken by the largest percentage of people in each country?", - "db_info": "| country: code, name, population, continent, region | city: countrycode, name | countrylanguage: countrycode, language, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select language , countrycode , max ( percentage ) from countrylanguage group by countrycode" - }, - { - "index": 817, - "db_id": "world_1", - "question": "What are the country codes of the different countries, and what are the languages spoken by the greatest percentage of people for each?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | countrylanguage: countrycode, language, isofficial, percentage | | city: id, name, countrycode, district, population | | sqlite_sequence: name, seq |", - "ground_truth": "select language , countrycode , max ( percentage ) from countrylanguage group by countrycode" - }, - { - "index": 818, - "db_id": "world_1", - "question": "What is the total number of countries where Spanish is spoken by the largest percentage of people?", - "db_info": "| country: code, name, population | city: countrycode, name, population | countrylanguage: countrycode, language, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" - }, - { - "index": 819, - "db_id": "world_1", - "question": "Count the number of countries for which Spanish is the predominantly spoken language.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select count ( * ) , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" - }, - { - "index": 820, - "db_id": "world_1", - "question": "What are the codes of countries where Spanish is spoken by the largest percentage of people?", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | | city: id, name, countrycode, district, population | | countrylanguage: countrycode, language, isofficial, percentage |", - "ground_truth": "select countrycode , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" - }, - { - "index": 821, - "db_id": "world_1", - "question": "Return the codes of countries for which Spanish is the predominantly spoken language.", - "db_info": "| country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |", - "ground_truth": "select countrycode , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" - }, - { - "index": 822, - "db_id": "orchestra", - "question": "How many conductors are there?", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select count ( * ) from conductor" - }, - { - "index": 823, - "db_id": "orchestra", - "question": "Count the number of conductors.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select count ( * ) from conductor" - }, - { - "index": 824, - "db_id": "orchestra", - "question": "List the names of conductors in ascending order of age.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select name from conductor order by age asc" - }, - { - "index": 825, - "db_id": "orchestra", - "question": "What are the names of conductors, ordered by age?", - "db_info": "| conductor: conductor_id, name, age, nationality | orchestra: orchestra_id, conductor_id, orchestra, year_of_founded | performance: performance_id, orchestra_id, date, official_ratings_(millions) | show: show_id, performance_id, attendance |", - "ground_truth": "select name from conductor order by age asc" - }, - { - "index": 826, - "db_id": "orchestra", - "question": "What are the names of conductors whose nationalities are not \"USA\"?", - "db_info": "| conductor: nationality, name, conductor_id | orchestra: conductor_id, orchestra, orchestra_id | performance: orchestra_id, type, date | show: performance_id, result, show_id |", - "ground_truth": "select name from conductor where nationality != 'USA'" - }, - { - "index": 827, - "db_id": "orchestra", - "question": "Return the names of conductors that do not have the nationality \"USA\".", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select name from conductor where nationality != 'USA'" - }, - { - "index": 828, - "db_id": "orchestra", - "question": "What are the record companies of orchestras in descending order of years in which they were founded?", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company from orchestra order by year_of_founded desc" - }, - { - "index": 829, - "db_id": "orchestra", - "question": "Return the record companies of orchestras, sorted descending by the years in which they were founded.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company from orchestra order by year_of_founded desc" - }, - { - "index": 830, - "db_id": "orchestra", - "question": "What is the average attendance of shows?", - "db_info": "| show: show_id, performance_id, if_first_show, result, attendance | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work |", - "ground_truth": "select avg ( attendance ) from show" - }, - { - "index": 831, - "db_id": "orchestra", - "question": "Return the average attendance across all shows.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, year_of_founded | performance: orchestra_id, official_ratings_(millions) | show: performance_id, attendance |", - "ground_truth": "select avg ( attendance ) from show" - }, - { - "index": 832, - "db_id": "orchestra", - "question": "What are the maximum and minimum share of performances whose type is not \"Live final\".", - "db_info": "| performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work |", - "ground_truth": "select max ( share ) , min ( share ) from performance where type != 'Live final'" - }, - { - "index": 833, - "db_id": "orchestra", - "question": "Return the maximum and minimum shares for performances that do not have the type \"Live final\".", - "db_info": "| performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select max ( share ) , min ( share ) from performance where type != 'Live final'" - }, - { - "index": 834, - "db_id": "orchestra", - "question": "How many different nationalities do conductors have?", - "db_info": "| conductor: conductor_id, nationality, name, age | orchestra: orchestra_id, conductor_id, orchestra | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select count ( distinct nationality ) from conductor" - }, - { - "index": 835, - "db_id": "orchestra", - "question": "Count the number of different nationalities of conductors.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select count ( distinct nationality ) from conductor" - }, - { - "index": 836, - "db_id": "orchestra", - "question": "List names of conductors in descending order of years of work.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select name from conductor order by year_of_work desc" - }, - { - "index": 837, - "db_id": "orchestra", - "question": "What are the names of conductors, sorted descending by the number of years they have worked?", - "db_info": "| conductor: conductor_id, name, year_of_work, age, nationality | orchestra: orchestra_id, conductor_id, orchestra, year_of_founded | performance: performance_id, orchestra_id, date, type | show: show_id, performance_id |", - "ground_truth": "select name from conductor order by year_of_work desc" - }, - { - "index": 838, - "db_id": "orchestra", - "question": "List the name of the conductor with the most years of work.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select name from conductor order by year_of_work desc limit 1" - }, - { - "index": 839, - "db_id": "orchestra", - "question": "What is the name of the conductor who has worked the greatest number of years?", - "db_info": "| conductor: name, year_of_work, conductor_id, age, nationality | orchestra: conductor_id, orchestra_id, year_of_founded, orchestra, record_company, major_record_format | performance: orchestra_id, performance_id, date, official_ratings_(millions), type, weekly_rank, share | show: performance_id, show_id, attendance, if_first_show, result |", - "ground_truth": "select name from conductor order by year_of_work desc limit 1" - }, - { - "index": 840, - "db_id": "orchestra", - "question": "Show the names of conductors and the orchestras they have conducted.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name , orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id" - }, - { - "index": 841, - "db_id": "orchestra", - "question": "What are the names of conductors as well as the corresonding orchestras that they have conducted?", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name , orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id" - }, - { - "index": 842, - "db_id": "orchestra", - "question": "Show the names of conductors that have conducted more than one orchestras.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id having count ( * ) > 1" - }, - { - "index": 843, - "db_id": "orchestra", - "question": "What are the names of conductors who have conducted at more than one orchestra?", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id having count ( * ) > 1" - }, - { - "index": 844, - "db_id": "orchestra", - "question": "Show the name of the conductor that has conducted the most number of orchestras.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, conductor_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id order by count ( * ) desc limit 1" - }, - { - "index": 845, - "db_id": "orchestra", - "question": "What is the name of the conductor who has conducted the most orchestras?", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id order by count ( * ) desc limit 1" - }, - { - "index": 846, - "db_id": "orchestra", - "question": "Please show the name of the conductor that has conducted orchestras founded after 2008.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where year_of_founded > 2008" - }, - { - "index": 847, - "db_id": "orchestra", - "question": "What are the names of conductors who have conducted orchestras founded after the year 2008?", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where year_of_founded > 2008" - }, - { - "index": 848, - "db_id": "orchestra", - "question": "Please show the different record companies and the corresponding number of orchestras.", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company , count ( * ) from orchestra group by record_company" - }, - { - "index": 849, - "db_id": "orchestra", - "question": "How many orchestras does each record company manage?", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company , count ( * ) from orchestra group by record_company" - }, - { - "index": 850, - "db_id": "orchestra", - "question": "Please show the record formats of orchestras in ascending order of count.", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select major_record_format from orchestra group by major_record_format order by count ( * ) asc" - }, - { - "index": 851, - "db_id": "orchestra", - "question": "What are the major record formats of orchestras, sorted by their frequency?", - "db_info": "| orchestra: major_record_format, orchestra_id, conductor_id, orchestra, record_company, year_of_founded | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | conductor: conductor_id, name, age, nationality, year_of_work | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select major_record_format from orchestra group by major_record_format order by count ( * ) asc" - }, - { - "index": 852, - "db_id": "orchestra", - "question": "List the record company shared by the most number of orchestras.", - "db_info": "| orchestra: orchestra_id, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company from orchestra group by record_company order by count ( * ) desc limit 1" - }, - { - "index": 853, - "db_id": "orchestra", - "question": "What is the record company used by the greatest number of orchestras?", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | | conductor: conductor_id, name, age, nationality, year_of_work | | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company from orchestra group by record_company order by count ( * ) desc limit 1" - }, - { - "index": 854, - "db_id": "orchestra", - "question": "List the names of orchestras that have no performance.", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select orchestra from orchestra where orchestra_id not in ( select orchestra_id from performance )" - }, - { - "index": 855, - "db_id": "orchestra", - "question": "What are the orchestras that do not have any performances?", - "db_info": "| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select orchestra from orchestra where orchestra_id not in ( select orchestra_id from performance )" - }, - { - "index": 856, - "db_id": "orchestra", - "question": "Show the record companies shared by orchestras founded before 2003 and after 2003.", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003" - }, - { - "index": 857, - "db_id": "orchestra", - "question": "What are the record companies that are used by both orchestras founded before 2003 and those founded after 2003?", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003" - }, - { - "index": 858, - "db_id": "orchestra", - "question": "Find the number of orchestras whose record format is \"CD\" or \"DVD\".", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'" - }, - { - "index": 859, - "db_id": "orchestra", - "question": "Count the number of orchestras that have CD or DVD as their record format.", - "db_info": "| orchestra: major_record_format, orchestra_id, conductor_id, orchestra, record_company, year_of_founded | performance: orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, if_first_show, result, attendance | conductor: conductor_id, name, age, nationality, year_of_work |", - "ground_truth": "select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'" - }, - { - "index": 860, - "db_id": "orchestra", - "question": "Show the years in which orchestras that have given more than one performance are founded.", - "db_info": "| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |", - "ground_truth": "select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1" - }, - { - "index": 861, - "db_id": "orchestra", - "question": "What are years of founding for orchestras that have had more than a single performance?", - "db_info": "| orchestra: year_of_founded, orchestra_id, conductor_id, orchestra, record_company, major_record_format | performance: orchestra_id, date, official_ratings_(millions), type, weekly_rank, share | show: attendance, if_first_show, result, performance_id | conductor: year_of_work, conductor_id, name, age, nationality |", - "ground_truth": "select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1" - }, - { - "index": 862, - "db_id": "network_1", - "question": "How many high schoolers are there?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select count ( * ) from highschooler" - }, - { - "index": 863, - "db_id": "network_1", - "question": "Count the number of high schoolers.", - "db_info": "| friend: student_id, friend_id | likes: student_id, liked_id | highschooler: id, name, grade |", - "ground_truth": "select count ( * ) from highschooler" - }, - { - "index": 864, - "db_id": "network_1", - "question": "Show the names and grades of each high schooler.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select name , grade from highschooler" - }, - { - "index": 865, - "db_id": "network_1", - "question": "What are the names and grades for each high schooler?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select name , grade from highschooler" - }, - { - "index": 866, - "db_id": "network_1", - "question": "Show all the grades of the high schoolers.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade from highschooler" - }, - { - "index": 867, - "db_id": "network_1", - "question": "What is the grade of each high schooler?", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade from highschooler" - }, - { - "index": 868, - "db_id": "network_1", - "question": "What grade is Kyle in?", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade from highschooler where name = 'Kyle'" - }, - { - "index": 869, - "db_id": "network_1", - "question": "Return the grade for the high schooler named Kyle.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade from highschooler where name = 'Kyle'" - }, - { - "index": 870, - "db_id": "network_1", - "question": "Show the names of all high schoolers in grade 10.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select name from highschooler where grade = 10" - }, - { - "index": 871, - "db_id": "network_1", - "question": "What are the names of all high schoolers in grade 10?", - "db_info": "| highschooler: name, grade, id | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select name from highschooler where grade = 10" - }, - { - "index": 872, - "db_id": "network_1", - "question": "Show the ID of the high schooler named Kyle.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select id from highschooler where name = 'Kyle'" - }, - { - "index": 873, - "db_id": "network_1", - "question": "What is Kyle's id?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select id from highschooler where name = 'Kyle'" - }, - { - "index": 874, - "db_id": "network_1", - "question": "How many high schoolers are there in grade 9 or 10?", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select count ( * ) from highschooler where grade = 9 or grade = 10" - }, - { - "index": 875, - "db_id": "network_1", - "question": "Count the number of high schoolers in grades 9 or 10.", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id, id | likes: student_id, liked_id, id |", - "ground_truth": "select count ( * ) from highschooler where grade = 9 or grade = 10" - }, - { - "index": 876, - "db_id": "network_1", - "question": "Show the number of high schoolers for each grade.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade , count ( * ) from highschooler group by grade" - }, - { - "index": 877, - "db_id": "network_1", - "question": "How many high schoolers are in each grade?", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade , count ( * ) from highschooler group by grade" - }, - { - "index": 878, - "db_id": "network_1", - "question": "Which grade has the most high schoolers?", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade from highschooler group by grade order by count ( * ) desc limit 1" - }, - { - "index": 879, - "db_id": "network_1", - "question": "Return the grade that has the greatest number of high schoolers.", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade from highschooler group by grade order by count ( * ) desc limit 1" - }, - { - "index": 880, - "db_id": "network_1", - "question": "Show me all grades that have at least 4 students.", - "db_info": "| highschooler: id, grade, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select grade from highschooler group by grade having count ( * ) >= 4" - }, - { - "index": 881, - "db_id": "network_1", - "question": "Which grades have 4 or more high schoolers?", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id, id | likes: student_id, liked_id, id |", - "ground_truth": "select grade from highschooler group by grade having count ( * ) >= 4" - }, - { - "index": 882, - "db_id": "network_1", - "question": "Show the student IDs and numbers of friends corresponding to each.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select student_id , count ( * ) from friend group by student_id" - }, - { - "index": 883, - "db_id": "network_1", - "question": "How many friends does each student have?", - "db_info": "| friend: student_id, friend_id | likes: student_id, liked_id | highschooler: id, name, grade |", - "ground_truth": "select student_id , count ( * ) from friend group by student_id" - }, - { - "index": 884, - "db_id": "network_1", - "question": "Show the names of high school students and their corresponding number of friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name , count ( * ) from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id" - }, - { - "index": 885, - "db_id": "network_1", - "question": "What are the names of the high schoolers and how many friends does each have?", - "db_info": "| highschooler: name, id | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name , count ( * ) from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id" - }, - { - "index": 886, - "db_id": "network_1", - "question": "What is the name of the high schooler who has the greatest number of friends?", - "db_info": "| highschooler: name, id | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1" - }, - { - "index": 887, - "db_id": "network_1", - "question": "Return the name of the high school student with the most friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1" - }, - { - "index": 888, - "db_id": "network_1", - "question": "Show the names of high schoolers who have at least 3 friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3" - }, - { - "index": 889, - "db_id": "network_1", - "question": "What are the names of high schoolers who have 3 or more friends?", - "db_info": "| highschooler: name, id | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3" - }, - { - "index": 890, - "db_id": "network_1", - "question": "Show the names of all of the high schooler Kyle's friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'" - }, - { - "index": 891, - "db_id": "network_1", - "question": "Return the names of friends of the high school student Kyle.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'" - }, - { - "index": 892, - "db_id": "network_1", - "question": "How many friends does the high school student Kyle have?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'" - }, - { - "index": 893, - "db_id": "network_1", - "question": "Count the number of friends Kyle has.", - "db_info": "| friend: student_id, friend_id | highschooler: id, name, grade | likes: student_id, liked_id |", - "ground_truth": "select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'" - }, - { - "index": 894, - "db_id": "network_1", - "question": "Show ids of all students who do not have any friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select id from highschooler except select student_id from friend" - }, - { - "index": 895, - "db_id": "network_1", - "question": "What are the ids of high school students who do not have friends?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select id from highschooler except select student_id from friend" - }, - { - "index": 896, - "db_id": "network_1", - "question": "Show names of all high school students who do not have any friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select name from highschooler except select highschooler.name from friend join highschooler on friend.student_id = highschooler.id" - }, - { - "index": 897, - "db_id": "network_1", - "question": "What are the names of students who have no friends?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select name from highschooler except select highschooler.name from friend join highschooler on friend.student_id = highschooler.id" - }, - { - "index": 898, - "db_id": "network_1", - "question": "Show the ids of high schoolers who have friends and are also liked by someone else.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select student_id from friend intersect select liked_id from likes" - }, - { - "index": 899, - "db_id": "network_1", - "question": "What are the ids of students who both have friends and are liked?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select student_id from friend intersect select liked_id from likes" - }, - { - "index": 900, - "db_id": "network_1", - "question": "Show name of all students who have some friends and also are liked by someone else.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on likes.student_id = highschooler.id intersect select highschooler.name from likes join highschooler on likes.liked_id = highschooler.id" - }, - { - "index": 901, - "db_id": "network_1", - "question": "What are the names of high schoolers who both have friends and are liked?", - "db_info": "| highschooler: name, id, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on likes.student_id = highschooler.id intersect select highschooler.name from likes join highschooler on likes.liked_id = highschooler.id" - }, - { - "index": 902, - "db_id": "network_1", - "question": "Count the number of likes for each student id.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select student_id , count ( * ) from likes group by student_id" - }, - { - "index": 903, - "db_id": "network_1", - "question": "How many likes correspond to each student id?", - "db_info": "| likes: student_id, liked_id | friend: student_id, friend_id | highschooler: id, name, grade |", - "ground_truth": "select student_id , count ( * ) from likes group by student_id" - }, - { - "index": 904, - "db_id": "network_1", - "question": "Show the names of high schoolers who have likes, and numbers of likes for each.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name , count ( * ) from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id" - }, - { - "index": 905, - "db_id": "network_1", - "question": "What are the names of high schoolers who have likes, and how many likes does each have?", - "db_info": "| highschooler: id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name , count ( * ) from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id" - }, - { - "index": 906, - "db_id": "network_1", - "question": "What is the name of the high schooler who has the greatest number of likes?", - "db_info": "| highschooler: name, id, grade | friend: student_id, friend_id, id | likes: student_id, liked_id, id |", - "ground_truth": "select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id order by count ( * ) desc limit 1" - }, - { - "index": 907, - "db_id": "network_1", - "question": "Give the name of the student with the most likes.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id order by count ( * ) desc limit 1" - }, - { - "index": 908, - "db_id": "network_1", - "question": "Show the names of students who have at least 2 likes.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id having count ( * ) >= 2" - }, - { - "index": 909, - "db_id": "network_1", - "question": "What are the names of students who have 2 or more likes?", - "db_info": "| highschooler: name, id, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id having count ( * ) >= 2" - }, - { - "index": 910, - "db_id": "network_1", - "question": "Show the names of students who have a grade higher than 5 and have at least 2 friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id where highschooler.grade > 5 group by friend.student_id having count ( * ) >= 2" - }, - { - "index": 911, - "db_id": "network_1", - "question": "What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?", - "db_info": "| highschooler: name, grade, id | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select highschooler.name from friend join highschooler on friend.student_id = highschooler.id where highschooler.grade > 5 group by friend.student_id having count ( * ) >= 2" - }, - { - "index": 912, - "db_id": "network_1", - "question": "How many likes does Kyle have?", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'" - }, - { - "index": 913, - "db_id": "network_1", - "question": "Return the number of likes that the high schooler named Kyle has.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'" - }, - { - "index": 914, - "db_id": "network_1", - "question": "Find the average grade of all students who have some friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select avg ( grade ) from highschooler where id in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" - }, - { - "index": 915, - "db_id": "network_1", - "question": "What is the average grade of students who have friends?", - "db_info": "| friend: student_id, friend_id | likes: student_id, liked_id | highschooler: id, name, grade |", - "ground_truth": "select avg ( grade ) from highschooler where id in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" - }, - { - "index": 916, - "db_id": "network_1", - "question": "Find the minimum grade of students who have no friends.", - "db_info": "| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select min ( grade ) from highschooler where id not in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" - }, - { - "index": 917, - "db_id": "network_1", - "question": "What is the lowest grade of students who do not have any friends?", - "db_info": "| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |", - "ground_truth": "select min ( grade ) from highschooler where id not in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" - }, - { - "index": 918, - "db_id": "dog_kennels", - "question": "Which states have both owners and professionals living there?", - "db_info": "| owners: state, owner_id, first_name, last_name, street, city, zip_code, email_address, home_phone, cell_number | professionals: state, professional_id, role_code, first_name, last_name, street, city, zip_code, email_address, home_phone, cell_number | dogs: owner_id, dog_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select state from owners intersect select state from professionals" - }, - { - "index": 919, - "db_id": "dog_kennels", - "question": "Find the states where both owners and professionals live.", - "db_info": "| owners: state, owner_id, first_name, last_name, street, city, zip_code, email_address, home_phone, cell_number | professionals: state, professional_id, role_code, first_name, last_name, street, city, zip_code, email_address, home_phone, cell_number | dogs: owner_id, breed_code, size_code, name, dog_id, abandoned_yn, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: dog_id, professional_id, treatment_type_code, treatment_id, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | charges: charge_id, charge_type, charge_amount | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select state from owners intersect select state from professionals" - }, - { - "index": 920, - "db_id": "dog_kennels", - "question": "What is the average age of the dogs who have gone through any treatments?", - "db_info": "| dogs: dog_id, owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select avg ( age ) from dogs where dog_id in ( select dog_id from treatments )" - }, - { - "index": 921, - "db_id": "dog_kennels", - "question": "Find the average age of the dogs who went through treatments.", - "db_info": "| dogs: owner_id, breed_code, size_code, age | breeds: breed_code, breed_name | sizes: size_code, size_description | treatments: dog_id, treatment_type_code, date_of_treatment | charges: charge_id, charge_type, charge_amount | professionals: professional_id, role_code | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select avg ( age ) from dogs where dog_id in ( select dog_id from treatments )" - }, - { - "index": 922, - "db_id": "dog_kennels", - "question": "Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.", - "db_info": "| professionals: professional_id, first_name, last_name, cell_number | treatments: professional_id, treatment_id, date_of_treatment, cost_of_treatment | dogs: owner_id, dog_id, breed_code, size_code | owners: owner_id, last_name, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select professional_id , last_name , cell_number from professionals where state = 'Indiana' union select professionals.professional_id , professionals.last_name , professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) > 2" - }, - { - "index": 923, - "db_id": "dog_kennels", - "question": "Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.", - "db_info": "| professionals: professional_id, last_name, cell_number, state | owners: owner_id, last_name, cell_number, state | dogs: dog_id, owner_id, breed_code, size_code | treatments: treatment_id, dog_id, professional_id, treatment_type_code |", - "ground_truth": "select professional_id , last_name , cell_number from professionals where state = 'Indiana' union select professionals.professional_id , professionals.last_name , professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) > 2" - }, - { - "index": 924, - "db_id": "dog_kennels", - "question": "Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .", - "db_info": "| dogs: owner_id, breed_code, size_code, name | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | charges: charge_id, charge_type, charge_amount | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | | treatment_types: treatment_type_code, treatment_type_description | | treatments: dog_id, treatment_type_code, cost_of_treatment |", - "ground_truth": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum ( cost_of_treatment ) > 1000 )" - }, - { - "index": 925, - "db_id": "dog_kennels", - "question": "What are the names of the dogs for which the owner has not spend more than 1000 for treatment ?", - "db_info": "| dogs: name, owner_id, breed_code, weight, age | owners: owner_id, first_name, last_name | breeds: breed_code, breed_name | treatments: cost_of_treatment, dog_id, treatment_type_code |", - "ground_truth": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum ( cost_of_treatment ) > 1000 )" - }, - { - "index": 926, - "db_id": "dog_kennels", - "question": "Which first names are used for professionals or owners but are not used as dog names?", - "db_info": "| owners: first_name, owner_id, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | professionals: first_name, professional_id, role_code, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select first_name from professionals union select first_name from owners except select name from dogs" - }, - { - "index": 927, - "db_id": "dog_kennels", - "question": "Find the first names that are used for professionals or owners but are not used as dog names.", - "db_info": "| owners: first_name, last_name, owner_id, street, city, state, zip_code, email_address, home_phone, cell_number | professionals: first_name, last_name, professional_id, role_code, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: name, owner_id, breed_code, size_code, dog_id, abandoned_yn, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: dog_id, professional_id, treatment_type_code, treatment_id, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select first_name from professionals union select first_name from owners except select name from dogs" - }, - { - "index": 928, - "db_id": "dog_kennels", - "question": "Which professional did not operate any treatment on dogs? List the professional's id, role and email.", - "db_info": "| professionals: professional_id, role_code, email_address | owners: owner_id, first_name, last_name, email_address | dogs: dog_id, owner_id, breed_code, name, abandoned_yn, gender |", - "ground_truth": "select professional_id , role_code , email_address from professionals except select professionals.professional_id , professionals.role_code , professionals.email_address from professionals join treatments on professionals.professional_id = treatments.professional_id" - }, - { - "index": 929, - "db_id": "dog_kennels", - "question": "Give me the id, role and email of the professionals who did not perform any treatment on dogs.", - "db_info": "| professionals: professional_id, role_code, first_name, email_address | owners: owner_id, first_name, last_name, email_address | dogs: dog_id, owner_id, breed_code, size_code | treatments: dog_id, professional_id, treatment_type_code | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select professional_id , role_code , email_address from professionals except select professionals.professional_id , professionals.role_code , professionals.email_address from professionals join treatments on professionals.professional_id = treatments.professional_id" - }, - { - "index": 930, - "db_id": "dog_kennels", - "question": "Which owner owns the most dogs? List the owner id, first name and last name.", - "db_info": "| owners: owner_id, first_name, last_name | dogs: owner_id, name | breeds: breed_code, breed_name | sizes: size_code, size_description | charges: charge_id, charge_type, charge_amount | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, last_name | treatments: treatment_id, dog_id, professional_id, treatment_type_code |", - "ground_truth": "select dogs.owner_id , owners.first_name , owners.last_name from dogs join owners on dogs.owner_id = owners.owner_id group by dogs.owner_id order by count ( * ) desc limit 1" - }, - { - "index": 931, - "db_id": "dog_kennels", - "question": "Return the owner id, first name and last name of the owner who has the most dogs.", - "db_info": "| owners: owner_id, first_name, last_name | dogs: owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount | professionals: professional_id, first_name, last_name | treatments: dog_id, professional_id, treatment_type_code |", - "ground_truth": "select dogs.owner_id , owners.first_name , owners.last_name from dogs join owners on dogs.owner_id = owners.owner_id group by dogs.owner_id order by count ( * ) desc limit 1" - }, - { - "index": 932, - "db_id": "dog_kennels", - "question": "Which professionals have done at least two treatments? List the professional's id, role, and first name.", - "db_info": "| professionals: professional_id, role_code, first_name | treatments: professional_id, treatment_type_code, date_of_treatment | dogs: owner_id | owners: owner_id, first_name, last_name |", - "ground_truth": "select professionals.professional_id , professionals.role_code , professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" - }, - { - "index": 933, - "db_id": "dog_kennels", - "question": "What are the id, role, and first name of the professionals who have performed two or more treatments?", - "db_info": "| professionals: professional_id, role_code, first_name | treatments: professional_id, treatment_type_code | dogs: dog_id, owner_id, breed_code, size_code | owners: owner_id, first_name |", - "ground_truth": "select professionals.professional_id , professionals.role_code , professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" - }, - { - "index": 934, - "db_id": "dog_kennels", - "question": "What is the name of the breed with the most dogs?", - "db_info": "| breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1" - }, - { - "index": 935, - "db_id": "dog_kennels", - "question": "Which breed do the most dogs have? Give me the breed name.", - "db_info": "| dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | treatment_types: treatment_type_code, treatment_type_description | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1" - }, - { - "index": 936, - "db_id": "dog_kennels", - "question": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.", - "db_info": "| owners: owner_id, last_name | dogs: owner_id | treatments: dog_id, professional_id | breeds: breed_code | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select owners.owner_id , owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1" - }, - { - "index": 937, - "db_id": "dog_kennels", - "question": "Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.", - "db_info": "| owners: owner_id, last_name, first_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: owner_id, breed_code, dog_id, abandoned_yn, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: dog_id, professional_id, treatment_type_code, cost_of_treatment, treatment_id, date_of_treatment | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select owners.owner_id , owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1" - }, - { - "index": 938, - "db_id": "dog_kennels", - "question": "What is the description of the treatment type that costs the least money in total?", - "db_info": "| treatment_types: treatment_type_description | charges: charge_type, charge_amount | treatments: treatment_type_code, cost_of_treatment | dogs: breed_code, size_code, dog_id | breeds: breed_code, breed_name | sizes: size_description | owners: owner_id, first_name, last_name | professionals: professional_id |", - "ground_truth": "select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatment_types.treatment_type_code order by sum ( cost_of_treatment ) asc limit 1" - }, - { - "index": 939, - "db_id": "dog_kennels", - "question": "Give me the description of the treatment type whose total cost is the lowest.", - "db_info": "| treatments: treatment_type_code, cost_of_treatment | treatment_types: treatment_type_code, treatment_type_description | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatment_types.treatment_type_code order by sum ( cost_of_treatment ) asc limit 1" - }, - { - "index": 940, - "db_id": "dog_kennels", - "question": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.", - "db_info": "| owners: owner_id, zip_code, first_name, last_name, street, city, state, email_address, home_phone, cell_number | | dogs: owner_id, weight, dog_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, date_arrived, date_adopted, date_departed | | breeds: breed_code, breed_name | | charges: charge_amount, charge_id, charge_type | | sizes: size_code, size_description | | treatments: dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment, treatment_id | | professionals: professional_id, role_code, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | treatment_types: treatment_type_code, treatment_type_description | The database info string: | owners: owner_id, zip_code, first_name, last_name, street, city, state, email_address, home_phone, cell_number | dogs: owner_id, weight, dog_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, date_arrived, date_adopted, date_departed | breeds: breed_code, breed_name | charges: charge_amount, charge_id, charge_type | sizes: size_code, size_description | treatments: dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment, treatment_id | professionals: professional_id, role_code, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select owners.owner_id , owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by sum ( treatments.cost_of_treatment ) desc limit 1" - }, - { - "index": 941, - "db_id": "dog_kennels", - "question": "Find the owner id and zip code of the owner who spent the most money in total for his or her dogs.", - "db_info": "| owners: owner_id, zip_code | dogs: owner_id, breed_code, size_code | treatments: cost_of_treatment | breeds: breed_code | sizes: size_code |", - "ground_truth": "select owners.owner_id , owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by sum ( treatments.cost_of_treatment ) desc limit 1" - }, - { - "index": 942, - "db_id": "dog_kennels", - "question": "Which professionals have done at least two types of treatments? List the professional id and cell phone.", - "db_info": "| professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select professionals.professional_id , professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" - }, - { - "index": 943, - "db_id": "dog_kennels", - "question": "Find the id and cell phone of the professionals who operate two or more types of treatments.", - "db_info": "| dogs: breed_code, size_code | treatments: dog_id, professional_id, treatment_type_code | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: cell_number, professional_id | charges: charge_id, charge_type, charge_amount | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number |", - "ground_truth": "select professionals.professional_id , professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" - }, - { - "index": 944, - "db_id": "dog_kennels", - "question": "What are the first name and last name of the professionals who have done treatment with cost below average?", - "db_info": "| professionals: professional_id, first_name, last_name, role_code | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | dogs: dog_id, owner_id, breed_code, size_code, name, age | owners: owner_id, first_name, last_name | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select distinct professionals.first_name , professionals.last_name from professionals join treatments where cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )" - }, - { - "index": 945, - "db_id": "dog_kennels", - "question": "Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.", - "db_info": "| professionals: first_name, last_name, professional_id | treatments: cost_of_treatment, professional_id | dogs: owner_id, dog_id, breed_code, size_code | owners: first_name, last_name, owner_id | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select distinct professionals.first_name , professionals.last_name from professionals join treatments where cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )" - }, - { - "index": 946, - "db_id": "dog_kennels", - "question": "List the date of each treatment, together with the first name of the professional who operated it.", - "db_info": "| treatments: dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | dogs: owner_id, breed_code, size_code, name | professionals: professional_id, first_name | breeds: breed_code, breed_name | treatment_types: treatment_type_code, treatment_type_description | sizes: size_code, size_description | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select treatments.date_of_treatment , professionals.first_name from treatments join professionals on treatments.professional_id = professionals.professional_id" - }, - { - "index": 947, - "db_id": "dog_kennels", - "question": "What are the date and the operating professional's first name of each treatment?", - "db_info": "| dogs: owner_id, breed_code, size_code, name | treatments: dog_id, professional_id, treatment_type_code, date_of_treatment | professionals: professional_id, first_name | owners: owner_id, first_name | breeds: breed_code | sizes: size_code | treatment_types: treatment_type_code | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select treatments.date_of_treatment , professionals.first_name from treatments join professionals on treatments.professional_id = professionals.professional_id" - }, - { - "index": 948, - "db_id": "dog_kennels", - "question": "List the cost of each treatment and the corresponding treatment type description.", - "db_info": "| dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select treatments.cost_of_treatment , treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code" - }, - { - "index": 949, - "db_id": "dog_kennels", - "question": "What are the cost and treatment type description of each treatment?", - "db_info": "| dogs: dog_id, owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select treatments.cost_of_treatment , treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code" - }, - { - "index": 950, - "db_id": "dog_kennels", - "question": "List each owner's first name, last name, and the size of his for her dog.", - "db_info": "| owners: owner_id, first_name, last_name | dogs: dog_id, owner_id, breed_code, size_code | sizes: size_code, size_description | breeds: breed_code, breed_name |", - "ground_truth": "select owners.first_name , owners.last_name , dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id" - }, - { - "index": 951, - "db_id": "dog_kennels", - "question": "What are each owner's first name, last name, and the size of their dog?", - "db_info": "| owners: first_name, last_name | dogs: size_code | breeds: breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select owners.first_name , owners.last_name , dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id" - }, - { - "index": 952, - "db_id": "dog_kennels", - "question": "List pairs of the owner's first name and the dogs's name.", - "db_info": "| owners: first_name | dogs: name | breeds: breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: first_name | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select owners.first_name , dogs.name from owners join dogs on owners.owner_id = dogs.owner_id" - }, - { - "index": 953, - "db_id": "dog_kennels", - "question": "What are each owner's first name and their dogs's name?", - "db_info": "| owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select owners.first_name , dogs.name from owners join dogs on owners.owner_id = dogs.owner_id" - }, - { - "index": 954, - "db_id": "dog_kennels", - "question": "List the names of the dogs of the rarest breed and the treatment dates of them.", - "db_info": "| dogs: breed_code, name, dog_id, owner_id, date_of_birth, breed_code, date_arrived, date_adopted, date_departed | treatments: dog_id, treatment_type_code, date_of_treatment, professional_id, cost_of_treatment | breeds: breed_code, breed_name | owners: owner_id, first_name, last_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, first_name, last_name | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select dogs.name , treatments.date_of_treatment from dogs join treatments on dogs.dog_id = treatments.dog_id where dogs.breed_code = ( select breed_code from dogs group by breed_code order by count ( * ) asc limit 1 )" - }, - { - "index": 955, - "db_id": "dog_kennels", - "question": "Which dogs are of the rarest breed? Show their names and treatment dates.", - "db_info": "| dogs: breed_code, owner_id, name, date_arrived, date_adopted, date_departed | | breeds: breed_code, breed_name | | treatments: dog_id, treatment_type_code, date_of_treatment | | owners: owner_id, first_name, last_name | | sizes: size_code, size_description | | professionals: professional_id, first_name, last_name | | charges: charge_id, charge_type, charge_amount | | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select dogs.name , treatments.date_of_treatment from dogs join treatments on dogs.dog_id = treatments.dog_id where dogs.breed_code = ( select breed_code from dogs group by breed_code order by count ( * ) asc limit 1 )" - }, - { - "index": 956, - "db_id": "dog_kennels", - "question": "Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.", - "db_info": "| owners: owner_id, first_name, last_name, street, city, state, zip_code | dogs: dog_id, owner_id, name, breed_code, size_code |", - "ground_truth": "select owners.first_name , dogs.name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia'" - }, - { - "index": 957, - "db_id": "dog_kennels", - "question": "Find the first names of owners living in Virginia and the names of dogs they own.", - "db_info": "| owners: first_name, owner_id, last_name | dogs: owner_id, name, breed_code | breeds: breed_code, breed_name | sizes: size_code, size_description | charges: charge_id, charge_type, charge_amount | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, last_name, email_address, street, city, state, zip_code, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select owners.first_name , dogs.name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia'" - }, - { - "index": 958, - "db_id": "dog_kennels", - "question": "What are the arriving date and the departing date of the dogs who have gone through a treatment?", - "db_info": "| dogs: date_arrived, date_departed, breed_code, size_code, dog_id | treatments: dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | professionals: professional_id, role_code, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select distinct dogs.date_arrived , dogs.date_departed from dogs join treatments on dogs.dog_id = treatments.dog_id" - }, - { - "index": 959, - "db_id": "dog_kennels", - "question": "Find the arriving date and the departing date of the dogs that received a treatment.", - "db_info": "| dogs: date_arrived, date_departed | | breeds: breed_code | | sizes: size_code | | owners: owner_id | | treatments: dog_id, professional_id | | professionals: | | treatment_types: | | charges: |", - "ground_truth": "select distinct dogs.date_arrived , dogs.date_departed from dogs join treatments on dogs.dog_id = treatments.dog_id" - }, - { - "index": 960, - "db_id": "dog_kennels", - "question": "List the last name of the owner owning the youngest dog.", - "db_info": "| owners: last_name, first_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: age, owner_id, abandoned_yn, breed_code, size_code, name, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | breeds: breed_name, breed_code | sizes: size_code, size_description | charges: charge_id, charge_type, charge_amount | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id where dogs.age = ( select max ( age ) from dogs )" - }, - { - "index": 961, - "db_id": "dog_kennels", - "question": "Who owns the youngest dog? Give me his or her last name.", - "db_info": "| dogs: owner_id, breed_code, size_code, age, date_of_birth | owners: last_name | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code | treatments: dog_id, professional_id, treatment_type_code, date_of_treatment |", - "ground_truth": "select owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id where dogs.age = ( select max ( age ) from dogs )" - }, - { - "index": 962, - "db_id": "dog_kennels", - "question": "List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.", - "db_info": "| professionals: email_address | owners: email_address, owner_id | dogs: owner_id, breed_code, size_code | breeds: breed_name | sizes: | treatment_types: | charges: | treatments: |", - "ground_truth": "select email_address from professionals where state = 'Hawaii' or state = 'Wisconsin'" - }, - { - "index": 963, - "db_id": "dog_kennels", - "question": "What are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin?", - "db_info": "| professionals: email_address | owners: email_address | dogs: owner_id, breed_code, size_code | breeds: breed_code | sizes: size_code | treatment_types: treatment_type_code |", - "ground_truth": "select email_address from professionals where state = 'Hawaii' or state = 'Wisconsin'" - }, - { - "index": 964, - "db_id": "dog_kennels", - "question": "What are the arriving date and the departing date of all the dogs?", - "db_info": "| dogs: dog_id, owner_id, date_arrived, date_departed | owners: owner_id, email_address | breeds: breed_code, breed_name | sizes: size_code, size_description | treatments: dog_id, date_of_treatment |", - "ground_truth": "select date_arrived , date_departed from dogs" - }, - { - "index": 965, - "db_id": "dog_kennels", - "question": "List the arrival date and the departure date for all the dogs.", - "db_info": "| dogs: date_arrived, date_departed, breed_code, size_code, owner_id | owners: owner_id, first_name, last_name | sizes: size_code, size_description | breeds: breed_code, breed_name |", - "ground_truth": "select date_arrived , date_departed from dogs" - }, - { - "index": 966, - "db_id": "dog_kennels", - "question": "How many dogs went through any treatments?", - "db_info": "| dogs: dog_id, owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( distinct dog_id ) from treatments" - }, - { - "index": 967, - "db_id": "dog_kennels", - "question": "Count the number of dogs that went through a treatment.", - "db_info": "| dogs: dog_id, breed_code, size_code, owner_id | treatments: dog_id, treatment_type_code, professional_id | breeds: breed_code, breed_name | sizes: size_code, size_description | owners: owner_id, first_name, last_name | professionals: professional_id, role_code, first_name | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( distinct dog_id ) from treatments" - }, - { - "index": 968, - "db_id": "dog_kennels", - "question": "How many professionals have performed any treatment to dogs?", - "db_info": "| dogs: dog_id, owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( distinct professional_id ) from treatments" - }, - { - "index": 969, - "db_id": "dog_kennels", - "question": "Find the number of professionals who have ever treated dogs.", - "db_info": "| dogs: dog_id, owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( distinct professional_id ) from treatments" - }, - { - "index": 970, - "db_id": "dog_kennels", - "question": "Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state.", - "db_info": "| professionals: city, role_code, street, state | owners: city, street, state | dogs: city, street, state | treatments: city, street, state | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select role_code , street , city , state from professionals where city like '%West%'" - }, - { - "index": 971, - "db_id": "dog_kennels", - "question": "Find the role, street, city and state of the professionals living in a city that contains the substring 'West'.", - "db_info": "| professionals: city, state, street, role_code | owners: city, state, street, role_code | dogs: owner_id, breed_code, size_code, city, state, street | treatments: dog_id, professional_id, treatment_type_code, date_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select role_code , street , city , state from professionals where city like '%West%'" - }, - { - "index": 972, - "db_id": "dog_kennels", - "question": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.", - "db_info": "| owners: state, first_name, last_name, email_address | dogs: owner_id, name, breed_code, size_code | breeds: breed_code, breed_name | sizes: size_code, size_description | charges: charge_id, charge_type, charge_amount | treatment_types: treatment_type_code, treatment_type_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select first_name , last_name , email_address from owners where state like '%North%'" - }, - { - "index": 973, - "db_id": "dog_kennels", - "question": "Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'.", - "db_info": "| owners: first_name, last_name, email_address | dogs: owner_id | breeds: breed_code | sizes: | treatment_types: | charges: | professionals: | treatments: |", - "ground_truth": "select first_name , last_name , email_address from owners where state like '%North%'" - }, - { - "index": 974, - "db_id": "dog_kennels", - "question": "How many dogs have an age below the average?", - "db_info": "| dogs: age, breed_code, owner_id, size_code, name, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: first_name, last_name | breeds: breed_code, breed_name | sizes: size_code, size_description | professionals: professional_id | treatments: treatment_id | treatment_types: treatment_type_code | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( * ) from dogs where age < ( select avg ( age ) from dogs )" - }, - { - "index": 975, - "db_id": "dog_kennels", - "question": "Count the number of dogs of an age below the average.", - "db_info": "| dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( * ) from dogs where age < ( select avg ( age ) from dogs )" - }, - { - "index": 976, - "db_id": "dog_kennels", - "question": "How much does the most recent treatment cost?", - "db_info": "| treatments: cost_of_treatment | dogs: owner_id | charges: charge_amount | breeds: - | sizes: - | treatment_types: - | owners: - | professionals: - |", - "ground_truth": "select cost_of_treatment from treatments order by date_of_treatment desc limit 1" - }, - { - "index": 977, - "db_id": "dog_kennels", - "question": "Show me the cost of the most recently performed treatment.", - "db_info": "| treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | dogs: dog_id, owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | charges: charge_id, charge_type, charge_amount | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | sizes: size_code, size_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select cost_of_treatment from treatments order by date_of_treatment desc limit 1" - }, - { - "index": 978, - "db_id": "dog_kennels", - "question": "How many dogs have not gone through any treatment?", - "db_info": "| dogs: dog_id, breed_code, size_code, abandoned_yn | treatments: dog_id |", - "ground_truth": "select count ( * ) from dogs where dog_id not in ( select dog_id from treatments )" - }, - { - "index": 979, - "db_id": "dog_kennels", - "question": "Tell me the number of dogs that have not received any treatment .", - "db_info": "| dogs: breed_code, size_code | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | treatment_types: treatment_type_code, treatment_type_description | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | charges: charge_id, charge_type, charge_amount | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select count ( * ) from dogs where dog_id not in ( select dog_id from treatments )" - }, - { - "index": 980, - "db_id": "dog_kennels", - "question": "How many owners temporarily do not have any dogs?", - "db_info": "| dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select count ( * ) from owners where owner_id not in ( select owner_id from dogs )" - }, - { - "index": 981, - "db_id": "dog_kennels", - "question": "Find the number of owners who do not own any dogs at this moment.", - "db_info": "| owners: owner_id, first_name, last_name | dogs: owner_id, abandoned_yn | breeds: breed_code | sizes: size_code | treatment_types: treatment_type_code | treatments: dog_id, professional_id | professionals: professional_id | charges: charge_id |", - "ground_truth": "select count ( * ) from owners where owner_id not in ( select owner_id from dogs )" - }, - { - "index": 982, - "db_id": "dog_kennels", - "question": "How many professionals did not operate any treatment on dogs?", - "db_info": "| dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( * ) from professionals where professional_id not in ( select professional_id from treatments )" - }, - { - "index": 983, - "db_id": "dog_kennels", - "question": "Find the number of professionals who have not treated any dogs.", - "db_info": "| professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select count ( * ) from professionals where professional_id not in ( select professional_id from treatments )" - }, - { - "index": 984, - "db_id": "dog_kennels", - "question": "List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.", - "db_info": "| dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select name , age , weight from dogs where abandoned_yn = 1" - }, - { - "index": 985, - "db_id": "dog_kennels", - "question": "What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.", - "db_info": "| dogs: name, age, weight, abandoned_yn, breed_code, size_code | breeds: breed_code, breed_name | charges: charge_id, charge_type, charge_amount | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select name , age , weight from dogs where abandoned_yn = 1" - }, - { - "index": 986, - "db_id": "dog_kennels", - "question": "What is the average age of all the dogs?", - "db_info": "| dogs: owner_id, breed_code, size_code, age | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | charges: charge_id, charge_type, charge_amount | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | treatments: dog_id, professional_id, treatment_type_code, cost_of_treatment |", - "ground_truth": "select avg ( age ) from dogs" - }, - { - "index": 987, - "db_id": "dog_kennels", - "question": "Compute the average age of all the dogs.", - "db_info": "| dogs: age, breed_code, size_code | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | treatment_types: treatment_type_code, treatment_type_description | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | charges: charge_id, charge_type, charge_amount | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | | treatments: dog_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select avg ( age ) from dogs" - }, - { - "index": 988, - "db_id": "dog_kennels", - "question": "What is the age of the oldest dog?", - "db_info": "| dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | charges: charge_id, charge_type, charge_amount | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select max ( age ) from dogs" - }, - { - "index": 989, - "db_id": "dog_kennels", - "question": "Tell me the age of the oldest dog.", - "db_info": "| dogs: owner_id, breed_code, size_code, age | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | treatments: dog_id, professional_id, treatment_type_code | | treatment_types: treatment_type_code, treatment_type_description | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select max ( age ) from dogs" - }, - { - "index": 990, - "db_id": "dog_kennels", - "question": "How much does each charge type costs? List both charge type and amount.", - "db_info": "| dogs: owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | treatments: dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | | charges: charge_id, charge_type, charge_amount | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | treatment_types: treatment_type_code, treatment_type_description | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select charge_type , charge_amount from charges" - }, - { - "index": 991, - "db_id": "dog_kennels", - "question": "List each charge type and its amount.", - "db_info": "| dogs: dog_id, owner_id, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | | charges: charge_id, charge_type, charge_amount | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select charge_type , charge_amount from charges" - }, - { - "index": 992, - "db_id": "dog_kennels", - "question": "How much does the most expensive charge type costs?", - "db_info": "| charges: charge_type, charge_amount, charge_id | breeds: breed_code, breed_name | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | sizes: size_code, size_description | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | treatment_types: treatment_type_code, treatment_type_description |", - "ground_truth": "select max ( charge_amount ) from charges" - }, - { - "index": 993, - "db_id": "dog_kennels", - "question": "What is the charge amount of the most expensive charge type?", - "db_info": "| dogs: owner_id, breed_code, size_code | | charges: charge_id, charge_type, charge_amount | | treatments: dog_id, professional_id, treatment_type_code, cost_of_treatment | | breeds: breed_code, breed_name | | sizes: size_code, size_description | | treatment_types: treatment_type_code, treatment_type_description | | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | | professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number |", - "ground_truth": "select max ( charge_amount ) from charges" - }, - { - "index": 994, - "db_id": "dog_kennels", - "question": "List the email, cell phone and home phone of all the professionals.", - "db_info": "| professionals: email_address, home_phone, cell_number | owners: email_address, home_phone, cell_number | breeds: breed_code, breed_name | sizes: size_code, size_description | charges: charge_id, charge_type, charge_amount | treatment_types: treatment_type_code, treatment_type_description | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment |", - "ground_truth": "select email_address , cell_number , home_phone from professionals" - }, - { - "index": 995, - "db_id": "dog_kennels", - "question": "What are the email, cell phone and home phone of each professional?", - "db_info": "| professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select email_address , cell_number , home_phone from professionals" - }, - { - "index": 996, - "db_id": "dog_kennels", - "question": "What are all the possible breed type and size type combinations?", - "db_info": "| breeds: breed_code, breed_name | sizes: size_code, size_description | dogs: owner_id, breed_code, size_code | treatments: dog_id |", - "ground_truth": "select distinct breed_code , size_code from dogs" - }, - { - "index": 997, - "db_id": "dog_kennels", - "question": "Find the distinct breed type and size type combinations for dogs.", - "db_info": "| dogs: breed_code, size_code | breeds: breed_code, breed_name | sizes: size_code, size_description | owners: owner_id, first_name, last_name | treatments: treatment_type_code | professionals: professional_id |", - "ground_truth": "select distinct breed_code , size_code from dogs" - }, - { - "index": 998, - "db_id": "dog_kennels", - "question": "List the first name of all the professionals along with the description of the treatment they have done.", - "db_info": "| professionals: professional_id, role_code, first_name | breeds: breed_code, breed_name | dogs: dog_id, owner_id, breed_code, size_code, name | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | treatments: treatment_id, dog_id, professional_id, treatment_type_code | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select distinct professionals.first_name , treatment_types.treatment_type_description from professionals join treatments on professionals.professional_id = treatments.professional_id join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code" - }, - { - "index": 999, - "db_id": "dog_kennels", - "question": "What are each professional's first name and description of the treatment they have performed?", - "db_info": "| professionals: professional_id, role_code, first_name, street, city, state, zip_code, last_name, email_address, home_phone, cell_number | owners: owner_id, first_name, last_name, street, city, state, zip_code, email_address, home_phone, cell_number | dogs: dog_id, owner_id, abandoned_yn, breed_code, size_code, name, age, date_of_birth, gender, weight, date_arrived, date_adopted, date_departed | treatments: treatment_id, dog_id, professional_id, treatment_type_code, date_of_treatment, cost_of_treatment | breeds: breed_code, breed_name | sizes: size_code, size_description | treatment_types: treatment_type_code, treatment_type_description | charges: charge_id, charge_type, charge_amount |", - "ground_truth": "select distinct professionals.first_name , treatment_types.treatment_type_description from professionals join treatments on professionals.professional_id = treatments.professional_id join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code" - }, - { - "index": 1000, - "db_id": "singer", - "question": "How many singers are there?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select count ( * ) from singer" - }, - { - "index": 1001, - "db_id": "singer", - "question": "What is the count of singers?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select count ( * ) from singer" - }, - { - "index": 1002, - "db_id": "singer", - "question": "List the name of singers in ascending order of net worth.", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select name from singer order by net_worth_millions asc" - }, - { - "index": 1003, - "db_id": "singer", - "question": "What are the names of singers ordered by ascending net worth?", - "db_info": "| singer: net_worth_millions, singer_id, name, birth_year, citizenship | song: singer_id, title, song_id, sales, highest_position |", - "ground_truth": "select name from singer order by net_worth_millions asc" - }, - { - "index": 1004, - "db_id": "singer", - "question": "What are the birth year and citizenship of singers?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select birth_year , citizenship from singer" - }, - { - "index": 1005, - "db_id": "singer", - "question": "What are the birth years and citizenships of the singers?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select birth_year , citizenship from singer" - }, - { - "index": 1006, - "db_id": "singer", - "question": "List the name of singers whose citizenship is not \"France\".", - "db_info": "| singer: citizenship, singer_id, name, birth_year, net_worth_millions | song: singer_id, title, song_id, sales, highest_position |", - "ground_truth": "select name from singer where citizenship != 'France'" - }, - { - "index": 1007, - "db_id": "singer", - "question": "What are the names of the singers who are not French citizens?", - "db_info": "| singer: citizenship, singer_id, name, birth_year, net_worth_millions | song: singer_id, title, song_id, sales, highest_position |", - "ground_truth": "select name from singer where citizenship != 'France'" - }, - { - "index": 1008, - "db_id": "singer", - "question": "Show the name of singers whose birth year is either 1948 or 1949?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select name from singer where birth_year = 1948 or birth_year = 1949" - }, - { - "index": 1009, - "db_id": "singer", - "question": "What are the names of the singers whose birth years are either 1948 or 1949?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select name from singer where birth_year = 1948 or birth_year = 1949" - }, - { - "index": 1010, - "db_id": "singer", - "question": "What is the name of the singer with the largest net worth?", - "db_info": "| singer: name, net_worth_millions, singer_id, birth_year | song: singer_id, title, sales, highest_position, song_id |", - "ground_truth": "select name from singer order by net_worth_millions desc limit 1" - }, - { - "index": 1011, - "db_id": "singer", - "question": "What is the name of the singer who is worth the most?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select name from singer order by net_worth_millions desc limit 1" - }, - { - "index": 1012, - "db_id": "singer", - "question": "Show different citizenship of singers and the number of singers of each citizenship.", - "db_info": "| singer: citizenship, singer_id, name, birth_year, net_worth_millions | song: singer_id, title, sales, highest_position |", - "ground_truth": "select citizenship , count ( * ) from singer group by citizenship" - }, - { - "index": 1013, - "db_id": "singer", - "question": "For each citizenship, how many singers are from that country?", - "db_info": "| singer: citizenship, singer_id, name, birth_year, net_worth_millions | song: singer_id, song_id, title, sales, highest_position |", - "ground_truth": "select citizenship , count ( * ) from singer group by citizenship" - }, - { - "index": 1014, - "db_id": "singer", - "question": "Please show the most common citizenship of singers.", - "db_info": "| singer: citizenship, singer_id, name, birth_year, net_worth_millions | song: singer_id, title, song_id, sales, highest_position |", - "ground_truth": "select citizenship from singer group by citizenship order by count ( * ) desc limit 1" - }, - { - "index": 1015, - "db_id": "singer", - "question": "What is the most common singer citizenship ?", - "db_info": "| singer: citizenship, singer_id, name, birth_year, net_worth_millions | song: singer_id, title, song_id, sales, highest_position |", - "ground_truth": "select citizenship from singer group by citizenship order by count ( * ) desc limit 1" - }, - { - "index": 1016, - "db_id": "singer", - "question": "Show different citizenships and the maximum net worth of singers of each citizenship.", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select citizenship , max ( net_worth_millions ) from singer group by citizenship" - }, - { - "index": 1017, - "db_id": "singer", - "question": "For each citizenship, what is the maximum net worth?", - "db_info": "| singer: citizenship, net_worth_millions, singer_id, name, birth_year | song: singer_id, sales, highest_position, song_id, title | | song.singer_id = singer.singer_id |", - "ground_truth": "select citizenship , max ( net_worth_millions ) from singer group by citizenship" - }, - { - "index": 1018, - "db_id": "singer", - "question": "Show titles of songs and names of singers.", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position | song.singer_id = singer.singer_id |", - "ground_truth": "select song.title , singer.name from singer join song on singer.singer_id = song.singer_id" - }, - { - "index": 1019, - "db_id": "singer", - "question": "What are the song titles and singer names?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select song.title , singer.name from singer join song on singer.singer_id = song.singer_id" - }, - { - "index": 1020, - "db_id": "singer", - "question": "Show distinct names of singers that have songs with sales more than 300000.", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position | song.singer_id = singer.singer_id |", - "ground_truth": "select distinct singer.name from singer join song on singer.singer_id = song.singer_id where song.sales > 300000" - }, - { - "index": 1021, - "db_id": "singer", - "question": "what are the different names of the singers that have sales more than 300000?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select distinct singer.name from singer join song on singer.singer_id = song.singer_id where song.sales > 300000" - }, - { - "index": 1022, - "db_id": "singer", - "question": "Show the names of singers that have more than one song.", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select singer.name from singer join song on singer.singer_id = song.singer_id group by singer.name having count ( * ) > 1" - }, - { - "index": 1023, - "db_id": "singer", - "question": "What are the names of the singers that have more than one songs?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select singer.name from singer join song on singer.singer_id = song.singer_id group by singer.name having count ( * ) > 1" - }, - { - "index": 1024, - "db_id": "singer", - "question": "Show the names of singers and the total sales of their songs.", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select singer.name , sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by singer.name" - }, - { - "index": 1025, - "db_id": "singer", - "question": "For each singer name, what is the total sales for their songs?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select singer.name , sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by singer.name" - }, - { - "index": 1026, - "db_id": "singer", - "question": "List the name of singers that do not have any song.", - "db_info": "| singer: name, singer_id, birth_year, net_worth_millions, citizenship | song: singer_id, title, song_id, sales, highest_position |", - "ground_truth": "select name from singer where singer_id not in ( select singer_id from song )" - }, - { - "index": 1027, - "db_id": "singer", - "question": "What is the sname of every sing that does not have any song?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: singer_id, song_id, title, sales, highest_position |", - "ground_truth": "select name from singer where singer_id not in ( select singer_id from song )" - }, - { - "index": 1028, - "db_id": "singer", - "question": "Show the citizenship shared by singers with birth year before 1945 and after 1955.", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position | song.singer_id = singer.singer_id |", - "ground_truth": "select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955" - }, - { - "index": 1029, - "db_id": "singer", - "question": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955?", - "db_info": "| singer: singer_id, name, birth_year, net_worth_millions, citizenship | song: song_id, title, singer_id, sales, highest_position |", - "ground_truth": "select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955" - }, - { - "index": 1030, - "db_id": "real_estate_properties", - "question": "How many available features are there in total?", - "db_info": "| other_available_features: feature_id, feature_type_code, feature_name, feature_description | properties: property_id, property_type_code, date_on_market, date_sold, property_name, property_address, room_count, vendor_requested_price, buyer_offered_price, agreed_selling_price, apt_feature_1, apt_feature_2, apt_feature_3, fld_feature_1, fld_feature_2, fld_feature_3, hse_feature_1, hse_feature_2, hse_feature_3, oth_feature_1, oth_feature_2, oth_feature_3, shp_feature_1, shp_feature_2, shp_feature_3, other_property_details | ref_feature_types: feature_type_code, feature_type_name | ref_property_types: property_type_code, property_type_description | other_property_features: property_id, feature_id, property_feature_description |", - "ground_truth": "select count ( * ) from other_available_features" - }, - { - "index": 1031, - "db_id": "real_estate_properties", - "question": "What is the feature type name of feature AirCon?", - "db_info": "| other_available_features: feature_name, feature_type_code | ref_feature_types: feature_type_code, feature_type_name | other_property_features: property_id, feature_id, property_feature_description | properties: property_id, property_type_code | ref_property_types: property_type_code, property_type_description |", - "ground_truth": "select ref_feature_types.feature_type_name from other_available_features join ref_feature_types on other_available_features.feature_type_code = ref_feature_types.feature_type_code where other_available_features.feature_name = 'AirCon'" - }, - { - "index": 1032, - "db_id": "real_estate_properties", - "question": "Show the property type descriptions of properties belonging to that code.", - "db_info": "| properties: property_type_code, other_property_features.property_id | other_property_features: other_property_features.feature_id, other_property_features.property_feature_description | other_available_features: feature_type_code | ref_property_types: property_type_description |", - "ground_truth": "select ref_property_types.property_type_description from properties join ref_property_types on properties.property_type_code = ref_property_types.property_type_code group by properties.property_type_code" - }, - { - "index": 1033, - "db_id": "real_estate_properties", - "question": "What are the names of properties that are either houses or apartments with more than 1 room?", - "db_info": "| properties: property_id, property_type_code, property_name, property_address, room_count | ref_property_types: property_type_code, property_type_description | other_available_features: feature_id, feature_type_code, feature_name, feature_description | ref_feature_types: feature_type_code, feature_type_name | other_property_features: property_id, feature_id, property_feature_description |", - "ground_truth": "select property_name from properties where property_type_code = 'House' union select property_name from properties where property_type_code = 'Apartment' and room_count > 1" - } -] \ No newline at end of file