[ { "instance_id": "dev_0", "db_id": "concert_singer", "question": "How many singers do we have?", "db_type": "sqlite", "db_size": 21, "query": "SELECT count(*) FROM singer" }, { "instance_id": "dev_1", "db_id": "concert_singer", "question": "What is the total number of singers?", "db_type": "sqlite", "db_size": 21, "query": "SELECT count(*) FROM singer" }, { "instance_id": "dev_2", "db_id": "concert_singer", "question": "Show name, country, age for all singers ordered by age from the oldest to the youngest.", "db_type": "sqlite", "db_size": 21, "query": "SELECT name , country , age FROM singer ORDER BY age DESC" }, { "instance_id": "dev_3", "db_id": "concert_singer", "question": "What are the names, countries, and ages for every singer in descending order of age?", "db_type": "sqlite", "db_size": 21, "query": "SELECT name , country , age FROM singer ORDER BY age DESC" }, { "instance_id": "dev_4", "db_id": "concert_singer", "question": "What is the average, minimum, and maximum age of all singers from France?", "db_type": "sqlite", "db_size": 21, "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'" }, { "instance_id": "dev_5", "db_id": "concert_singer", "question": "What is the average, minimum, and maximum age for all French singers?", "db_type": "sqlite", "db_size": 21, "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'" }, { "instance_id": "dev_6", "db_id": "concert_singer", "question": "Show the name and the release year of the song by the youngest singer.", "db_type": "sqlite", "db_size": 21, "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1" }, { "instance_id": "dev_7", "db_id": "concert_singer", "question": "What are the names and release years for all the songs of the youngest singer?", "db_type": "sqlite", "db_size": 21, "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1" }, { "instance_id": "dev_8", "db_id": "concert_singer", "question": "What are all distinct countries where singers above age 20 are from?", "db_type": "sqlite", "db_size": 21, "query": "SELECT DISTINCT country FROM singer WHERE age > 20" }, { "instance_id": "dev_9", "db_id": "concert_singer", "question": "What are the different countries with singers above age 20?", "db_type": "sqlite", "db_size": 21, "query": "SELECT DISTINCT country FROM singer WHERE age > 20" }, { "instance_id": "dev_10", "db_id": "concert_singer", "question": "Show all countries and the number of singers in each country.", "db_type": "sqlite", "db_size": 21, "query": "SELECT country , count(*) FROM singer GROUP BY country" }, { "instance_id": "dev_11", "db_id": "concert_singer", "question": "How many singers are from each country?", "db_type": "sqlite", "db_size": 21, "query": "SELECT country , count(*) FROM singer GROUP BY country" }, { "instance_id": "dev_12", "db_id": "concert_singer", "question": "List all song names by singers above the average age.", "db_type": "sqlite", "db_size": 21, "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)" }, { "instance_id": "dev_13", "db_id": "concert_singer", "question": "What are all the song names by singers who are older than average?", "db_type": "sqlite", "db_size": 21, "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)" }, { "instance_id": "dev_14", "db_id": "concert_singer", "question": "Show location and name for all stadiums with a capacity between 5000 and 10000.", "db_type": "sqlite", "db_size": 21, "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000" }, { "instance_id": "dev_15", "db_id": "concert_singer", "question": "What are the locations and names of all stations with capacity between 5000 and 10000?", "db_type": "sqlite", "db_size": 21, "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000" }, { "instance_id": "dev_16", "db_id": "concert_singer", "question": "What is the maximum capacity and the average of all stadiums ?", "db_type": "sqlite", "db_size": 21, "query": "select max(capacity), average from stadium" }, { "instance_id": "dev_17", "db_id": "concert_singer", "question": "What is the average and maximum capacities for all stadiums ?", "db_type": "sqlite", "db_size": 21, "query": "select avg(capacity) , max(capacity) from stadium" }, { "instance_id": "dev_18", "db_id": "concert_singer", "question": "What is the name and capacity for the stadium with highest average attendance?", "db_type": "sqlite", "db_size": 21, "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1" }, { "instance_id": "dev_19", "db_id": "concert_singer", "question": "What is the name and capacity for the stadium with the highest average attendance?", "db_type": "sqlite", "db_size": 21, "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1" }, { "instance_id": "dev_20", "db_id": "concert_singer", "question": "How many concerts are there in year 2014 or 2015?", "db_type": "sqlite", "db_size": 21, "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015" }, { "instance_id": "dev_21", "db_id": "concert_singer", "question": "How many concerts occurred in 2014 or 2015?", "db_type": "sqlite", "db_size": 21, "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015" }, { "instance_id": "dev_22", "db_id": "concert_singer", "question": "Show the stadium name and the number of concerts in each stadium.", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id" }, { "instance_id": "dev_23", "db_id": "concert_singer", "question": "For each stadium, how many concerts play there?", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id" }, { "instance_id": "dev_24", "db_id": "concert_singer", "question": "Show the stadium name and capacity with most number of concerts in year 2014 or after.", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_25", "db_id": "concert_singer", "question": "What is the name and capacity of the stadium with the most concerts after 2013 ?", "db_type": "sqlite", "db_size": 21, "query": "select t2.name , t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id = t2.stadium_id where t1.year > 2013 group by t2.stadium_id order by count(*) desc limit 1" }, { "instance_id": "dev_26", "db_id": "concert_singer", "question": "Which year has most number of concerts?", "db_type": "sqlite", "db_size": 21, "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_27", "db_id": "concert_singer", "question": "What is the year that had the most concerts?", "db_type": "sqlite", "db_size": 21, "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_28", "db_id": "concert_singer", "question": "Show the stadium names without any concert.", "db_type": "sqlite", "db_size": 21, "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)" }, { "instance_id": "dev_29", "db_id": "concert_singer", "question": "What are the names of the stadiums without any concerts?", "db_type": "sqlite", "db_size": 21, "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)" }, { "instance_id": "dev_30", "db_id": "concert_singer", "question": "Show countries where a singer above age 40 and a singer below 30 are from.", "db_type": "sqlite", "db_size": 21, "query": "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30" }, { "instance_id": "dev_31", "db_id": "concert_singer", "question": "Show names for all stadiums except for stadiums having a concert in year 2014.", "db_type": "sqlite", "db_size": 21, "query": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014" }, { "instance_id": "dev_32", "db_id": "concert_singer", "question": "What are the names of all stadiums that did not have a concert in 2014?", "db_type": "sqlite", "db_size": 21, "query": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014" }, { "instance_id": "dev_33", "db_id": "concert_singer", "question": "Show the name and theme for all concerts and the number of singers in each concert.", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id" }, { "instance_id": "dev_34", "db_id": "concert_singer", "question": "What are the names , themes , and number of singers for every concert ?", "db_type": "sqlite", "db_size": 21, "query": "select t2.concert_name , t2.theme , count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id" }, { "instance_id": "dev_35", "db_id": "concert_singer", "question": "List singer names and number of concerts for each singer.", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id" }, { "instance_id": "dev_36", "db_id": "concert_singer", "question": "What are the names of the singers and number of concerts for each person?", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id" }, { "instance_id": "dev_37", "db_id": "concert_singer", "question": "List all singer names in concerts in year 2014.", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014" }, { "instance_id": "dev_38", "db_id": "concert_singer", "question": "What are the names of the singers who performed in a concert in 2014?", "db_type": "sqlite", "db_size": 21, "query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 21, "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 21, "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 21, "query": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 21, "query": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015" }, { "instance_id": "dev_43", "db_id": "concert_singer", "question": "Find the number of concerts happened in the stadium with the highest capacity .", "db_type": "sqlite", "db_size": 21, "query": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)" }, { "instance_id": "dev_44", "db_id": "concert_singer", "question": "What are the number of concerts that occurred in the stadium with the largest capacity ?", "db_type": "sqlite", "db_size": 21, "query": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)" }, { "instance_id": "dev_45", "db_id": "pets_1", "question": "Find the number of pets whose weight is heavier than 10.", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(*) FROM pets WHERE weight > 10" }, { "instance_id": "dev_46", "db_id": "pets_1", "question": "How many pets have a greater weight than 10?", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(*) FROM pets WHERE weight > 10" }, { "instance_id": "dev_47", "db_id": "pets_1", "question": "Find the weight of the youngest dog.", "db_type": "sqlite", "db_size": 14, "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1" }, { "instance_id": "dev_48", "db_id": "pets_1", "question": "How much does the youngest dog weigh?", "db_type": "sqlite", "db_size": 14, "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1" }, { "instance_id": "dev_49", "db_id": "pets_1", "question": "Find the maximum weight for each type of pet. List the maximum weight and pet type.", "db_type": "sqlite", "db_size": 14, "query": "SELECT max(weight) , petType FROM pets GROUP BY petType" }, { "instance_id": "dev_50", "db_id": "pets_1", "question": "List the maximum weight and type for each type of pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT max(weight) , petType FROM pets GROUP BY petType" }, { "instance_id": "dev_51", "db_id": "pets_1", "question": "Find number of pets owned by students who are older than 20.", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20" }, { "instance_id": "dev_52", "db_id": "pets_1", "question": "How many pets are owned by students that have an age greater than 20?", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20" }, { "instance_id": "dev_53", "db_id": "pets_1", "question": "Find the number of dog pets that are raised by female students (with sex F).", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'" }, { "instance_id": "dev_54", "db_id": "pets_1", "question": "How many dog pets are raised by female students?", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'" }, { "instance_id": "dev_55", "db_id": "pets_1", "question": "Find the number of distinct type of pets.", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(DISTINCT pettype) FROM pets" }, { "instance_id": "dev_56", "db_id": "pets_1", "question": "How many different types of pet are there?", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(DISTINCT pettype) FROM pets" }, { "instance_id": "dev_57", "db_id": "pets_1", "question": "Find the first name of students who have cat or dog pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'" }, { "instance_id": "dev_58", "db_id": "pets_1", "question": "What are the first names of every student who has a cat or dog as a pet?", "db_type": "sqlite", "db_size": 14, "query": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'" }, { "instance_id": "dev_59", "db_id": "pets_1", "question": "Find the first name of students who have both cat and dog pets .", "db_type": "sqlite", "db_size": 14, "query": "select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'dog'" }, { "instance_id": "dev_60", "db_id": "pets_1", "question": "What are the students' first names who have both cats and dogs as pets?", "db_type": "sqlite", "db_size": 14, "query": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'" }, { "instance_id": "dev_61", "db_id": "pets_1", "question": "Find the major and age of students who do not have a cat pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 14, "query": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')" }, { "instance_id": "dev_63", "db_id": "pets_1", "question": "Find the id of students who do not have a cat pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'" }, { "instance_id": "dev_64", "db_id": "pets_1", "question": "What are the ids of the students who do not own cats as pets?", "db_type": "sqlite", "db_size": 14, "query": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 14, "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 14, "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')" }, { "instance_id": "dev_67", "db_id": "pets_1", "question": "Find the type and weight of the youngest pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1" }, { "instance_id": "dev_68", "db_id": "pets_1", "question": "What type of pet is the youngest animal, and how much does it weigh?", "db_type": "sqlite", "db_size": 14, "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1" }, { "instance_id": "dev_69", "db_id": "pets_1", "question": "Find the id and weight of all pets whose age is older than 1.", "db_type": "sqlite", "db_size": 14, "query": "SELECT petid , weight FROM pets WHERE pet_age > 1" }, { "instance_id": "dev_70", "db_id": "pets_1", "question": "What is the id and weight of every pet who is older than 1?", "db_type": "sqlite", "db_size": 14, "query": "SELECT petid , weight FROM pets WHERE pet_age > 1" }, { "instance_id": "dev_71", "db_id": "pets_1", "question": "Find the average and maximum age for each type of pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype" }, { "instance_id": "dev_72", "db_id": "pets_1", "question": "What is the average and maximum age for each pet type?", "db_type": "sqlite", "db_size": 14, "query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype" }, { "instance_id": "dev_73", "db_id": "pets_1", "question": "Find the average weight for each pet type.", "db_type": "sqlite", "db_size": 14, "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype" }, { "instance_id": "dev_74", "db_id": "pets_1", "question": "What is the average weight for each type of pet?", "db_type": "sqlite", "db_size": 14, "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype" }, { "instance_id": "dev_75", "db_id": "pets_1", "question": "Find the first name and age of students who have a pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid" }, { "instance_id": "dev_76", "db_id": "pets_1", "question": "What are the different first names and ages of the students who do have pets?", "db_type": "sqlite", "db_size": 14, "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid" }, { "instance_id": "dev_77", "db_id": "pets_1", "question": "Find the id of the pet owned by student whose last name is ‘Smith’.", "db_type": "sqlite", "db_size": 14, "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'" }, { "instance_id": "dev_78", "db_id": "pets_1", "question": "What is the id of the pet owned by the student whose last name is 'Smith'?", "db_type": "sqlite", "db_size": 14, "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'" }, { "instance_id": "dev_79", "db_id": "pets_1", "question": "Find the number of pets for each student who has any pet and student id.", "db_type": "sqlite", "db_size": 14, "query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 14, "query": "select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid" }, { "instance_id": "dev_81", "db_id": "pets_1", "question": "Find the first name and gender of student who have more than one pet.", "db_type": "sqlite", "db_size": 14, "query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 14, "query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1" }, { "instance_id": "dev_83", "db_id": "pets_1", "question": "Find the last name of the student who has a cat that is age 3.", "db_type": "sqlite", "db_size": 14, "query": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'" }, { "instance_id": "dev_84", "db_id": "pets_1", "question": "What is the last name of the student who has a cat that is 3 years old?", "db_type": "sqlite", "db_size": 14, "query": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'" }, { "instance_id": "dev_85", "db_id": "pets_1", "question": "Find the average age of students who do not have any pet .", "db_type": "sqlite", "db_size": 14, "query": "select avg(age) from student where stuid not in (select stuid from has_pet)" }, { "instance_id": "dev_86", "db_id": "pets_1", "question": "What is the average age for all students who do not own any pets ?", "db_type": "sqlite", "db_size": 14, "query": "select avg(age) from student where stuid not in (select stuid from has_pet)" }, { "instance_id": "dev_87", "db_id": "car_1", "question": "How many continents are there?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CONTINENTS;" }, { "instance_id": "dev_88", "db_id": "car_1", "question": "What is the number of continents?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CONTINENTS;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;" }, { "instance_id": "dev_90", "db_id": "car_1", "question": "For each continent, list its id, name, and how many countries it has?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;" }, { "instance_id": "dev_91", "db_id": "car_1", "question": "How many countries are listed?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM COUNTRIES;" }, { "instance_id": "dev_92", "db_id": "car_1", "question": "How many countries exist?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM COUNTRIES;" }, { "instance_id": "dev_93", "db_id": "car_1", "question": "How many models does each car maker produce? List maker full name, id and the number.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;" }, { "instance_id": "dev_95", "db_id": "car_1", "question": "Which model of the car has the minimum horsepower?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;" }, { "instance_id": "dev_96", "db_id": "car_1", "question": "What is the model of the car with the smallest amount of horsepower?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;" }, { "instance_id": "dev_97", "db_id": "car_1", "question": "Find the model of the car whose weight is below the average weight.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)" }, { "instance_id": "dev_98", "db_id": "car_1", "question": "What is the model for the car with a weight smaller than the average?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)" }, { "instance_id": "dev_99", "db_id": "car_1", "question": "Find the name of the makers that produced some cars in the year of 1970?", "db_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';" }, { "instance_id": "dev_100", "db_id": "car_1", "question": "What is the name of the different car makers who produced a car in 1970?", "db_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';" }, { "instance_id": "dev_101", "db_id": "car_1", "question": "Find the make and production time of the cars that were produced in the earliest year?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);" }, { "instance_id": "dev_102", "db_id": "car_1", "question": "What is the maker of the carr produced in the earliest year and what year was it?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);" }, { "instance_id": "dev_103", "db_id": "car_1", "question": "Which distinct car models are the produced after 1980?", "db_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;" }, { "instance_id": "dev_104", "db_id": "car_1", "question": "What are the different models for the cards produced after 1980?", "db_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;" }, { "instance_id": "dev_105", "db_id": "car_1", "question": "How many car makers are there in each continents? List the continent name and the count.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;" }, { "instance_id": "dev_106", "db_id": "car_1", "question": "What is the name of each continent and how many car makers are there in each one?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;" }, { "instance_id": "dev_107", "db_id": "car_1", "question": "Which of the countries has the most car makers? List the country name.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;" }, { "instance_id": "dev_108", "db_id": "car_1", "question": "What is the name of the country with the most car makers?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "select count(*) , t2.fullname from model_list as t1 join car_makers as t2 on t1.maker = t2.id group by t2.id;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;" }, { "instance_id": "dev_111", "db_id": "car_1", "question": "What is the accelerate of the car make amc hornet sportabout (sw)?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';" }, { "instance_id": "dev_112", "db_id": "car_1", "question": "How much does the car accelerate that makes amc hornet sportabout (sw)?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';" }, { "instance_id": "dev_113", "db_id": "car_1", "question": "How many car makers are there in france?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';" }, { "instance_id": "dev_114", "db_id": "car_1", "question": "What is the number of makers of care in France?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';" }, { "instance_id": "dev_115", "db_id": "car_1", "question": "How many car models are produced in the usa?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';" }, { "instance_id": "dev_116", "db_id": "car_1", "question": "What is the count of the car models produced in the United States?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';" }, { "instance_id": "dev_117", "db_id": "car_1", "question": "What is the average miles per gallon(mpg) of the cars with 4 cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;" }, { "instance_id": "dev_118", "db_id": "car_1", "question": "What is the average miles per gallon of all the cards with 4 cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;" }, { "instance_id": "dev_119", "db_id": "car_1", "question": "What is the smallest weight of the car produced with 8 cylinders on 1974 ?", "db_type": "sqlite", "db_size": 23, "query": "select min(weight) from cars_data where cylinders = 8 and year = 1974" }, { "instance_id": "dev_120", "db_id": "car_1", "question": "What is the minimum weight of the car with 8 cylinders produced in 1974 ?", "db_type": "sqlite", "db_size": 23, "query": "select min(weight) from cars_data where cylinders = 8 and year = 1974" }, { "instance_id": "dev_121", "db_id": "car_1", "question": "What are all the makers and models?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Maker , Model FROM MODEL_LIST;" }, { "instance_id": "dev_122", "db_id": "car_1", "question": "What are the makers and models?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Maker , Model FROM MODEL_LIST;" }, { "instance_id": "dev_123", "db_id": "car_1", "question": "What are the countries having at least one car maker? List name and id.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;" }, { "instance_id": "dev_124", "db_id": "car_1", "question": "What are the names and ids of all countries with at least one car maker?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;" }, { "instance_id": "dev_125", "db_id": "car_1", "question": "What is the number of the cars with horsepower more than 150?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;" }, { "instance_id": "dev_126", "db_id": "car_1", "question": "What is the number of cars with a horsepower greater than 150?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;" }, { "instance_id": "dev_127", "db_id": "car_1", "question": "What is the average weight of cars each year?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;" }, { "instance_id": "dev_128", "db_id": "car_1", "question": "What is the average weight and year for each year?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;" }, { "instance_id": "dev_129", "db_id": "car_1", "question": "Which countries in europe have at least 3 car manufacturers?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;" }, { "instance_id": "dev_130", "db_id": "car_1", "question": "What are the names of all European countries with at least 3 manufacturers?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;" }, { "instance_id": "dev_131", "db_id": "car_1", "question": "What is the maximum horsepower and the make of the car models with 3 cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;" }, { "instance_id": "dev_133", "db_id": "car_1", "question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;" }, { "instance_id": "dev_134", "db_id": "car_1", "question": "What is the car model with the highest mpg ?", "db_type": "sqlite", "db_size": 23, "query": "select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.mpg desc limit 1;" }, { "instance_id": "dev_135", "db_id": "car_1", "question": "What is the average horsepower of the cars before 1980?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980;" }, { "instance_id": "dev_136", "db_id": "car_1", "question": "What is the average horsepower for all cars produced before 1980 ?", "db_type": "sqlite", "db_size": 23, "query": "select avg(horsepower) from cars_data where year < 1980;" }, { "instance_id": "dev_137", "db_id": "car_1", "question": "What is the average edispl of the cars of model volvo?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';" }, { "instance_id": "dev_138", "db_id": "car_1", "question": "What is the average edispl for all volvos?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';" }, { "instance_id": "dev_139", "db_id": "car_1", "question": "What is the maximum accelerate for different number of cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;" }, { "instance_id": "dev_140", "db_id": "car_1", "question": "What is the maximum accelerate for all the different cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;" }, { "instance_id": "dev_141", "db_id": "car_1", "question": "Which model has the most version(make) of cars?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;" }, { "instance_id": "dev_142", "db_id": "car_1", "question": "What model has the most different versions?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;" }, { "instance_id": "dev_143", "db_id": "car_1", "question": "How many cars have more than 4 cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;" }, { "instance_id": "dev_144", "db_id": "car_1", "question": "What is the number of cars with more than 4 cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;" }, { "instance_id": "dev_145", "db_id": "car_1", "question": "how many cars were produced in 1980?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;" }, { "instance_id": "dev_146", "db_id": "car_1", "question": "In 1980, how many cars were made?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;" }, { "instance_id": "dev_147", "db_id": "car_1", "question": "How many car models were produced by the maker with full name American Motor Company?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';" }, { "instance_id": "dev_148", "db_id": "car_1", "question": "What is the number of car models created by the car maker American Motor Company?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';" }, { "instance_id": "dev_149", "db_id": "car_1", "question": "Which makers designed more than 3 car models? List full name and the id.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;" }, { "instance_id": "dev_150", "db_id": "car_1", "question": "What are the names and ids of all makers with more than 3 models?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;" }, { "instance_id": "dev_153", "db_id": "car_1", "question": "In which years cars were produced weighing no less than 3000 and no more than 4000 ?", "db_type": "sqlite", "db_size": 23, "query": "select distinct year from cars_data where weight between 3000 and 4000;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "select distinct year from cars_data where weight between 3000 and 4000;" }, { "instance_id": "dev_155", "db_id": "car_1", "question": "What is the horsepower of the car with the largest accelerate?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;" }, { "instance_id": "dev_156", "db_id": "car_1", "question": "What is the horsepower of the car with the greatest accelerate?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;" }, { "instance_id": "dev_157", "db_id": "car_1", "question": "For model volvo, how many cylinders does the car with the least accelerate have?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;" }, { "instance_id": "dev_158", "db_id": "car_1", "question": "For a volvo model, how many cylinders does the version with least accelerate have?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;" }, { "instance_id": "dev_159", "db_id": "car_1", "question": "How many cars have a larger accelerate than the car with the largest horsepower?", "db_type": "sqlite", "db_size": 23, "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );" }, { "instance_id": "dev_160", "db_id": "car_1", "question": "What is the number of cars with a greater accelerate than the one with the most horsepower?", "db_type": "sqlite", "db_size": 23, "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );" }, { "instance_id": "dev_161", "db_id": "car_1", "question": "How many countries has more than 2 car makers ?", "db_type": "sqlite", "db_size": 23, "query": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2" }, { "instance_id": "dev_162", "db_id": "car_1", "question": "What is the number of countries with more than 2 car makers ?", "db_type": "sqlite", "db_size": 23, "query": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2" }, { "instance_id": "dev_163", "db_id": "car_1", "question": "How many cars has over 6 cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;" }, { "instance_id": "dev_164", "db_id": "car_1", "question": "What is the number of carsw ith over 6 cylinders?", "db_type": "sqlite", "db_size": 23, "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;" }, { "instance_id": "dev_165", "db_id": "car_1", "question": "For the cars with 4 cylinders, which model has the largest horsepower?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;" }, { "instance_id": "dev_166", "db_id": "car_1", "question": "For all of the 4 cylinder cars, which model has the most horsepower?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT T2.MakeId , T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT min(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "select t2.makeid , t2.make from cars_data as t1 join car_names as t2 on t1.id = t2.makeid where t1.horsepower > (select min(horsepower) from cars_data) and t1.cylinders < 4;" }, { "instance_id": "dev_169", "db_id": "car_1", "question": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?", "db_type": "sqlite", "db_size": 23, "query": "select max(mpg) from cars_data where cylinders = 8 or year < 1980" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "select max(mpg) from cars_data where cylinders = 8 or year < 1980" }, { "instance_id": "dev_171", "db_id": "car_1", "question": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?", "db_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';" }, { "instance_id": "dev_173", "db_id": "car_1", "question": "What are the name of the countries where there is not a single car maker?", "db_type": "sqlite", "db_size": 23, "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;" }, { "instance_id": "dev_174", "db_id": "car_1", "question": "What are the names of the countries with no car makers?", "db_type": "sqlite", "db_size": 23, "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker group by t1.id having count(*) >= 2 intersect select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker join car_names as t3 on t2.model = t3.model group by t1.id having count(*) > 3;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3;" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat';" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 3 union select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country join model_list as t3 on t2.id = t3.maker where t3.model = 'fiat';" }, { "instance_id": "dev_179", "db_id": "flight_2", "question": "Which country does Airline \"JetBlue Airways\" belong to?", "db_type": "sqlite", "db_size": 13, "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"" }, { "instance_id": "dev_180", "db_id": "flight_2", "question": "What country is Jetblue Airways affiliated with?", "db_type": "sqlite", "db_size": 13, "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"" }, { "instance_id": "dev_181", "db_id": "flight_2", "question": "What is the abbreviation of Airline \"JetBlue Airways\"?", "db_type": "sqlite", "db_size": 13, "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"" }, { "instance_id": "dev_182", "db_id": "flight_2", "question": "Which abbreviation corresponds to Jetblue Airways?", "db_type": "sqlite", "db_size": 13, "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"" }, { "instance_id": "dev_183", "db_id": "flight_2", "question": "List all airline names and their abbreviations in \"USA\".", "db_type": "sqlite", "db_size": 13, "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"" }, { "instance_id": "dev_184", "db_id": "flight_2", "question": "What are the airline names and abbreviations for airlines in the USA?", "db_type": "sqlite", "db_size": 13, "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"" }, { "instance_id": "dev_185", "db_id": "flight_2", "question": "List the airport code and name in the city of Anthony.", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"" }, { "instance_id": "dev_186", "db_id": "flight_2", "question": "Give the airport code and airport name corresonding to the city Anthony.", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"" }, { "instance_id": "dev_187", "db_id": "flight_2", "question": "How many airlines do we have?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES" }, { "instance_id": "dev_188", "db_id": "flight_2", "question": "What is the total number of airlines?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES" }, { "instance_id": "dev_189", "db_id": "flight_2", "question": "How many airports do we have?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRPORTS" }, { "instance_id": "dev_190", "db_id": "flight_2", "question": "Return the number of airports.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRPORTS" }, { "instance_id": "dev_191", "db_id": "flight_2", "question": "How many flights do we have?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS" }, { "instance_id": "dev_192", "db_id": "flight_2", "question": "Return the number of flights.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS" }, { "instance_id": "dev_193", "db_id": "flight_2", "question": "Which airline has abbreviation 'UAL'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"" }, { "instance_id": "dev_194", "db_id": "flight_2", "question": "Give the airline with abbreviation 'UAL'.", "db_type": "sqlite", "db_size": 13, "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"" }, { "instance_id": "dev_195", "db_id": "flight_2", "question": "How many airlines are from USA?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"" }, { "instance_id": "dev_196", "db_id": "flight_2", "question": "Return the number of airlines in the USA.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"" }, { "instance_id": "dev_197", "db_id": "flight_2", "question": "Which city and country is the Alton airport at?", "db_type": "sqlite", "db_size": 13, "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"" }, { "instance_id": "dev_198", "db_id": "flight_2", "question": "Give the city and country for the Alton airport.", "db_type": "sqlite", "db_size": 13, "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"" }, { "instance_id": "dev_199", "db_id": "flight_2", "question": "What is the airport name for airport 'AKO'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"" }, { "instance_id": "dev_200", "db_id": "flight_2", "question": "Return the name of the airport with code 'AKO'.", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"" }, { "instance_id": "dev_201", "db_id": "flight_2", "question": "What are airport names at City 'Aberdeen'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"" }, { "instance_id": "dev_202", "db_id": "flight_2", "question": "What are the names of airports in Aberdeen?", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"" }, { "instance_id": "dev_203", "db_id": "flight_2", "question": "How many flights depart from 'APG'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"" }, { "instance_id": "dev_204", "db_id": "flight_2", "question": "Count the number of flights departing from 'APG'.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"" }, { "instance_id": "dev_205", "db_id": "flight_2", "question": "How many flights have destination ATO?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"" }, { "instance_id": "dev_206", "db_id": "flight_2", "question": "Count the number of flights into ATO.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"" }, { "instance_id": "dev_207", "db_id": "flight_2", "question": "How many flights depart from City Aberdeen?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_208", "db_id": "flight_2", "question": "Return the number of flights departing from Aberdeen.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_209", "db_id": "flight_2", "question": "How many flights arriving in Aberdeen city?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_210", "db_id": "flight_2", "question": "Return the number of flights arriving in Aberdeen.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_211", "db_id": "flight_2", "question": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"" }, { "instance_id": "dev_212", "db_id": "flight_2", "question": "How many flights fly from Aberdeen to Ashley?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"" }, { "instance_id": "dev_213", "db_id": "flight_2", "question": "How many flights does airline 'JetBlue Airways' have?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"" }, { "instance_id": "dev_214", "db_id": "flight_2", "question": "Give the number of Jetblue Airways flights.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"" }, { "instance_id": "dev_215", "db_id": "flight_2", "question": "How many 'United Airlines' flights go to Airport 'ASY'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"" }, { "instance_id": "dev_216", "db_id": "flight_2", "question": "Count the number of United Airlines flights arriving in ASY Airport.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"" }, { "instance_id": "dev_217", "db_id": "flight_2", "question": "How many 'United Airlines' flights depart from Airport 'AHD'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"" }, { "instance_id": "dev_218", "db_id": "flight_2", "question": "Return the number of United Airlines flights leaving from AHD Airport.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"" }, { "instance_id": "dev_219", "db_id": "flight_2", "question": "How many United Airlines flights go to City 'Aberdeen'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"" }, { "instance_id": "dev_220", "db_id": "flight_2", "question": "Count the number of United Airlines flights that arrive in Aberdeen.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"" }, { "instance_id": "dev_221", "db_id": "flight_2", "question": "Which city has most number of arriving flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_222", "db_id": "flight_2", "question": "Which city has the most frequent destination airport?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_223", "db_id": "flight_2", "question": "Which city has most number of departing flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_224", "db_id": "flight_2", "question": "Which city is the most frequent source airport?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_225", "db_id": "flight_2", "question": "What is the code of airport that has the highest number of flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_226", "db_id": "flight_2", "question": "What is the airport code of the airport with the most flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_227", "db_id": "flight_2", "question": "What is the code of airport that has fewest number of flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1" }, { "instance_id": "dev_228", "db_id": "flight_2", "question": "Give the code of the airport with the least flights.", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1" }, { "instance_id": "dev_229", "db_id": "flight_2", "question": "Which airline has most number of flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_230", "db_id": "flight_2", "question": "What airline serves the most flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_231", "db_id": "flight_2", "question": "Find the abbreviation and country of the airline that has fewest number of flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1" }, { "instance_id": "dev_232", "db_id": "flight_2", "question": "What is the abbreviation of the airilne has the fewest flights and what country is it in?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1" }, { "instance_id": "dev_233", "db_id": "flight_2", "question": "What are airlines that have some flight departing from airport 'AHD'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"" }, { "instance_id": "dev_234", "db_id": "flight_2", "question": "Which airlines have a flight with source airport AHD?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"" }, { "instance_id": "dev_235", "db_id": "flight_2", "question": "What are airlines that have flights arriving at airport 'AHD'?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"" }, { "instance_id": "dev_236", "db_id": "flight_2", "question": "Which airlines have a flight with destination airport AHD?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"" }, { "instance_id": "dev_237", "db_id": "flight_2", "question": "Find all airlines that have flights from both airports 'APG' and 'CVO'.", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"" }, { "instance_id": "dev_238", "db_id": "flight_2", "question": "Which airlines have departing flights from both APG and CVO airports?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"" }, { "instance_id": "dev_239", "db_id": "flight_2", "question": "Find all airlines that have flights from airport 'CVO' but not from 'APG'.", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"" }, { "instance_id": "dev_240", "db_id": "flight_2", "question": "Which airlines have departures from CVO but not from APG airports?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"" }, { "instance_id": "dev_241", "db_id": "flight_2", "question": "Find all airlines that have at least 10 flights.", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10" }, { "instance_id": "dev_242", "db_id": "flight_2", "question": "Which airlines have at least 10 flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10" }, { "instance_id": "dev_243", "db_id": "flight_2", "question": "Find all airlines that have fewer than 200 flights.", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200" }, { "instance_id": "dev_244", "db_id": "flight_2", "question": "Which airlines have less than 200 flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200" }, { "instance_id": "dev_245", "db_id": "flight_2", "question": "What are flight numbers of Airline \"United Airlines\"?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"" }, { "instance_id": "dev_246", "db_id": "flight_2", "question": "Which flight numbers correspond to United Airlines flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"" }, { "instance_id": "dev_247", "db_id": "flight_2", "question": "What are flight numbers of flights departing from Airport \"APG\"?", "db_type": "sqlite", "db_size": 13, "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"" }, { "instance_id": "dev_248", "db_id": "flight_2", "question": "Give the flight numbers of flights leaving from APG.", "db_type": "sqlite", "db_size": 13, "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"" }, { "instance_id": "dev_249", "db_id": "flight_2", "question": "What are flight numbers of flights arriving at Airport \"APG\"?", "db_type": "sqlite", "db_size": 13, "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"" }, { "instance_id": "dev_250", "db_id": "flight_2", "question": "Give the flight numbers of flights landing at APG.", "db_type": "sqlite", "db_size": 13, "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"" }, { "instance_id": "dev_251", "db_id": "flight_2", "question": "What are flight numbers of flights departing from City \"Aberdeen \"?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_252", "db_id": "flight_2", "question": "Give the flight numbers of flights leaving from Aberdeen.", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_253", "db_id": "flight_2", "question": "What are flight numbers of flights arriving at City \"Aberdeen\"?", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_254", "db_id": "flight_2", "question": "Give the flight numbers of flights arriving in Aberdeen.", "db_type": "sqlite", "db_size": 13, "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" }, { "instance_id": "dev_255", "db_id": "flight_2", "question": "Find the number of flights landing in the city of Aberdeen or Abilene.", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"" }, { "instance_id": "dev_256", "db_id": "flight_2", "question": "How many flights land in Aberdeen or Abilene?", "db_type": "sqlite", "db_size": 13, "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"" }, { "instance_id": "dev_257", "db_id": "flight_2", "question": "Find the name of airports which do not have any flight in and out.", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)" }, { "instance_id": "dev_258", "db_id": "flight_2", "question": "Which airports do not have departing or arriving flights?", "db_type": "sqlite", "db_size": 13, "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)" }, { "instance_id": "dev_259", "db_id": "employee_hire_evaluation", "question": "How many employees are there?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM employee" }, { "instance_id": "dev_260", "db_id": "employee_hire_evaluation", "question": "Count the number of employees", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM employee" }, { "instance_id": "dev_261", "db_id": "employee_hire_evaluation", "question": "Sort employee names by their age in ascending order.", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM employee ORDER BY age" }, { "instance_id": "dev_262", "db_id": "employee_hire_evaluation", "question": "List the names of employees and sort in ascending order of age.", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM employee ORDER BY age" }, { "instance_id": "dev_263", "db_id": "employee_hire_evaluation", "question": "What is the number of employees from each city?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) , city FROM employee GROUP BY city" }, { "instance_id": "dev_264", "db_id": "employee_hire_evaluation", "question": "Count the number of employees for each city.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) , city FROM employee GROUP BY city" }, { "instance_id": "dev_265", "db_id": "employee_hire_evaluation", "question": "Which cities do more than one employee under age 30 come from?", "db_type": "sqlite", "db_size": 17, "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1" }, { "instance_id": "dev_266", "db_id": "employee_hire_evaluation", "question": "Find the cities that have more than one employee under age 30.", "db_type": "sqlite", "db_size": 17, "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1" }, { "instance_id": "dev_267", "db_id": "employee_hire_evaluation", "question": "Find the number of shops in each location.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION" }, { "instance_id": "dev_268", "db_id": "employee_hire_evaluation", "question": "How many shops are there in each location?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION" }, { "instance_id": "dev_269", "db_id": "employee_hire_evaluation", "question": "Find the manager name and district of the shop whose number of products is the largest.", "db_type": "sqlite", "db_size": 17, "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1" }, { "instance_id": "dev_271", "db_id": "employee_hire_evaluation", "question": "find the minimum and maximum number of products of all stores.", "db_type": "sqlite", "db_size": 17, "query": "SELECT min(Number_products) , max(Number_products) FROM shop" }, { "instance_id": "dev_272", "db_id": "employee_hire_evaluation", "question": "What are the minimum and maximum number of products across all the shops?", "db_type": "sqlite", "db_size": 17, "query": "SELECT min(Number_products) , max(Number_products) FROM shop" }, { "instance_id": "dev_273", "db_id": "employee_hire_evaluation", "question": "Return the name, location and district of all shops in descending order of number of products.", "db_type": "sqlite", "db_size": 17, "query": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC" }, { "instance_id": "dev_275", "db_id": "employee_hire_evaluation", "question": "Find the names of stores whose number products is more than the average number of products.", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)" }, { "instance_id": "dev_276", "db_id": "employee_hire_evaluation", "question": "Which shops' number products is above the average? Give me the shop names.", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)" }, { "instance_id": "dev_277", "db_id": "employee_hire_evaluation", "question": "find the name of employee who was awarded the most times in the evaluation.", "db_type": "sqlite", "db_size": 17, "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_278", "db_id": "employee_hire_evaluation", "question": "Which employee received the most awards in evaluations? Give me the employee name.", "db_type": "sqlite", "db_size": 17, "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_279", "db_id": "employee_hire_evaluation", "question": "Find the name of the employee who got the highest one time bonus.", "db_type": "sqlite", "db_size": 17, "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1" }, { "instance_id": "dev_280", "db_id": "employee_hire_evaluation", "question": "Which employee received the biggest bonus? Give me the employee name.", "db_type": "sqlite", "db_size": 17, "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1" }, { "instance_id": "dev_281", "db_id": "employee_hire_evaluation", "question": "Find the names of employees who never won any award in the evaluation.", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)" }, { "instance_id": "dev_282", "db_id": "employee_hire_evaluation", "question": "What are the names of the employees who never received any evaluation?", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)" }, { "instance_id": "dev_283", "db_id": "employee_hire_evaluation", "question": "What is the name of the shop that is hiring the largest number of employees?", "db_type": "sqlite", "db_size": 17, "query": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_284", "db_id": "employee_hire_evaluation", "question": "Which shop has the most employees? Give me the shop name.", "db_type": "sqlite", "db_size": 17, "query": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_285", "db_id": "employee_hire_evaluation", "question": "Find the name of the shops that do not hire any employee.", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)" }, { "instance_id": "dev_286", "db_id": "employee_hire_evaluation", "question": "Which shops run with no employees? Find the shop names", "db_type": "sqlite", "db_size": 17, "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)" }, { "instance_id": "dev_287", "db_id": "employee_hire_evaluation", "question": "Find the number of employees hired in each shop; show the shop name as well.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name" }, { "instance_id": "dev_288", "db_id": "employee_hire_evaluation", "question": "For each shop, return the number of employees working there and the name of the shop.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name" }, { "instance_id": "dev_289", "db_id": "employee_hire_evaluation", "question": "What is total bonus given in all evaluations?", "db_type": "sqlite", "db_size": 17, "query": "SELECT sum(bonus) FROM evaluation" }, { "instance_id": "dev_290", "db_id": "employee_hire_evaluation", "question": "Find the total amount of bonus given in all the evaluations.", "db_type": "sqlite", "db_size": 17, "query": "SELECT sum(bonus) FROM evaluation" }, { "instance_id": "dev_291", "db_id": "employee_hire_evaluation", "question": "Give me all the information about hiring.", "db_type": "sqlite", "db_size": 17, "query": "SELECT * FROM hiring" }, { "instance_id": "dev_292", "db_id": "employee_hire_evaluation", "question": "What is all the information about hiring?", "db_type": "sqlite", "db_size": 17, "query": "SELECT * FROM hiring" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000" }, { "instance_id": "dev_295", "db_id": "employee_hire_evaluation", "question": "How many different store locations are there?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(DISTINCT LOCATION) FROM shop" }, { "instance_id": "dev_296", "db_id": "employee_hire_evaluation", "question": "Count the number of distinct store locations.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(DISTINCT LOCATION) FROM shop" }, { "instance_id": "dev_297", "db_id": "cre_Doc_Template_Mgt", "question": "How many documents do we have?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Documents" }, { "instance_id": "dev_298", "db_id": "cre_Doc_Template_Mgt", "question": "Count the number of documents.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Documents" }, { "instance_id": "dev_299", "db_id": "cre_Doc_Template_Mgt", "question": "List document IDs, document names, and document descriptions for all documents.", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id , document_name , document_description FROM Documents" }, { "instance_id": "dev_300", "db_id": "cre_Doc_Template_Mgt", "question": "What are the ids, names, and descriptions for all documents?", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id , document_name , document_description FROM Documents" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"" }, { "instance_id": "dev_303", "db_id": "cre_Doc_Template_Mgt", "question": "What is the document id, template id and description for document named \"Robbin CV\"?", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"" }, { "instance_id": "dev_305", "db_id": "cre_Doc_Template_Mgt", "question": "How many different templates do all document use?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(DISTINCT template_id) FROM Documents" }, { "instance_id": "dev_306", "db_id": "cre_Doc_Template_Mgt", "question": "Count the number of different templates used for documents.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(DISTINCT template_id) FROM Documents" }, { "instance_id": "dev_307", "db_id": "cre_Doc_Template_Mgt", "question": "How many documents are using the template with type code 'PPT'?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'" }, { "instance_id": "dev_308", "db_id": "cre_Doc_Template_Mgt", "question": "Count the number of documents that use the PPT template type.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'" }, { "instance_id": "dev_309", "db_id": "cre_Doc_Template_Mgt", "question": "Show all template ids and number of documents using each template.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id" }, { "instance_id": "dev_311", "db_id": "cre_Doc_Template_Mgt", "question": "What is the id and type code for the template used by the most documents?", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_313", "db_id": "cre_Doc_Template_Mgt", "question": "Show ids for all templates that are used by more than one document.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1" }, { "instance_id": "dev_314", "db_id": "cre_Doc_Template_Mgt", "question": "What are the template ids of any templates used in more than a single document?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1" }, { "instance_id": "dev_315", "db_id": "cre_Doc_Template_Mgt", "question": "Show ids for all templates not used by any document.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents" }, { "instance_id": "dev_316", "db_id": "cre_Doc_Template_Mgt", "question": "What are the ids for templates that are not used in any documents?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents" }, { "instance_id": "dev_317", "db_id": "cre_Doc_Template_Mgt", "question": "How many templates do we have?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Templates" }, { "instance_id": "dev_318", "db_id": "cre_Doc_Template_Mgt", "question": "Count the number of templates.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Templates" }, { "instance_id": "dev_319", "db_id": "cre_Doc_Template_Mgt", "question": "Show template ids, version numbers, and template type codes for all templates.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id , version_number , template_type_code FROM Templates" }, { "instance_id": "dev_320", "db_id": "cre_Doc_Template_Mgt", "question": "What are the ids, version numbers, and type codes for each template?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id , version_number , template_type_code FROM Templates" }, { "instance_id": "dev_321", "db_id": "cre_Doc_Template_Mgt", "question": "Show all distinct template type codes for all templates.", "db_type": "sqlite", "db_size": 17, "query": "SELECT DISTINCT template_type_code FROM Templates" }, { "instance_id": "dev_322", "db_id": "cre_Doc_Template_Mgt", "question": "What are the different template type codes?", "db_type": "sqlite", "db_size": 17, "query": "SELECT DISTINCT template_type_code FROM Templates" }, { "instance_id": "dev_323", "db_id": "cre_Doc_Template_Mgt", "question": "What are the ids of templates with template type code PP or PPT?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"" }, { "instance_id": "dev_324", "db_id": "cre_Doc_Template_Mgt", "question": "Return the ids of templates that have the code PP or PPT.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"" }, { "instance_id": "dev_325", "db_id": "cre_Doc_Template_Mgt", "question": "How many templates have template type code CV?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"" }, { "instance_id": "dev_326", "db_id": "cre_Doc_Template_Mgt", "question": "Count the number of templates of the type CV.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5" }, { "instance_id": "dev_329", "db_id": "cre_Doc_Template_Mgt", "question": "Show all template type codes and number of templates for each.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code" }, { "instance_id": "dev_330", "db_id": "cre_Doc_Template_Mgt", "question": "What are the different template type codes, and how many templates correspond to each?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code" }, { "instance_id": "dev_331", "db_id": "cre_Doc_Template_Mgt", "question": "Which template type code has most number of templates?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_332", "db_id": "cre_Doc_Template_Mgt", "question": "Return the type code of the template type that the most templates belong to.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_333", "db_id": "cre_Doc_Template_Mgt", "question": "Show all template type codes with less than three templates.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3" }, { "instance_id": "dev_334", "db_id": "cre_Doc_Template_Mgt", "question": "What are the codes of template types that have fewer than 3 templates?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3" }, { "instance_id": "dev_335", "db_id": "cre_Doc_Template_Mgt", "question": "What the smallest version number and its template type code?", "db_type": "sqlite", "db_size": 17, "query": "SELECT min(Version_Number) , template_type_code FROM Templates" }, { "instance_id": "dev_336", "db_id": "cre_Doc_Template_Mgt", "question": "Return the lowest version number, along with its corresponding template type code.", "db_type": "sqlite", "db_size": 17, "query": "SELECT min(Version_Number) , template_type_code FROM Templates" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"" }, { "instance_id": "dev_339", "db_id": "cre_Doc_Template_Mgt", "question": "Show all document names using templates with template type code BK.", "db_type": "sqlite", "db_size": 17, "query": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"" }, { "instance_id": "dev_340", "db_id": "cre_Doc_Template_Mgt", "question": "What are the names of documents that use templates with the code BK?", "db_type": "sqlite", "db_size": 17, "query": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"" }, { "instance_id": "dev_341", "db_id": "cre_Doc_Template_Mgt", "question": "Show all template type codes and the number of documents using each type.", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code" }, { "instance_id": "dev_342", "db_id": "cre_Doc_Template_Mgt", "question": "What are the different template type codes, and how many documents use each type?", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code" }, { "instance_id": "dev_343", "db_id": "cre_Doc_Template_Mgt", "question": "Which template type code is used by most number of documents?", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_344", "db_id": "cre_Doc_Template_Mgt", "question": "Return the code of the template type that is most commonly used in documents.", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_345", "db_id": "cre_Doc_Template_Mgt", "question": "Show all template type codes that are not used by any document.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id" }, { "instance_id": "dev_346", "db_id": "cre_Doc_Template_Mgt", "question": "What are the codes of template types that are not used for any document?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id" }, { "instance_id": "dev_347", "db_id": "cre_Doc_Template_Mgt", "question": "Show all template type codes and descriptions.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code , template_type_description FROM Ref_template_types" }, { "instance_id": "dev_348", "db_id": "cre_Doc_Template_Mgt", "question": "What are the type codes and descriptions for all template types?", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code , template_type_description FROM Ref_template_types" }, { "instance_id": "dev_349", "db_id": "cre_Doc_Template_Mgt", "question": "What is the template type descriptions for template type code \"AD\".", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"" }, { "instance_id": "dev_350", "db_id": "cre_Doc_Template_Mgt", "question": "Return the template type description of the template type with the code AD.", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"" }, { "instance_id": "dev_351", "db_id": "cre_Doc_Template_Mgt", "question": "What is the template type code for template type description \"Book\".", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"" }, { "instance_id": "dev_352", "db_id": "cre_Doc_Template_Mgt", "question": "Return the type code of the template type with the description \"Book\".", "db_type": "sqlite", "db_size": 17, "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"" }, { "instance_id": "dev_353", "db_id": "cre_Doc_Template_Mgt", "question": "What are the distinct template type descriptions for the templates ever used by any document?", "db_type": "sqlite", "db_size": 17, "query": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID" }, { "instance_id": "dev_354", "db_id": "cre_Doc_Template_Mgt", "question": "Return the different descriptions for templates that have been used in a document.", "db_type": "sqlite", "db_size": 17, "query": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID" }, { "instance_id": "dev_355", "db_id": "cre_Doc_Template_Mgt", "question": "What are the template ids with template type description \"Presentation\".", "db_type": "sqlite", "db_size": 17, "query": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"" }, { "instance_id": "dev_356", "db_id": "cre_Doc_Template_Mgt", "question": "Return the ids corresponding to templates with the description 'Presentation'.", "db_type": "sqlite", "db_size": 17, "query": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"" }, { "instance_id": "dev_357", "db_id": "cre_Doc_Template_Mgt", "question": "How many paragraphs in total?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Paragraphs" }, { "instance_id": "dev_358", "db_id": "cre_Doc_Template_Mgt", "question": "Count the number of paragraphs.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Paragraphs" }, { "instance_id": "dev_359", "db_id": "cre_Doc_Template_Mgt", "question": "How many paragraphs for the document with name 'Summer Show'?", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'" }, { "instance_id": "dev_360", "db_id": "cre_Doc_Template_Mgt", "question": "Count the number of paragraphs in the document named 'Summer Show'.", "db_type": "sqlite", "db_size": 17, "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'" }, { "instance_id": "dev_361", "db_id": "cre_Doc_Template_Mgt", "question": "Show paragraph details for paragraph with text 'Korea ' .", "db_type": "sqlite", "db_size": 17, "query": "select other_details from paragraphs where paragraph_text like 'korea'" }, { "instance_id": "dev_362", "db_id": "cre_Doc_Template_Mgt", "question": "What are the details for the paragraph that includes the text 'Korea ' ?", "db_type": "sqlite", "db_size": 17, "query": "select other_details from paragraphs where paragraph_text like 'korea'" }, { "instance_id": "dev_363", "db_id": "cre_Doc_Template_Mgt", "question": "Show all paragraph ids and texts for the document with name 'Welcome to NY'.", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'" }, { "instance_id": "dev_364", "db_id": "cre_Doc_Template_Mgt", "question": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'" }, { "instance_id": "dev_365", "db_id": "cre_Doc_Template_Mgt", "question": "Show all paragraph texts for the document \"Customer reviews\".", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"" }, { "instance_id": "dev_366", "db_id": "cre_Doc_Template_Mgt", "question": "What are the paragraph texts for the document with the name 'Customer reviews'?", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id" }, { "instance_id": "dev_369", "db_id": "cre_Doc_Template_Mgt", "question": "Show all document ids, names and the number of paragraphs in each document.", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 17, "query": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id" }, { "instance_id": "dev_371", "db_id": "cre_Doc_Template_Mgt", "question": "List all document ids with at least two paragraphs.", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2" }, { "instance_id": "dev_372", "db_id": "cre_Doc_Template_Mgt", "question": "What are the ids of documents that have 2 or more paragraphs?", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2" }, { "instance_id": "dev_373", "db_id": "cre_Doc_Template_Mgt", "question": "What is the document id and name with greatest number of paragraphs?", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_374", "db_id": "cre_Doc_Template_Mgt", "question": "Return the id and name of the document with the most paragraphs.", "db_type": "sqlite", "db_size": 17, "query": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_375", "db_id": "cre_Doc_Template_Mgt", "question": "What is the document id with least number of paragraphs?", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1" }, { "instance_id": "dev_376", "db_id": "cre_Doc_Template_Mgt", "question": "Return the id of the document with the fewest paragraphs.", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1" }, { "instance_id": "dev_377", "db_id": "cre_Doc_Template_Mgt", "question": "What is the document id with 1 to 2 paragraphs?", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2" }, { "instance_id": "dev_378", "db_id": "cre_Doc_Template_Mgt", "question": "Give the ids of documents that have between one and two paragraphs.", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2" }, { "instance_id": "dev_379", "db_id": "cre_Doc_Template_Mgt", "question": "Show the document id with paragraph text 'Brazil' and 'Ireland'.", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'" }, { "instance_id": "dev_380", "db_id": "cre_Doc_Template_Mgt", "question": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?", "db_type": "sqlite", "db_size": 17, "query": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'" }, { "instance_id": "dev_381", "db_id": "course_teach", "question": "How many teachers are there?", "db_type": "sqlite", "db_size": 10, "query": "SELECT count(*) FROM teacher" }, { "instance_id": "dev_382", "db_id": "course_teach", "question": "What is the total count of teachers?", "db_type": "sqlite", "db_size": 10, "query": "SELECT count(*) FROM teacher" }, { "instance_id": "dev_383", "db_id": "course_teach", "question": "List the names of teachers in ascending order of age.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM teacher ORDER BY Age ASC" }, { "instance_id": "dev_384", "db_id": "course_teach", "question": "What are the names of the teachers ordered by ascending age?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM teacher ORDER BY Age ASC" }, { "instance_id": "dev_385", "db_id": "course_teach", "question": "What are the age and hometown of teachers?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Age , Hometown FROM teacher" }, { "instance_id": "dev_386", "db_id": "course_teach", "question": "What is the age and hometown of every teacher?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Age , Hometown FROM teacher" }, { "instance_id": "dev_387", "db_id": "course_teach", "question": "List the name of teachers whose hometown is not `` Little Lever Urban District '' .", "db_type": "sqlite", "db_size": 10, "query": "select name from teacher where hometown != \"little lever urban district\"" }, { "instance_id": "dev_388", "db_id": "course_teach", "question": "What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?", "db_type": "sqlite", "db_size": 10, "query": "select name from teacher where hometown != \"little lever urban district\"" }, { "instance_id": "dev_389", "db_id": "course_teach", "question": "Show the name of teachers aged either 32 or 33?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33" }, { "instance_id": "dev_390", "db_id": "course_teach", "question": "What are the names of the teachers who are aged either 32 or 33?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33" }, { "instance_id": "dev_391", "db_id": "course_teach", "question": "What is the hometown of the youngest teacher?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1" }, { "instance_id": "dev_392", "db_id": "course_teach", "question": "Where is the youngest teacher from?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1" }, { "instance_id": "dev_393", "db_id": "course_teach", "question": "Show different hometown of teachers and the number of teachers from each hometown.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown" }, { "instance_id": "dev_394", "db_id": "course_teach", "question": "For each hometown, how many teachers are there?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown" }, { "instance_id": "dev_395", "db_id": "course_teach", "question": "List the most common hometown of teachers.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_396", "db_id": "course_teach", "question": "What is the most commmon hometowns for teachers?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_397", "db_id": "course_teach", "question": "Show the hometowns shared by at least two teachers.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2" }, { "instance_id": "dev_398", "db_id": "course_teach", "question": "What are the towns from which at least two teachers come from?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2" }, { "instance_id": "dev_399", "db_id": "course_teach", "question": "Show names of teachers and the courses they are arranged to teach.", "db_type": "sqlite", "db_size": 10, "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID" }, { "instance_id": "dev_400", "db_id": "course_teach", "question": "What is the name of each teacher and what course they teach?", "db_type": "sqlite", "db_size": 10, "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 10, "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 10, "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name" }, { "instance_id": "dev_403", "db_id": "course_teach", "question": "Show the name of the teacher for the math course.", "db_type": "sqlite", "db_size": 10, "query": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"" }, { "instance_id": "dev_404", "db_id": "course_teach", "question": "What are the names of the people who teach math courses?", "db_type": "sqlite", "db_size": 10, "query": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"" }, { "instance_id": "dev_405", "db_id": "course_teach", "question": "Show names of teachers and the number of courses they teach.", "db_type": "sqlite", "db_size": 10, "query": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name" }, { "instance_id": "dev_406", "db_id": "course_teach", "question": "What are the names of the teachers and how many courses do they teach?", "db_type": "sqlite", "db_size": 10, "query": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name" }, { "instance_id": "dev_407", "db_id": "course_teach", "question": "Show names of teachers that teach at least two courses.", "db_type": "sqlite", "db_size": 10, "query": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2" }, { "instance_id": "dev_408", "db_id": "course_teach", "question": "What are the names of the teachers who teach at least two courses?", "db_type": "sqlite", "db_size": 10, "query": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2" }, { "instance_id": "dev_409", "db_id": "course_teach", "question": "List the names of teachers who have not been arranged to teach courses.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)" }, { "instance_id": "dev_410", "db_id": "course_teach", "question": "What are the names of the teachers whose courses have not been arranged?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)" }, { "instance_id": "dev_411", "db_id": "museum_visit", "question": "How many visitors below age 30 are there?", "db_type": "sqlite", "db_size": 12, "query": "SELECT count(*) FROM visitor WHERE age < 30" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 12, "query": "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC" }, { "instance_id": "dev_413", "db_id": "museum_visit", "question": "What is the average age of the visitors whose membership level is not higher than 4?", "db_type": "sqlite", "db_size": 12, "query": "SELECT avg(age) FROM visitor WHERE Level_of_membership <= 4" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 12, "query": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC" }, { "instance_id": "dev_415", "db_id": "museum_visit", "question": "Find the id and name of the museum that has the most staff members?", "db_type": "sqlite", "db_size": 12, "query": "SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1" }, { "instance_id": "dev_416", "db_id": "museum_visit", "question": "Find the average number of staff working for the museums that were open before 2009.", "db_type": "sqlite", "db_size": 12, "query": "SELECT avg(num_of_staff) FROM museum WHERE open_year < 2009" }, { "instance_id": "dev_417", "db_id": "museum_visit", "question": "What are the opening year and staff number of the museum named Plaza Museum?", "db_type": "sqlite", "db_size": 12, "query": "SELECT Num_of_Staff , Open_Year FROM museum WHERE name = 'Plaza Museum'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 12, "query": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)" }, { "instance_id": "dev_419", "db_id": "museum_visit", "question": "find the id, name and age for visitors who visited some museums more than once.", "db_type": "sqlite", "db_size": 12, "query": "SELECT t1.id , t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING count(*) > 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 12, "query": "SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1" }, { "instance_id": "dev_421", "db_id": "museum_visit", "question": "What are the id and name of the museum visited most times?", "db_type": "sqlite", "db_size": 12, "query": "SELECT t2.Museum_ID , t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_422", "db_id": "museum_visit", "question": "What is the name of the museum that had no visitor yet?", "db_type": "sqlite", "db_size": 12, "query": "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)" }, { "instance_id": "dev_423", "db_id": "museum_visit", "question": "Find the name and age of the visitor who bought the most tickets at once.", "db_type": "sqlite", "db_size": 12, "query": "SELECT t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1" }, { "instance_id": "dev_424", "db_id": "museum_visit", "question": "What are the average and maximum number of tickets bought in all visits?", "db_type": "sqlite", "db_size": 12, "query": "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit" }, { "instance_id": "dev_425", "db_id": "museum_visit", "question": "What is the total ticket expense of the visitors whose membership level is 1?", "db_type": "sqlite", "db_size": 12, "query": "SELECT sum(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 12, "query": "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011" }, { "instance_id": "dev_427", "db_id": "museum_visit", "question": "Find the number of visitors who did not visit any museum opened after 2010.", "db_type": "sqlite", "db_size": 12, "query": "SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010)" }, { "instance_id": "dev_428", "db_id": "museum_visit", "question": "How many museums were opened after 2013 or before 2008?", "db_type": "sqlite", "db_size": 12, "query": "SELECT count(*) FROM museum WHERE open_year > 2013 OR open_year < 2008" }, { "instance_id": "dev_429", "db_id": "wta_1", "question": "Find the total number of players.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) FROM players" }, { "instance_id": "dev_430", "db_id": "wta_1", "question": "How many players are there?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) FROM players" }, { "instance_id": "dev_431", "db_id": "wta_1", "question": "Find the total number of matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) FROM matches" }, { "instance_id": "dev_432", "db_id": "wta_1", "question": "Count the number of matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) FROM matches" }, { "instance_id": "dev_433", "db_id": "wta_1", "question": "List the first name and birth date of all players from the country with code USA.", "db_type": "sqlite", "db_size": 43, "query": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'" }, { "instance_id": "dev_434", "db_id": "wta_1", "question": "What are the first names and birth dates of players from the USA?", "db_type": "sqlite", "db_size": 43, "query": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'" }, { "instance_id": "dev_435", "db_id": "wta_1", "question": "Find the average age of losers and winners of all matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches" }, { "instance_id": "dev_436", "db_id": "wta_1", "question": "What are the average ages of losers and winners across matches?", "db_type": "sqlite", "db_size": 43, "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches" }, { "instance_id": "dev_437", "db_id": "wta_1", "question": "Find the average rank of winners in all matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT avg(winner_rank) FROM matches" }, { "instance_id": "dev_438", "db_id": "wta_1", "question": "What is the average rank for winners in all matches?", "db_type": "sqlite", "db_size": 43, "query": "SELECT avg(winner_rank) FROM matches" }, { "instance_id": "dev_439", "db_id": "wta_1", "question": "Find the highest rank of losers in all matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT min(loser_rank) FROM matches" }, { "instance_id": "dev_440", "db_id": "wta_1", "question": "What is the best rank of losers across all matches?", "db_type": "sqlite", "db_size": 43, "query": "SELECT min(loser_rank) FROM matches" }, { "instance_id": "dev_441", "db_id": "wta_1", "question": "find the number of distinct country codes of all players.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(DISTINCT country_code) FROM players" }, { "instance_id": "dev_442", "db_id": "wta_1", "question": "How many distinct countries do players come from?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(DISTINCT country_code) FROM players" }, { "instance_id": "dev_443", "db_id": "wta_1", "question": "Find the number of distinct name of losers.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(DISTINCT loser_name) FROM matches" }, { "instance_id": "dev_444", "db_id": "wta_1", "question": "How many different loser names are there?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(DISTINCT loser_name) FROM matches" }, { "instance_id": "dev_445", "db_id": "wta_1", "question": "Find the name of tourney that has more than 10 matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10" }, { "instance_id": "dev_446", "db_id": "wta_1", "question": "What are the names of tournaments that have more than 10 matches?", "db_type": "sqlite", "db_size": 43, "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10" }, { "instance_id": "dev_447", "db_id": "wta_1", "question": "List the names of all winners who played in both 2013 and 2016.", "db_type": "sqlite", "db_size": 43, "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016" }, { "instance_id": "dev_448", "db_id": "wta_1", "question": "What are the names of players who won in both 2013 and 2016?", "db_type": "sqlite", "db_size": 43, "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016" }, { "instance_id": "dev_449", "db_id": "wta_1", "question": "List the number of all matches who played in years of 2013 or 2016.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016" }, { "instance_id": "dev_450", "db_id": "wta_1", "question": "How many matches were played in 2013 or 2016?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'" }, { "instance_id": "dev_453", "db_id": "wta_1", "question": "Find the first name and country code of the oldest player.", "db_type": "sqlite", "db_size": 43, "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1" }, { "instance_id": "dev_454", "db_id": "wta_1", "question": "What is the first name and country code of the oldest player?", "db_type": "sqlite", "db_size": 43, "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1" }, { "instance_id": "dev_455", "db_id": "wta_1", "question": "List the first and last name of all players in the order of birth date.", "db_type": "sqlite", "db_size": 43, "query": "SELECT first_name , last_name FROM players ORDER BY birth_date" }, { "instance_id": "dev_456", "db_id": "wta_1", "question": "What are the full names of all players, sorted by birth date?", "db_type": "sqlite", "db_size": 43, "query": "SELECT first_name , last_name FROM players ORDER BY birth_date" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date" }, { "instance_id": "dev_458", "db_id": "wta_1", "question": "What are the full names of all left handed players, in order of birth date?", "db_type": "sqlite", "db_size": 43, "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date" }, { "instance_id": "dev_459", "db_id": "wta_1", "question": "Find the first name and country code of the player who did the most number of tours.", "db_type": "sqlite", "db_size": 43, "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1" }, { "instance_id": "dev_460", "db_id": "wta_1", "question": "What is the first name and country code of the player with the most tours?", "db_type": "sqlite", "db_size": 43, "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1" }, { "instance_id": "dev_461", "db_id": "wta_1", "question": "Find the year that has the most number of matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_462", "db_id": "wta_1", "question": "Which year had the most matches?", "db_type": "sqlite", "db_size": 43, "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_463", "db_id": "wta_1", "question": "Find the name and rank points of the winner who won the most times.", "db_type": "sqlite", "db_size": 43, "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1" }, { "instance_id": "dev_467", "db_id": "wta_1", "question": "find the names of loser and winner who played in the match with greatest number of minutes.", "db_type": "sqlite", "db_size": 43, "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1" }, { "instance_id": "dev_468", "db_id": "wta_1", "question": "What are the names of the winner and loser who played in the longest match?", "db_type": "sqlite", "db_size": 43, "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1" }, { "instance_id": "dev_469", "db_id": "wta_1", "question": "Find the average ranking for each player and their first name.", "db_type": "sqlite", "db_size": 43, "query": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name" }, { "instance_id": "dev_470", "db_id": "wta_1", "question": "What are the first names of all players, and their average rankings?", "db_type": "sqlite", "db_size": 43, "query": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name" }, { "instance_id": "dev_471", "db_id": "wta_1", "question": "Find the total ranking points for each player and their first name.", "db_type": "sqlite", "db_size": 43, "query": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name" }, { "instance_id": "dev_472", "db_id": "wta_1", "question": "What are the first names of all players, and their total ranking points?", "db_type": "sqlite", "db_size": 43, "query": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name" }, { "instance_id": "dev_473", "db_id": "wta_1", "question": "find the number of players for each country.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) , country_code FROM players GROUP BY country_code" }, { "instance_id": "dev_474", "db_id": "wta_1", "question": "How many players are from each country?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) , country_code FROM players GROUP BY country_code" }, { "instance_id": "dev_475", "db_id": "wta_1", "question": "find the code of the country where has the greatest number of players.", "db_type": "sqlite", "db_size": 43, "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_476", "db_id": "wta_1", "question": "What is the code of the country with the most players?", "db_type": "sqlite", "db_size": 43, "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_477", "db_id": "wta_1", "question": "Find the codes of countries that have more than 50 players.", "db_type": "sqlite", "db_size": 43, "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50" }, { "instance_id": "dev_478", "db_id": "wta_1", "question": "What are the codes of countries with more than 50 players?", "db_type": "sqlite", "db_size": 43, "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50" }, { "instance_id": "dev_479", "db_id": "wta_1", "question": "Find the total number of tours for each ranking date.", "db_type": "sqlite", "db_size": 43, "query": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date" }, { "instance_id": "dev_480", "db_id": "wta_1", "question": "How many total tours were there for each ranking date?", "db_type": "sqlite", "db_size": 43, "query": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date" }, { "instance_id": "dev_481", "db_id": "wta_1", "question": "Find the number of matches happened in each year.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR" }, { "instance_id": "dev_482", "db_id": "wta_1", "question": "How many matches were played in each year?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR" }, { "instance_id": "dev_483", "db_id": "wta_1", "question": "Find the name and rank of the 3 youngest winners across all matches.", "db_type": "sqlite", "db_size": 43, "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3" }, { "instance_id": "dev_484", "db_id": "wta_1", "question": "What are the names and ranks of the three youngest winners across all matches?", "db_type": "sqlite", "db_size": 43, "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3" }, { "instance_id": "dev_485", "db_id": "wta_1", "question": "How many different winners both participated in the WTA Championships and were left handed?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'" }, { "instance_id": "dev_486", "db_id": "wta_1", "question": "Find the number of left handed winners who participated in the WTA Championships.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 43, "query": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1" }, { "instance_id": "dev_489", "db_id": "wta_1", "question": "Find the number of players for each hand type.", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) , hand FROM players GROUP BY hand" }, { "instance_id": "dev_490", "db_id": "wta_1", "question": "How many players are there for each hand type?", "db_type": "sqlite", "db_size": 43, "query": "SELECT count(*) , hand FROM players GROUP BY hand" }, { "instance_id": "dev_491", "db_id": "battle_death", "question": "How many ships ended up being 'Captured'?", "db_type": "sqlite", "db_size": 18, "query": "SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'" }, { "instance_id": "dev_492", "db_id": "battle_death", "question": "List the name and tonnage ordered by in descending alphaetical order for the names.", "db_type": "sqlite", "db_size": 18, "query": "SELECT name , tonnage FROM ship ORDER BY name DESC" }, { "instance_id": "dev_493", "db_id": "battle_death", "question": "List the name, date and result of each battle.", "db_type": "sqlite", "db_size": 18, "query": "SELECT name , date FROM battle" }, { "instance_id": "dev_494", "db_id": "battle_death", "question": "What is maximum and minimum death toll caused each time?", "db_type": "sqlite", "db_size": 18, "query": "SELECT max(killed) , min(killed) FROM death" }, { "instance_id": "dev_495", "db_id": "battle_death", "question": "What is the average number of injuries caused each time?", "db_type": "sqlite", "db_size": 18, "query": "SELECT avg(injured) FROM death" }, { "instance_id": "dev_496", "db_id": "battle_death", "question": "What are the death and injury situations caused by the ship with tonnage 't'?", "db_type": "sqlite", "db_size": 18, "query": "SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'" }, { "instance_id": "dev_497", "db_id": "battle_death", "question": "What are the name and results of the battles when the bulgarian commander is not 'Boril'", "db_type": "sqlite", "db_size": 18, "query": "SELECT name , RESULT FROM battle WHERE bulgarian_commander != 'Boril'" }, { "instance_id": "dev_498", "db_id": "battle_death", "question": "What are the different ids and names of the battles that lost any 'Brig' type shipes?", "db_type": "sqlite", "db_size": 18, "query": "SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 18, "query": "SELECT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed) > 10" }, { "instance_id": "dev_500", "db_id": "battle_death", "question": "What is the ship id and name that caused most total injuries?", "db_type": "sqlite", "db_size": 18, "query": "SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_501", "db_id": "battle_death", "question": "What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?", "db_type": "sqlite", "db_size": 18, "query": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'" }, { "instance_id": "dev_502", "db_id": "battle_death", "question": "How many different results are there for the battles?", "db_type": "sqlite", "db_size": 18, "query": "SELECT count(DISTINCT RESULT) FROM battle" }, { "instance_id": "dev_503", "db_id": "battle_death", "question": "How many battles did not lose any ship with tonnage '225'?", "db_type": "sqlite", "db_size": 18, "query": "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 18, "query": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'" }, { "instance_id": "dev_505", "db_id": "battle_death", "question": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.", "db_type": "sqlite", "db_size": 18, "query": "SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'" }, { "instance_id": "dev_506", "db_id": "battle_death", "question": "What are the notes of the death events which has substring 'East'?", "db_type": "sqlite", "db_size": 18, "query": "SELECT note FROM death WHERE note LIKE '%East%'" }, { "instance_id": "dev_507", "db_id": "student_transcripts_tracking", "question": "what are all the addresses including line 1 and line 2?", "db_type": "sqlite", "db_size": 56, "query": "SELECT line_1 , line_2 FROM addresses" }, { "instance_id": "dev_508", "db_id": "student_transcripts_tracking", "question": "What is the first and second line for all addresses?", "db_type": "sqlite", "db_size": 56, "query": "SELECT line_1 , line_2 FROM addresses" }, { "instance_id": "dev_509", "db_id": "student_transcripts_tracking", "question": "How many courses in total are listed?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(*) FROM Courses" }, { "instance_id": "dev_510", "db_id": "student_transcripts_tracking", "question": "How many courses are there?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(*) FROM Courses" }, { "instance_id": "dev_511", "db_id": "student_transcripts_tracking", "question": "How is the math course described?", "db_type": "sqlite", "db_size": 56, "query": "SELECT course_description FROM Courses WHERE course_name = 'math'" }, { "instance_id": "dev_512", "db_id": "student_transcripts_tracking", "question": "What are the descriptions for all the math courses?", "db_type": "sqlite", "db_size": 56, "query": "SELECT course_description FROM Courses WHERE course_name = 'math'" }, { "instance_id": "dev_513", "db_id": "student_transcripts_tracking", "question": "What is the zip code of the address in the city Port Chelsea?", "db_type": "sqlite", "db_size": 56, "query": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'" }, { "instance_id": "dev_514", "db_id": "student_transcripts_tracking", "question": "What is the zip code for Port Chelsea?", "db_type": "sqlite", "db_size": 56, "query": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'" }, { "instance_id": "dev_515", "db_id": "student_transcripts_tracking", "question": "Which department offers the most number of degrees? List department name and id.", "db_type": "sqlite", "db_size": 56, "query": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_516", "db_id": "student_transcripts_tracking", "question": "What is the name and id of the department with the most number of degrees ?", "db_type": "sqlite", "db_size": 56, "query": "select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1" }, { "instance_id": "dev_517", "db_id": "student_transcripts_tracking", "question": "How many departments offer any degree?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(DISTINCT department_id) FROM Degree_Programs" }, { "instance_id": "dev_518", "db_id": "student_transcripts_tracking", "question": "How many different departments offer degrees?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(DISTINCT department_id) FROM Degree_Programs" }, { "instance_id": "dev_519", "db_id": "student_transcripts_tracking", "question": "How many different degree names are offered?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs" }, { "instance_id": "dev_520", "db_id": "student_transcripts_tracking", "question": "How many different degrees are offered?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs" }, { "instance_id": "dev_521", "db_id": "student_transcripts_tracking", "question": "How many degrees does the engineering department offer?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'" }, { "instance_id": "dev_522", "db_id": "student_transcripts_tracking", "question": "How many degrees does the engineering department have?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'" }, { "instance_id": "dev_523", "db_id": "student_transcripts_tracking", "question": "What are the names and descriptions of all the sections?", "db_type": "sqlite", "db_size": 56, "query": "SELECT section_name , section_description FROM Sections" }, { "instance_id": "dev_524", "db_id": "student_transcripts_tracking", "question": "What are the names and descriptions for all the sections?", "db_type": "sqlite", "db_size": 56, "query": "SELECT section_name , section_description FROM Sections" }, { "instance_id": "dev_525", "db_id": "student_transcripts_tracking", "question": "What are the names and id of courses having at most 2 sections?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2" }, { "instance_id": "dev_526", "db_id": "student_transcripts_tracking", "question": "What are the names and ids of every course with less than 2 sections?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2" }, { "instance_id": "dev_527", "db_id": "student_transcripts_tracking", "question": "List the section_name in reversed lexicographical order.", "db_type": "sqlite", "db_size": 56, "query": "SELECT section_name FROM Sections ORDER BY section_name DESC" }, { "instance_id": "dev_528", "db_id": "student_transcripts_tracking", "question": "What are the names of the sections in reverse alphabetical order?", "db_type": "sqlite", "db_size": 56, "query": "SELECT section_name FROM Sections ORDER BY section_name DESC" }, { "instance_id": "dev_529", "db_id": "student_transcripts_tracking", "question": "What is the semester which most student registered in? Show both the name and the id.", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_531", "db_id": "student_transcripts_tracking", "question": "What is the description of the department whose name has the substring the computer?", "db_type": "sqlite", "db_size": 56, "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'" }, { "instance_id": "dev_532", "db_id": "student_transcripts_tracking", "question": "What is the department description for the one whose name has the word computer?", "db_type": "sqlite", "db_size": 56, "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2" }, { "instance_id": "dev_535", "db_id": "student_transcripts_tracking", "question": "Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.", "db_type": "sqlite", "db_size": 56, "query": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'" }, { "instance_id": "dev_536", "db_id": "student_transcripts_tracking", "question": "What are the first, middle, and last names for everybody enrolled in a Bachelors program?", "db_type": "sqlite", "db_size": 56, "query": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'" }, { "instance_id": "dev_537", "db_id": "student_transcripts_tracking", "question": "Find the kind of program which most number of students are enrolled in?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_538", "db_id": "student_transcripts_tracking", "question": "What is the degree summary name that has the most number of students enrolled?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_543", "db_id": "student_transcripts_tracking", "question": "Which semesters do not have any student enrolled? List the semester name.", "db_type": "sqlite", "db_size": 56, "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )" }, { "instance_id": "dev_544", "db_id": "student_transcripts_tracking", "question": "What is the name of the semester with no students enrolled?", "db_type": "sqlite", "db_size": 56, "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )" }, { "instance_id": "dev_545", "db_id": "student_transcripts_tracking", "question": "What are all the course names of the courses which ever have students enrolled in?", "db_type": "sqlite", "db_size": 56, "query": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id" }, { "instance_id": "dev_546", "db_id": "student_transcripts_tracking", "question": "What are the names of all courses that have some students enrolled?", "db_type": "sqlite", "db_size": 56, "query": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id" }, { "instance_id": "dev_547", "db_id": "student_transcripts_tracking", "question": "What's the name of the course with most number of enrollments?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_548", "db_id": "student_transcripts_tracking", "question": "What is the name of the course with the most students enrolled?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id" }, { "instance_id": "dev_551", "db_id": "student_transcripts_tracking", "question": "Show the date and id of the transcript with at least 2 course results.", "db_type": "sqlite", "db_size": 56, "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2" }, { "instance_id": "dev_552", "db_id": "student_transcripts_tracking", "question": "What is the date and id of the transcript with at least 2 courses listed?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'" }, { "instance_id": "dev_554", "db_id": "student_transcripts_tracking", "question": "What is the mobile phone number of the student named Timmothy Ward ?", "db_type": "sqlite", "db_size": 56, "query": "select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward'" }, { "instance_id": "dev_555", "db_id": "student_transcripts_tracking", "question": "Who is the first student to register? List the first name, middle name and last name.", "db_type": "sqlite", "db_size": 56, "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1" }, { "instance_id": "dev_556", "db_id": "student_transcripts_tracking", "question": "What is the first, middle, and last name of the first student to register?", "db_type": "sqlite", "db_size": 56, "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1" }, { "instance_id": "dev_558", "db_id": "student_transcripts_tracking", "question": "What is the first, middle, and last name of the earliest school graduate?", "db_type": "sqlite", "db_size": 56, "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id" }, { "instance_id": "dev_561", "db_id": "student_transcripts_tracking", "question": "Which address holds the most number of students currently? List the address id and all lines.", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_562", "db_id": "student_transcripts_tracking", "question": "What is the id, line 1, and line 2 of the address with the most students?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_563", "db_id": "student_transcripts_tracking", "question": "On average, when were the transcripts printed?", "db_type": "sqlite", "db_size": 56, "query": "SELECT avg(transcript_date) FROM Transcripts" }, { "instance_id": "dev_564", "db_id": "student_transcripts_tracking", "question": "What is the average transcript date?", "db_type": "sqlite", "db_size": 56, "query": "SELECT avg(transcript_date) FROM Transcripts" }, { "instance_id": "dev_565", "db_id": "student_transcripts_tracking", "question": "When is the first transcript released? List the date and details.", "db_type": "sqlite", "db_size": 56, "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1" }, { "instance_id": "dev_566", "db_id": "student_transcripts_tracking", "question": "What is the earliest date of a transcript release, and what details can you tell me?", "db_type": "sqlite", "db_size": 56, "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1" }, { "instance_id": "dev_567", "db_id": "student_transcripts_tracking", "question": "How many transcripts are released?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(*) FROM Transcripts" }, { "instance_id": "dev_568", "db_id": "student_transcripts_tracking", "question": "How many transcripts are listed?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(*) FROM Transcripts" }, { "instance_id": "dev_569", "db_id": "student_transcripts_tracking", "question": "What is the last transcript release date?", "db_type": "sqlite", "db_size": 56, "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1" }, { "instance_id": "dev_570", "db_id": "student_transcripts_tracking", "question": "When was the last transcript released?", "db_type": "sqlite", "db_size": 56, "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1" }, { "instance_id": "dev_574", "db_id": "student_transcripts_tracking", "question": "What is the date and id of the transcript with the least number of results?", "db_type": "sqlite", "db_size": 56, "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1" }, { "instance_id": "dev_575", "db_id": "student_transcripts_tracking", "question": "Find the semester when both Master students and Bachelor students got enrolled in.", "db_type": "sqlite", "db_size": 56, "query": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'" }, { "instance_id": "dev_576", "db_id": "student_transcripts_tracking", "question": "What is the id of the semester that had both Masters and Bachelors students enrolled?", "db_type": "sqlite", "db_size": 56, "query": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'" }, { "instance_id": "dev_577", "db_id": "student_transcripts_tracking", "question": "How many different addresses do the students currently live?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(DISTINCT current_address_id) FROM Students" }, { "instance_id": "dev_578", "db_id": "student_transcripts_tracking", "question": "What are the different addresses that have students living there?", "db_type": "sqlite", "db_size": 56, "query": "SELECT count(DISTINCT current_address_id) FROM Students" }, { "instance_id": "dev_579", "db_id": "student_transcripts_tracking", "question": "List all the student details in reversed lexicographical order.", "db_type": "sqlite", "db_size": 56, "query": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC" }, { "instance_id": "dev_580", "db_id": "student_transcripts_tracking", "question": "What other details can you tell me about students in reverse alphabetical order?", "db_type": "sqlite", "db_size": 56, "query": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC" }, { "instance_id": "dev_581", "db_id": "student_transcripts_tracking", "question": "Describe the section h.", "db_type": "sqlite", "db_size": 56, "query": "SELECT section_description FROM Sections WHERE section_name = 'h'" }, { "instance_id": "dev_582", "db_id": "student_transcripts_tracking", "question": "What is the description for the section named h?", "db_type": "sqlite", "db_size": 56, "query": "SELECT section_description FROM Sections WHERE section_name = 'h'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 56, "query": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'" }, { "instance_id": "dev_585", "db_id": "tvshow", "question": "List the title of all cartoons in alphabetical order.", "db_type": "sqlite", "db_size": 25, "query": "SELECT Title FROM Cartoon ORDER BY title" }, { "instance_id": "dev_586", "db_id": "tvshow", "question": "What are the titles of the cartoons sorted alphabetically?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Title FROM Cartoon ORDER BY title" }, { "instance_id": "dev_587", "db_id": "tvshow", "question": "List all cartoon directed by \"Ben Jones\".", "db_type": "sqlite", "db_size": 25, "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";" }, { "instance_id": "dev_588", "db_id": "tvshow", "question": "What are the names of all cartoons directed by Ben Jones?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";" }, { "instance_id": "dev_589", "db_id": "tvshow", "question": "How many cartoons were written by \"Joseph Kuhr\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";" }, { "instance_id": "dev_590", "db_id": "tvshow", "question": "What is the number of cartoones written by Joseph Kuhr?", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";" }, { "instance_id": "dev_591", "db_id": "tvshow", "question": "list all cartoon titles and their directors ordered by their air date", "db_type": "sqlite", "db_size": 25, "query": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date" }, { "instance_id": "dev_592", "db_id": "tvshow", "question": "What is the name and directors of all the cartoons that are ordered by air date?", "db_type": "sqlite", "db_size": 25, "query": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date" }, { "instance_id": "dev_593", "db_id": "tvshow", "question": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".", "db_type": "sqlite", "db_size": 25, "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";" }, { "instance_id": "dev_594", "db_id": "tvshow", "question": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";" }, { "instance_id": "dev_595", "db_id": "tvshow", "question": "Which country has the most of TV Channels? List the country and number of TV Channels it has.", "db_type": "sqlite", "db_size": 25, "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;" }, { "instance_id": "dev_596", "db_id": "tvshow", "question": "What is the country with the most number of TV Channels and how many does it have?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;" }, { "instance_id": "dev_597", "db_id": "tvshow", "question": "List the number of different series names and contents in the TV Channel table.", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;" }, { "instance_id": "dev_598", "db_id": "tvshow", "question": "How many different series and contents are listed in the TV Channel table?", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;" }, { "instance_id": "dev_599", "db_id": "tvshow", "question": "What is the content of TV Channel with serial name \"Sky Radio\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";" }, { "instance_id": "dev_600", "db_id": "tvshow", "question": "What is the content of the series Sky Radio?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";" }, { "instance_id": "dev_601", "db_id": "tvshow", "question": "What is the Package Option of TV Channel with serial name \"Sky Radio\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";" }, { "instance_id": "dev_602", "db_id": "tvshow", "question": "What are the Package Options of the TV Channels whose series names are Sky Radio?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";" }, { "instance_id": "dev_603", "db_id": "tvshow", "question": "How many TV Channel using language English?", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";" }, { "instance_id": "dev_604", "db_id": "tvshow", "question": "How many TV Channels use the English language?", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";" }, { "instance_id": "dev_605", "db_id": "tvshow", "question": "List the language used least number of TV Channel. List language and number of TV Channel.", "db_type": "sqlite", "db_size": 25, "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;" }, { "instance_id": "dev_606", "db_id": "tvshow", "question": "What are the languages used by the least number of TV Channels and how many channels use it?", "db_type": "sqlite", "db_size": 25, "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;" }, { "instance_id": "dev_607", "db_id": "tvshow", "question": "List each language and the number of TV Channels using it.", "db_type": "sqlite", "db_size": 25, "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE" }, { "instance_id": "dev_608", "db_id": "tvshow", "question": "For each language, list the number of TV Channels that use it.", "db_type": "sqlite", "db_size": 25, "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";" }, { "instance_id": "dev_611", "db_id": "tvshow", "question": "List the title of all Cartoons showed on TV Channel with series name \"Sky Radio\".", "db_type": "sqlite", "db_size": 25, "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";" }, { "instance_id": "dev_613", "db_id": "tvshow", "question": "List the Episode of all TV series sorted by rating.", "db_type": "sqlite", "db_size": 25, "query": "SELECT Episode FROM TV_series ORDER BY rating" }, { "instance_id": "dev_614", "db_id": "tvshow", "question": "What are all of the episodes ordered by ratings?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Episode FROM TV_series ORDER BY rating" }, { "instance_id": "dev_615", "db_id": "tvshow", "question": "List top 3 highest Rating TV series. List the TV series's Episode and Rating.", "db_type": "sqlite", "db_size": 25, "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;" }, { "instance_id": "dev_616", "db_id": "tvshow", "question": "What are 3 most highly rated episodes in the TV series table and what were those ratings?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;" }, { "instance_id": "dev_617", "db_id": "tvshow", "question": "What is minimum and maximum share of TV series?", "db_type": "sqlite", "db_size": 25, "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;" }, { "instance_id": "dev_618", "db_id": "tvshow", "question": "What is the maximum and minimum share for the TV series?", "db_type": "sqlite", "db_size": 25, "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;" }, { "instance_id": "dev_619", "db_id": "tvshow", "question": "What is the air date of TV series with Episode \"A Love of a Lifetime\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";" }, { "instance_id": "dev_620", "db_id": "tvshow", "question": "When did the episode \"A Love of a Lifetime\" air?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";" }, { "instance_id": "dev_621", "db_id": "tvshow", "question": "What is Weekly Rank of TV series with Episode \"A Love of a Lifetime\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";" }, { "instance_id": "dev_622", "db_id": "tvshow", "question": "What is the weekly rank for the episode \"A Love of a Lifetime\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";" }, { "instance_id": "dev_624", "db_id": "tvshow", "question": "What is the name of the series that has the episode \"A Love of a Lifetime\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";" }, { "instance_id": "dev_625", "db_id": "tvshow", "question": "List the Episode of all TV series showed on TV Channel with series name \"Sky Radio\".", "db_type": "sqlite", "db_size": 25, "query": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";" }, { "instance_id": "dev_626", "db_id": "tvshow", "question": "What is the episode for the TV series named \"Sky Radio\"?", "db_type": "sqlite", "db_size": 25, "query": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";" }, { "instance_id": "dev_627", "db_id": "tvshow", "question": "Find the number of cartoons directed by each of the listed directors.", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by" }, { "instance_id": "dev_628", "db_id": "tvshow", "question": "How many cartoons did each director create?", "db_type": "sqlite", "db_size": 25, "query": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by" }, { "instance_id": "dev_629", "db_id": "tvshow", "question": "Find the production code and channel of the most recently aired cartoon .", "db_type": "sqlite", "db_size": 25, "query": "select production_code , channel from cartoon order by original_air_date desc limit 1" }, { "instance_id": "dev_630", "db_id": "tvshow", "question": "What is the produdction code and channel of the most recent cartoon ?", "db_type": "sqlite", "db_size": 25, "query": "select production_code , channel from cartoon order by original_air_date desc limit 1" }, { "instance_id": "dev_631", "db_id": "tvshow", "question": "Find the package choice and series name of the TV channel that has high definition TV.", "db_type": "sqlite", "db_size": 25, "query": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"" }, { "instance_id": "dev_633", "db_id": "tvshow", "question": "which countries' tv channels are playing some cartoon written by Todd Casey?", "db_type": "sqlite", "db_size": 25, "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'" }, { "instance_id": "dev_634", "db_id": "tvshow", "question": "What are the countries that have cartoons on TV that were written by Todd Casey?", "db_type": "sqlite", "db_size": 25, "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'" }, { "instance_id": "dev_635", "db_id": "tvshow", "question": "which countries' tv channels are not playing any cartoon written by Todd Casey?", "db_type": "sqlite", "db_size": 25, "query": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'" }, { "instance_id": "dev_636", "db_id": "tvshow", "question": "What are the countries that are not playing cartoons written by Todd Casey?", "db_type": "sqlite", "db_size": 25, "query": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'" }, { "instance_id": "dev_639", "db_id": "tvshow", "question": "find the pixel aspect ratio and nation of the tv channels that do not use English.", "db_type": "sqlite", "db_size": 25, "query": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'" }, { "instance_id": "dev_641", "db_id": "tvshow", "question": "find id of the tv channels that from the countries where have more than two tv channels.", "db_type": "sqlite", "db_size": 25, "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2" }, { "instance_id": "dev_642", "db_id": "tvshow", "question": "What are the ids of all tv channels that have more than 2 TV channels?", "db_type": "sqlite", "db_size": 25, "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2" }, { "instance_id": "dev_643", "db_id": "tvshow", "question": "find the id of tv channels that do not play any cartoon directed by Ben Jones.", "db_type": "sqlite", "db_size": 25, "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'" }, { "instance_id": "dev_644", "db_id": "tvshow", "question": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?", "db_type": "sqlite", "db_size": 25, "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'" }, { "instance_id": "dev_645", "db_id": "tvshow", "question": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones.", "db_type": "sqlite", "db_size": 25, "query": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 25, "query": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')" }, { "instance_id": "dev_647", "db_id": "poker_player", "question": "How many poker players are there?", "db_type": "sqlite", "db_size": 11, "query": "SELECT count(*) FROM poker_player" }, { "instance_id": "dev_648", "db_id": "poker_player", "question": "Count the number of poker players.", "db_type": "sqlite", "db_size": 11, "query": "SELECT count(*) FROM poker_player" }, { "instance_id": "dev_649", "db_id": "poker_player", "question": "List the earnings of poker players in descending order.", "db_type": "sqlite", "db_size": 11, "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC" }, { "instance_id": "dev_650", "db_id": "poker_player", "question": "What are the earnings of poker players, ordered descending by value?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC" }, { "instance_id": "dev_651", "db_id": "poker_player", "question": "List the final tables made and the best finishes of poker players.", "db_type": "sqlite", "db_size": 11, "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player" }, { "instance_id": "dev_652", "db_id": "poker_player", "question": "What are the final tables made and best finishes for all poker players?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player" }, { "instance_id": "dev_653", "db_id": "poker_player", "question": "What is the average earnings of poker players?", "db_type": "sqlite", "db_size": 11, "query": "SELECT avg(Earnings) FROM poker_player" }, { "instance_id": "dev_654", "db_id": "poker_player", "question": "Return the average earnings across all poker players.", "db_type": "sqlite", "db_size": 11, "query": "SELECT avg(Earnings) FROM poker_player" }, { "instance_id": "dev_655", "db_id": "poker_player", "question": "What is the money rank of the poker player with the highest earnings?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1" }, { "instance_id": "dev_656", "db_id": "poker_player", "question": "Return the money rank of the player with the greatest earnings.", "db_type": "sqlite", "db_size": 11, "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1" }, { "instance_id": "dev_657", "db_id": "poker_player", "question": "What is the maximum number of final tables made among poker players with earnings less than 200000?", "db_type": "sqlite", "db_size": 11, "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000" }, { "instance_id": "dev_658", "db_id": "poker_player", "question": "Return the maximum final tables made across all poker players who have earnings below 200000.", "db_type": "sqlite", "db_size": 11, "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000" }, { "instance_id": "dev_659", "db_id": "poker_player", "question": "What are the names of poker players?", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID" }, { "instance_id": "dev_660", "db_id": "poker_player", "question": "Return the names of all the poker players.", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID" }, { "instance_id": "dev_661", "db_id": "poker_player", "question": "What are the names of poker players whose earnings is higher than 300000?", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000" }, { "instance_id": "dev_662", "db_id": "poker_player", "question": "Give the names of poker players who have earnings above 300000.", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000" }, { "instance_id": "dev_663", "db_id": "poker_player", "question": "List the names of poker players ordered by the final tables made in ascending order.", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made" }, { "instance_id": "dev_665", "db_id": "poker_player", "question": "What is the birth date of the poker player with the lowest earnings?", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1" }, { "instance_id": "dev_666", "db_id": "poker_player", "question": "Return the birth date of the poker player with the lowest earnings.", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1" }, { "instance_id": "dev_667", "db_id": "poker_player", "question": "What is the money rank of the tallest poker player?", "db_type": "sqlite", "db_size": 11, "query": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1" }, { "instance_id": "dev_668", "db_id": "poker_player", "question": "Return the money rank of the poker player with the greatest height.", "db_type": "sqlite", "db_size": 11, "query": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1" }, { "instance_id": "dev_669", "db_id": "poker_player", "question": "What is the average earnings of poker players with height higher than 200?", "db_type": "sqlite", "db_size": 11, "query": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200" }, { "instance_id": "dev_670", "db_id": "poker_player", "question": "Give average earnings of poker players who are taller than 200.", "db_type": "sqlite", "db_size": 11, "query": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200" }, { "instance_id": "dev_671", "db_id": "poker_player", "question": "What are the names of poker players in descending order of earnings?", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC" }, { "instance_id": "dev_672", "db_id": "poker_player", "question": "Return the names of poker players sorted by their earnings descending.", "db_type": "sqlite", "db_size": 11, "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC" }, { "instance_id": "dev_673", "db_id": "poker_player", "question": "What are different nationalities of people and the corresponding number of people from each nation?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality" }, { "instance_id": "dev_674", "db_id": "poker_player", "question": "How many people are there of each nationality?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality" }, { "instance_id": "dev_675", "db_id": "poker_player", "question": "What is the most common nationality of people?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_676", "db_id": "poker_player", "question": "Give the nationality that is most common across all people.", "db_type": "sqlite", "db_size": 11, "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_677", "db_id": "poker_player", "question": "What are the nationalities that are shared by at least two people?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2" }, { "instance_id": "dev_678", "db_id": "poker_player", "question": "Return the nationalities for which there are two or more people.", "db_type": "sqlite", "db_size": 11, "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2" }, { "instance_id": "dev_679", "db_id": "poker_player", "question": "List the names and birth dates of people in ascending alphabetical order of name.", "db_type": "sqlite", "db_size": 11, "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC" }, { "instance_id": "dev_680", "db_id": "poker_player", "question": "What are the names and birth dates of people, ordered by their names in alphabetical order?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC" }, { "instance_id": "dev_681", "db_id": "poker_player", "question": "Show names of people whose nationality is not \"Russia\".", "db_type": "sqlite", "db_size": 11, "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"" }, { "instance_id": "dev_682", "db_id": "poker_player", "question": "What are the names of people who are not from Russia?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"" }, { "instance_id": "dev_683", "db_id": "poker_player", "question": "List the names of people that are not poker players.", "db_type": "sqlite", "db_size": 11, "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)" }, { "instance_id": "dev_684", "db_id": "poker_player", "question": "What are the names of people who do not play poker?", "db_type": "sqlite", "db_size": 11, "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)" }, { "instance_id": "dev_685", "db_id": "poker_player", "question": "How many distinct nationalities are there?", "db_type": "sqlite", "db_size": 11, "query": "SELECT count(DISTINCT Nationality) FROM people" }, { "instance_id": "dev_686", "db_id": "poker_player", "question": "Count the number of different nationalities.", "db_type": "sqlite", "db_size": 11, "query": "SELECT count(DISTINCT Nationality) FROM people" }, { "instance_id": "dev_687", "db_id": "voter_1", "question": "How many states are there?", "db_type": "sqlite", "db_size": 9, "query": "SELECT count(*) FROM area_code_state" }, { "instance_id": "dev_688", "db_id": "voter_1", "question": "List the contestant numbers and names, ordered by contestant name descending.", "db_type": "sqlite", "db_size": 9, "query": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC" }, { "instance_id": "dev_689", "db_id": "voter_1", "question": "List the vote ids, phone numbers and states of all votes.", "db_type": "sqlite", "db_size": 9, "query": "SELECT vote_id , phone_number , state FROM votes" }, { "instance_id": "dev_690", "db_id": "voter_1", "question": "What are the maximum and minimum values of area codes?", "db_type": "sqlite", "db_size": 9, "query": "SELECT max(area_code) , min(area_code) FROM area_code_state" }, { "instance_id": "dev_691", "db_id": "voter_1", "question": "What is last date created of votes from the state 'CA'?", "db_type": "sqlite", "db_size": 9, "query": "SELECT max(created) FROM votes WHERE state = 'CA'" }, { "instance_id": "dev_692", "db_id": "voter_1", "question": "What are the names of the contestants whose names are not 'Jessie Alloway'", "db_type": "sqlite", "db_size": 9, "query": "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'" }, { "instance_id": "dev_693", "db_id": "voter_1", "question": "What are the distinct states and create time of all votes?", "db_type": "sqlite", "db_size": 9, "query": "SELECT DISTINCT state , created FROM votes" }, { "instance_id": "dev_694", "db_id": "voter_1", "question": "What are the contestant numbers and names of the contestants who had at least two votes?", "db_type": "sqlite", "db_size": 9, "query": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 9, "query": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1" }, { "instance_id": "dev_696", "db_id": "voter_1", "question": "What are the number of votes from state 'NY' or 'CA'?", "db_type": "sqlite", "db_size": 9, "query": "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'" }, { "instance_id": "dev_697", "db_id": "voter_1", "question": "How many contestants did not get voted?", "db_type": "sqlite", "db_size": 9, "query": "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )" }, { "instance_id": "dev_698", "db_id": "voter_1", "question": "What is the area code in which the most voters voted?", "db_type": "sqlite", "db_size": 9, "query": "SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 9, "query": "SELECT T2.created , T2.state , T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 9, "query": "SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'" }, { "instance_id": "dev_701", "db_id": "voter_1", "question": "Return the names of the contestants whose names contain the substring 'Al' .", "db_type": "sqlite", "db_size": 9, "query": "select contestant_name from contestants where contestant_name like \"%al%\"" }, { "instance_id": "dev_702", "db_id": "world_1", "question": "What are the names of all the countries that became independent after 1950?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE IndepYear > 1950" }, { "instance_id": "dev_703", "db_id": "world_1", "question": "Give the names of the nations that were founded after 1950.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE IndepYear > 1950" }, { "instance_id": "dev_704", "db_id": "world_1", "question": "How many countries have a republic as their form of government?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"" }, { "instance_id": "dev_705", "db_id": "world_1", "question": "How many countries have governments that are republics?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"" }, { "instance_id": "dev_706", "db_id": "world_1", "question": "What is the total surface area of the countries in the Caribbean region?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"" }, { "instance_id": "dev_707", "db_id": "world_1", "question": "How much surface area do the countires in the Carribean cover together?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"" }, { "instance_id": "dev_708", "db_id": "world_1", "question": "Which continent is Anguilla in?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"" }, { "instance_id": "dev_709", "db_id": "world_1", "question": "What is the continent name which Anguilla belongs to?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"" }, { "instance_id": "dev_710", "db_id": "world_1", "question": "Which region is the city Kabul located in?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"" }, { "instance_id": "dev_711", "db_id": "world_1", "question": "What region is Kabul in?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"" }, { "instance_id": "dev_712", "db_id": "world_1", "question": "Which language is the most popular in Aruba?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1" }, { "instance_id": "dev_713", "db_id": "world_1", "question": "What language is predominantly spoken in Aruba?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1" }, { "instance_id": "dev_714", "db_id": "world_1", "question": "What are the population and life expectancies in Brazil?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"" }, { "instance_id": "dev_715", "db_id": "world_1", "question": "Give me Brazil’s population and life expectancies.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"" }, { "instance_id": "dev_716", "db_id": "world_1", "question": "What are the region and population of Angola?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"" }, { "instance_id": "dev_717", "db_id": "world_1", "question": "What region does Angola belong to and what is its population?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"" }, { "instance_id": "dev_718", "db_id": "world_1", "question": "What is the average expected life expectancy for countries in the region of Central Africa?", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"" }, { "instance_id": "dev_719", "db_id": "world_1", "question": "How long is the people’s average life expectancy in Central Africa?", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"" }, { "instance_id": "dev_720", "db_id": "world_1", "question": "What is the name of country that has the shortest life expectancy in Asia?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1" }, { "instance_id": "dev_721", "db_id": "world_1", "question": "Give the name of the country in Asia with the lowest life expectancy.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1" }, { "instance_id": "dev_722", "db_id": "world_1", "question": "What is the total population and maximum GNP in Asia?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"" }, { "instance_id": "dev_723", "db_id": "world_1", "question": "How many people live in Asia, and what is the largest GNP among them?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"" }, { "instance_id": "dev_724", "db_id": "world_1", "question": "What is the average life expectancy in African countries that are republics?", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"" }, { "instance_id": "dev_725", "db_id": "world_1", "question": "Give the average life expectancy for countries in Africa which are republics?", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"" }, { "instance_id": "dev_726", "db_id": "world_1", "question": "What is the total surface area of the continents Asia and Europe?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"" }, { "instance_id": "dev_727", "db_id": "world_1", "question": "Give the total surface area covered by countries in Asia or Europe.", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"" }, { "instance_id": "dev_728", "db_id": "world_1", "question": "How many people live in Gelderland district?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"" }, { "instance_id": "dev_729", "db_id": "world_1", "question": "What is the total population of Gelderland district?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"" }, { "instance_id": "dev_730", "db_id": "world_1", "question": "What is the average GNP and total population in all nations whose government is US territory?", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"" }, { "instance_id": "dev_731", "db_id": "world_1", "question": "Give the mean GNP and total population of nations which are considered US territory.", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"" }, { "instance_id": "dev_732", "db_id": "world_1", "question": "How many unique languages are spoken in the world?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage" }, { "instance_id": "dev_733", "db_id": "world_1", "question": "What is the number of distinct languages used around the world?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage" }, { "instance_id": "dev_734", "db_id": "world_1", "question": "How many type of governments are in Africa?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"" }, { "instance_id": "dev_735", "db_id": "world_1", "question": "How many different forms of governments are there in Africa?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"" }, { "instance_id": "dev_736", "db_id": "world_1", "question": "What is the total number of languages used in Aruba?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"" }, { "instance_id": "dev_737", "db_id": "world_1", "question": "How many languages are spoken in Aruba?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"" }, { "instance_id": "dev_738", "db_id": "world_1", "question": "How many official languages does Afghanistan have?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"" }, { "instance_id": "dev_739", "db_id": "world_1", "question": "How many official languages are spoken in Afghanistan?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"" }, { "instance_id": "dev_740", "db_id": "world_1", "question": "What is name of the country that speaks the largest number of languages?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_741", "db_id": "world_1", "question": "Give the name of the nation that uses the greatest amount of languages.", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_742", "db_id": "world_1", "question": "Which continent has the most diverse languages?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_743", "db_id": "world_1", "question": "Which continent speaks the most languages?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_744", "db_id": "world_1", "question": "How many countries speak both English and Dutch?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")" }, { "instance_id": "dev_745", "db_id": "world_1", "question": "What is the number of nations that use English and Dutch?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")" }, { "instance_id": "dev_746", "db_id": "world_1", "question": "What are the names of nations speak both English and French?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"" }, { "instance_id": "dev_747", "db_id": "world_1", "question": "Give the names of nations that speak both English and French.", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"" }, { "instance_id": "dev_748", "db_id": "world_1", "question": "What are the names of nations where both English and French are official languages?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"" }, { "instance_id": "dev_749", "db_id": "world_1", "question": "Give the names of countries with English and French as official languages.", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"" }, { "instance_id": "dev_750", "db_id": "world_1", "question": "What is the number of distinct continents where Chinese is spoken?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"" }, { "instance_id": "dev_751", "db_id": "world_1", "question": "How many continents speak Chinese?", "db_type": "sqlite", "db_size": 26, "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"" }, { "instance_id": "dev_752", "db_id": "world_1", "question": "What are the regions that use English or Dutch?", "db_type": "sqlite", "db_size": 26, "query": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"" }, { "instance_id": "dev_753", "db_id": "world_1", "question": "Which regions speak Dutch or English?", "db_type": "sqlite", "db_size": 26, "query": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"" }, { "instance_id": "dev_754", "db_id": "world_1", "question": "What are the countries where either English or Dutch is the official language ?", "db_type": "sqlite", "db_size": 26, "query": "select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"english\" and isofficial = \"t\" union select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"dutch\" and isofficial = \"t\"" }, { "instance_id": "dev_755", "db_id": "world_1", "question": "Which countries have either English or Dutch as an official language?", "db_type": "sqlite", "db_size": 26, "query": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"" }, { "instance_id": "dev_756", "db_id": "world_1", "question": "Which language is the most popular on the Asian continent?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1" }, { "instance_id": "dev_757", "db_id": "world_1", "question": "What is the language that is used by the largest number of Asian nations?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1" }, { "instance_id": "dev_758", "db_id": "world_1", "question": "Which languages are spoken by only one country in republic governments?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1" }, { "instance_id": "dev_759", "db_id": "world_1", "question": "What languages are only used by a single country with a republic government?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1" }, { "instance_id": "dev_760", "db_id": "world_1", "question": "Find the city with the largest population that uses English.", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1" }, { "instance_id": "dev_761", "db_id": "world_1", "question": "What is the most populace city that speaks English?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1" }, { "instance_id": "dev_762", "db_id": "world_1", "question": "Find the name, population and expected life length of asian country with the largest area?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1" }, { "instance_id": "dev_763", "db_id": "world_1", "question": "What are the name, population, and life expectancy of the largest Asian country by land?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1" }, { "instance_id": "dev_764", "db_id": "world_1", "question": "What is average life expectancy in the countries where English is not the official language?", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")" }, { "instance_id": "dev_765", "db_id": "world_1", "question": "Give the mean life expectancy of countries in which English is not the official language.", "db_type": "sqlite", "db_size": 26, "query": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")" }, { "instance_id": "dev_766", "db_id": "world_1", "question": "What is the total number of people living in the nations that do not use English?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")" }, { "instance_id": "dev_767", "db_id": "world_1", "question": "How many people live in countries that do not speak English?", "db_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")" }, { "instance_id": "dev_768", "db_id": "world_1", "question": "What is the official language spoken in the country whose head of state is Beatrix?", "db_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"" }, { "instance_id": "dev_771", "db_id": "world_1", "question": "For the countries founded before 1930, what is the total number of distinct official languages?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"" }, { "instance_id": "dev_772", "db_id": "world_1", "question": "What are the countries that have greater surface area than any country in Europe?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")" }, { "instance_id": "dev_773", "db_id": "world_1", "question": "Which countries have greater area than that of any country in Europe?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")" }, { "instance_id": "dev_774", "db_id": "world_1", "question": "What are the African countries that have a population less than any country in Asia?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")" }, { "instance_id": "dev_775", "db_id": "world_1", "question": "Which African countries have a smaller population than that of any country in Asia?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT min(population) FROM country WHERE Continent = \"Asia\")" }, { "instance_id": "dev_776", "db_id": "world_1", "question": "Which Asian countries have a population that is larger than any country in Africa?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT max(population) FROM country WHERE Continent = \"Africa\")" }, { "instance_id": "dev_777", "db_id": "world_1", "question": "What are the Asian countries which have a population larger than that of any country in Africa?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")" }, { "instance_id": "dev_778", "db_id": "world_1", "question": "What are the country codes for countries that do not speak English?", "db_type": "sqlite", "db_size": 26, "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"" }, { "instance_id": "dev_779", "db_id": "world_1", "question": "Return the country codes for countries that do not speak English.", "db_type": "sqlite", "db_size": 26, "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"" }, { "instance_id": "dev_780", "db_id": "world_1", "question": "What are the country codes of countries where people use languages other than English?", "db_type": "sqlite", "db_size": 26, "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"" }, { "instance_id": "dev_781", "db_id": "world_1", "question": "Give the country codes for countries in which people speak langauges that are not English.", "db_type": "sqlite", "db_size": 26, "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"" }, { "instance_id": "dev_783", "db_id": "world_1", "question": "Return the codes of countries that do not speak English and do not have Republics for governments.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"" }, { "instance_id": "dev_784", "db_id": "world_1", "question": "Which cities are in European countries where English is not the official language?", "db_type": "sqlite", "db_size": 26, "query": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')" }, { "instance_id": "dev_785", "db_id": "world_1", "question": "What are the names of cities in Europe for which English is not the official language?", "db_type": "sqlite", "db_size": 26, "query": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')" }, { "instance_id": "dev_786", "db_id": "world_1", "question": "Which unique cities are in Asian countries where Chinese is the official language ?", "db_type": "sqlite", "db_size": 26, "query": "select distinct t3.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode join city as t3 on t1.code = t3.countrycode where t2.isofficial = 't' and t2.language = 'chinese' and t1.continent = \"asia\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"" }, { "instance_id": "dev_788", "db_id": "world_1", "question": "What are the name, independence year, and surface area of the country with the smallest population?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1" }, { "instance_id": "dev_789", "db_id": "world_1", "question": "Give the name, year of independence, and surface area of the country that has the lowest population.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1" }, { "instance_id": "dev_790", "db_id": "world_1", "question": "What are the population, name and leader of the country with the largest area?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1" }, { "instance_id": "dev_791", "db_id": "world_1", "question": "Give the name, population, and head of state for the country that has the largest area.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72" }, { "instance_id": "dev_800", "db_id": "world_1", "question": "What are the names and areas of countries with the top 5 largest area?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5" }, { "instance_id": "dev_801", "db_id": "world_1", "question": "Return the names and surface areas of the 5 largest countries.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5" }, { "instance_id": "dev_802", "db_id": "world_1", "question": "What are names of countries with the top 3 largest population?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3" }, { "instance_id": "dev_803", "db_id": "world_1", "question": "Return the names of the 3 most populated countries.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3" }, { "instance_id": "dev_804", "db_id": "world_1", "question": "What are the names of the nations with the 3 lowest populations?", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3" }, { "instance_id": "dev_805", "db_id": "world_1", "question": "Return the names of the 3 countries with the fewest people.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3" }, { "instance_id": "dev_806", "db_id": "world_1", "question": "how many countries are in Asia?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"" }, { "instance_id": "dev_807", "db_id": "world_1", "question": "Count the number of countries in Asia.", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"" }, { "instance_id": "dev_809", "db_id": "world_1", "question": "Give the names of countries that are in Europe and have a population equal to 80000.", "db_type": "sqlite", "db_size": 26, "query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000" }, { "instance_id": "dev_812", "db_id": "world_1", "question": "What are the cities whose population is between 160000 and 900000?", "db_type": "sqlite", "db_size": 26, "query": "SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000" }, { "instance_id": "dev_813", "db_id": "world_1", "question": "Return the names of cities that have a population between 160000 and 900000 .", "db_type": "sqlite", "db_size": 26, "query": "select name from city where population between 160000 and 900000" }, { "instance_id": "dev_814", "db_id": "world_1", "question": "Which language is spoken by the largest number of countries?", "db_type": "sqlite", "db_size": 26, "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_815", "db_id": "world_1", "question": "Give the language that is spoken in the most countries.", "db_type": "sqlite", "db_size": 26, "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_816", "db_id": "world_1", "question": "What is the language spoken by the largest percentage of people in each country?", "db_type": "sqlite", "db_size": 26, "query": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 26, "query": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode" }, { "instance_id": "dev_818", "db_id": "world_1", "question": "What is the total number of countries where Spanish is spoken by the largest percentage of people?", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode" }, { "instance_id": "dev_819", "db_id": "world_1", "question": "Count the number of countries for which Spanish is the predominantly spoken language.", "db_type": "sqlite", "db_size": 26, "query": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode" }, { "instance_id": "dev_820", "db_id": "world_1", "question": "What are the codes of countries where Spanish is spoken by the largest percentage of people?", "db_type": "sqlite", "db_size": 26, "query": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode" }, { "instance_id": "dev_821", "db_id": "world_1", "question": "Return the codes of countries for which Spanish is the predominantly spoken language.", "db_type": "sqlite", "db_size": 26, "query": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode" }, { "instance_id": "dev_822", "db_id": "orchestra", "question": "How many conductors are there?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM conductor" }, { "instance_id": "dev_823", "db_id": "orchestra", "question": "Count the number of conductors.", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(*) FROM conductor" }, { "instance_id": "dev_824", "db_id": "orchestra", "question": "List the names of conductors in ascending order of age.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor ORDER BY Age ASC" }, { "instance_id": "dev_825", "db_id": "orchestra", "question": "What are the names of conductors, ordered by age?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor ORDER BY Age ASC" }, { "instance_id": "dev_826", "db_id": "orchestra", "question": "What are the names of conductors whose nationalities are not \"USA\"?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'" }, { "instance_id": "dev_827", "db_id": "orchestra", "question": "Return the names of conductors that do not have the nationality \"USA\".", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'" }, { "instance_id": "dev_828", "db_id": "orchestra", "question": "What are the record companies of orchestras in descending order of years in which they were founded?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC" }, { "instance_id": "dev_829", "db_id": "orchestra", "question": "Return the record companies of orchestras, sorted descending by the years in which they were founded.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC" }, { "instance_id": "dev_830", "db_id": "orchestra", "question": "What is the average attendance of shows?", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(Attendance) FROM SHOW" }, { "instance_id": "dev_831", "db_id": "orchestra", "question": "Return the average attendance across all shows.", "db_type": "sqlite", "db_size": 23, "query": "SELECT avg(Attendance) FROM SHOW" }, { "instance_id": "dev_832", "db_id": "orchestra", "question": "What are the maximum and minimum share of performances whose type is not \"Live final\".", "db_type": "sqlite", "db_size": 23, "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"" }, { "instance_id": "dev_833", "db_id": "orchestra", "question": "Return the maximum and minimum shares for performances that do not have the type \"Live final\".", "db_type": "sqlite", "db_size": 23, "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"" }, { "instance_id": "dev_834", "db_id": "orchestra", "question": "How many different nationalities do conductors have?", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(DISTINCT Nationality) FROM conductor" }, { "instance_id": "dev_835", "db_id": "orchestra", "question": "Count the number of different nationalities of conductors.", "db_type": "sqlite", "db_size": 23, "query": "SELECT count(DISTINCT Nationality) FROM conductor" }, { "instance_id": "dev_836", "db_id": "orchestra", "question": "List names of conductors in descending order of years of work.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC" }, { "instance_id": "dev_837", "db_id": "orchestra", "question": "What are the names of conductors, sorted descending by the number of years they have worked?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC" }, { "instance_id": "dev_838", "db_id": "orchestra", "question": "List the name of the conductor with the most years of work.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1" }, { "instance_id": "dev_839", "db_id": "orchestra", "question": "What is the name of the conductor who has worked the greatest number of years?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1" }, { "instance_id": "dev_840", "db_id": "orchestra", "question": "Show the names of conductors and the orchestras they have conducted.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID" }, { "instance_id": "dev_841", "db_id": "orchestra", "question": "What are the names of conductors as well as the corresonding orchestras that they have conducted?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID" }, { "instance_id": "dev_842", "db_id": "orchestra", "question": "Show the names of conductors that have conducted more than one orchestras.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1" }, { "instance_id": "dev_843", "db_id": "orchestra", "question": "What are the names of conductors who have conducted at more than one orchestra?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1" }, { "instance_id": "dev_844", "db_id": "orchestra", "question": "Show the name of the conductor that has conducted the most number of orchestras.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_845", "db_id": "orchestra", "question": "What is the name of the conductor who has conducted the most orchestras?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_846", "db_id": "orchestra", "question": "Please show the name of the conductor that has conducted orchestras founded after 2008.", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008" }, { "instance_id": "dev_847", "db_id": "orchestra", "question": "What are the names of conductors who have conducted orchestras founded after the year 2008?", "db_type": "sqlite", "db_size": 23, "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008" }, { "instance_id": "dev_848", "db_id": "orchestra", "question": "Please show the different record companies and the corresponding number of orchestras.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company" }, { "instance_id": "dev_849", "db_id": "orchestra", "question": "How many orchestras does each record company manage?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company" }, { "instance_id": "dev_850", "db_id": "orchestra", "question": "Please show the record formats of orchestras in ascending order of count.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC" }, { "instance_id": "dev_851", "db_id": "orchestra", "question": "What are the major record formats of orchestras, sorted by their frequency?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC" }, { "instance_id": "dev_852", "db_id": "orchestra", "question": "List the record company shared by the most number of orchestras.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_853", "db_id": "orchestra", "question": "What is the record company used by the greatest number of orchestras?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_854", "db_id": "orchestra", "question": "List the names of orchestras that have no performance.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)" }, { "instance_id": "dev_855", "db_id": "orchestra", "question": "What are the orchestras that do not have any performances?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)" }, { "instance_id": "dev_856", "db_id": "orchestra", "question": "Show the record companies shared by orchestras founded before 2003 and after 2003.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 23, "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003" }, { "instance_id": "dev_858", "db_id": "orchestra", "question": "Find the number of orchestras whose record format is \"CD\" or \"DVD\".", "db_type": "sqlite", "db_size": 23, "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"" }, { "instance_id": "dev_859", "db_id": "orchestra", "question": "Count the number of orchestras that have CD or DVD as their record format.", "db_type": "sqlite", "db_size": 23, "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"" }, { "instance_id": "dev_860", "db_id": "orchestra", "question": "Show the years in which orchestras that have given more than one performance are founded.", "db_type": "sqlite", "db_size": 23, "query": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1" }, { "instance_id": "dev_861", "db_id": "orchestra", "question": "What are years of founding for orchestras that have had more than a single performance?", "db_type": "sqlite", "db_size": 23, "query": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1" }, { "instance_id": "dev_862", "db_id": "network_1", "question": "How many high schoolers are there?", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Highschooler" }, { "instance_id": "dev_863", "db_id": "network_1", "question": "Count the number of high schoolers.", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Highschooler" }, { "instance_id": "dev_864", "db_id": "network_1", "question": "Show the names and grades of each high schooler.", "db_type": "sqlite", "db_size": 7, "query": "SELECT name , grade FROM Highschooler" }, { "instance_id": "dev_865", "db_id": "network_1", "question": "What are the names and grades for each high schooler?", "db_type": "sqlite", "db_size": 7, "query": "SELECT name , grade FROM Highschooler" }, { "instance_id": "dev_866", "db_id": "network_1", "question": "Show all the grades of the high schoolers.", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler" }, { "instance_id": "dev_867", "db_id": "network_1", "question": "What is the grade of each high schooler?", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler" }, { "instance_id": "dev_868", "db_id": "network_1", "question": "What grade is Kyle in?", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"" }, { "instance_id": "dev_869", "db_id": "network_1", "question": "Return the grade for the high schooler named Kyle.", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"" }, { "instance_id": "dev_870", "db_id": "network_1", "question": "Show the names of all high schoolers in grade 10.", "db_type": "sqlite", "db_size": 7, "query": "SELECT name FROM Highschooler WHERE grade = 10" }, { "instance_id": "dev_871", "db_id": "network_1", "question": "What are the names of all high schoolers in grade 10?", "db_type": "sqlite", "db_size": 7, "query": "SELECT name FROM Highschooler WHERE grade = 10" }, { "instance_id": "dev_872", "db_id": "network_1", "question": "Show the ID of the high schooler named Kyle.", "db_type": "sqlite", "db_size": 7, "query": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"" }, { "instance_id": "dev_873", "db_id": "network_1", "question": "What is Kyle's id?", "db_type": "sqlite", "db_size": 7, "query": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"" }, { "instance_id": "dev_874", "db_id": "network_1", "question": "How many high schoolers are there in grade 9 or 10?", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10" }, { "instance_id": "dev_875", "db_id": "network_1", "question": "Count the number of high schoolers in grades 9 or 10.", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10" }, { "instance_id": "dev_876", "db_id": "network_1", "question": "Show the number of high schoolers for each grade.", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade , count(*) FROM Highschooler GROUP BY grade" }, { "instance_id": "dev_877", "db_id": "network_1", "question": "How many high schoolers are in each grade?", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade , count(*) FROM Highschooler GROUP BY grade" }, { "instance_id": "dev_878", "db_id": "network_1", "question": "Which grade has the most high schoolers?", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_879", "db_id": "network_1", "question": "Return the grade that has the greatest number of high schoolers.", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_880", "db_id": "network_1", "question": "Show me all grades that have at least 4 students.", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4" }, { "instance_id": "dev_881", "db_id": "network_1", "question": "Which grades have 4 or more high schoolers?", "db_type": "sqlite", "db_size": 7, "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4" }, { "instance_id": "dev_882", "db_id": "network_1", "question": "Show the student IDs and numbers of friends corresponding to each.", "db_type": "sqlite", "db_size": 7, "query": "SELECT student_id , count(*) FROM Friend GROUP BY student_id" }, { "instance_id": "dev_883", "db_id": "network_1", "question": "How many friends does each student have?", "db_type": "sqlite", "db_size": 7, "query": "SELECT student_id , count(*) FROM Friend GROUP BY student_id" }, { "instance_id": "dev_884", "db_id": "network_1", "question": "Show the names of high school students and their corresponding number of friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id" }, { "instance_id": "dev_885", "db_id": "network_1", "question": "What are the names of the high schoolers and how many friends does each have?", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id" }, { "instance_id": "dev_886", "db_id": "network_1", "question": "What is the name of the high schooler who has the greatest number of friends?", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_887", "db_id": "network_1", "question": "Return the name of the high school student with the most friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_888", "db_id": "network_1", "question": "Show the names of high schoolers who have at least 3 friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3" }, { "instance_id": "dev_889", "db_id": "network_1", "question": "What are the names of high schoolers who have 3 or more friends?", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3" }, { "instance_id": "dev_890", "db_id": "network_1", "question": "Show the names of all of the high schooler Kyle's friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"" }, { "instance_id": "dev_891", "db_id": "network_1", "question": "Return the names of friends of the high school student Kyle.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"" }, { "instance_id": "dev_892", "db_id": "network_1", "question": "How many friends does the high school student Kyle have?", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"" }, { "instance_id": "dev_893", "db_id": "network_1", "question": "Count the number of friends Kyle has.", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"" }, { "instance_id": "dev_894", "db_id": "network_1", "question": "Show ids of all students who do not have any friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend" }, { "instance_id": "dev_895", "db_id": "network_1", "question": "What are the ids of high school students who do not have friends?", "db_type": "sqlite", "db_size": 7, "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend" }, { "instance_id": "dev_896", "db_id": "network_1", "question": "Show names of all high school students who do not have any friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id" }, { "instance_id": "dev_897", "db_id": "network_1", "question": "What are the names of students who have no friends?", "db_type": "sqlite", "db_size": 7, "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id" }, { "instance_id": "dev_898", "db_id": "network_1", "question": "Show the ids of high schoolers who have friends and are also liked by someone else.", "db_type": "sqlite", "db_size": 7, "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes" }, { "instance_id": "dev_899", "db_id": "network_1", "question": "What are the ids of students who both have friends and are liked?", "db_type": "sqlite", "db_size": 7, "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes" }, { "instance_id": "dev_900", "db_id": "network_1", "question": "Show name of all students who have some friends and also are liked by someone else.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id" }, { "instance_id": "dev_901", "db_id": "network_1", "question": "What are the names of high schoolers who both have friends and are liked?", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id" }, { "instance_id": "dev_902", "db_id": "network_1", "question": "Count the number of likes for each student id.", "db_type": "sqlite", "db_size": 7, "query": "SELECT student_id , count(*) FROM Likes GROUP BY student_id" }, { "instance_id": "dev_903", "db_id": "network_1", "question": "How many likes correspond to each student id?", "db_type": "sqlite", "db_size": 7, "query": "SELECT student_id , count(*) FROM Likes GROUP BY student_id" }, { "instance_id": "dev_904", "db_id": "network_1", "question": "Show the names of high schoolers who have likes, and numbers of likes for each.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id" }, { "instance_id": "dev_905", "db_id": "network_1", "question": "What are the names of high schoolers who have likes, and how many likes does each have?", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id" }, { "instance_id": "dev_906", "db_id": "network_1", "question": "What is the name of the high schooler who has the greatest number of likes?", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_907", "db_id": "network_1", "question": "Give the name of the student with the most likes.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_908", "db_id": "network_1", "question": "Show the names of students who have at least 2 likes.", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2" }, { "instance_id": "dev_909", "db_id": "network_1", "question": "What are the names of students who have 2 or more likes?", "db_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 7, "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2" }, { "instance_id": "dev_912", "db_id": "network_1", "question": "How many likes does Kyle have?", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"" }, { "instance_id": "dev_913", "db_id": "network_1", "question": "Return the number of likes that the high schooler named Kyle has.", "db_type": "sqlite", "db_size": 7, "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"" }, { "instance_id": "dev_914", "db_id": "network_1", "question": "Find the average grade of all students who have some friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)" }, { "instance_id": "dev_915", "db_id": "network_1", "question": "What is the average grade of students who have friends?", "db_type": "sqlite", "db_size": 7, "query": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)" }, { "instance_id": "dev_916", "db_id": "network_1", "question": "Find the minimum grade of students who have no friends.", "db_type": "sqlite", "db_size": 7, "query": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)" }, { "instance_id": "dev_917", "db_id": "network_1", "question": "What is the lowest grade of students who do not have any friends?", "db_type": "sqlite", "db_size": 7, "query": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)" }, { "instance_id": "dev_918", "db_id": "dog_kennels", "question": "Which states have both owners and professionals living there?", "db_type": "sqlite", "db_size": 49, "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals" }, { "instance_id": "dev_919", "db_id": "dog_kennels", "question": "Find the states where both owners and professionals live.", "db_type": "sqlite", "db_size": 49, "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals" }, { "instance_id": "dev_920", "db_id": "dog_kennels", "question": "What is the average age of the dogs who have gone through any treatments?", "db_type": "sqlite", "db_size": 49, "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )" }, { "instance_id": "dev_921", "db_id": "dog_kennels", "question": "Find the average age of the dogs who went through treatments.", "db_type": "sqlite", "db_size": 49, "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2" }, { "instance_id": "dev_924", "db_id": "dog_kennels", "question": "Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .", "db_type": "sqlite", "db_size": 49, "query": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )" }, { "instance_id": "dev_926", "db_id": "dog_kennels", "question": "Which first names are used for professionals or owners but are not used as dog names?", "db_type": "sqlite", "db_size": 49, "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs" }, { "instance_id": "dev_928", "db_id": "dog_kennels", "question": "Which professional did not operate any treatment on dogs? List the professional's id, role and email.", "db_type": "sqlite", "db_size": 49, "query": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id" }, { "instance_id": "dev_930", "db_id": "dog_kennels", "question": "Which owner owns the most dogs? List the owner id, first name and last name.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_931", "db_id": "dog_kennels", "question": "Return the owner id, first name and last name of the owner who has the most dogs.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_932", "db_id": "dog_kennels", "question": "Which professionals have done at least two treatments? List the professional's id, role, and first name.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2" }, { "instance_id": "dev_934", "db_id": "dog_kennels", "question": "What is the name of the breed with the most dogs?", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_935", "db_id": "dog_kennels", "question": "Which breed do the most dogs have? Give me the breed name.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1" }, { "instance_id": "dev_938", "db_id": "dog_kennels", "question": "What is the description of the treatment type that costs the least money in total?", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1" }, { "instance_id": "dev_939", "db_id": "dog_kennels", "question": "Give me the description of the treatment type whose total cost is the lowest.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1" }, { "instance_id": "dev_942", "db_id": "dog_kennels", "question": "Which professionals have done at least two types of treatments? List the professional id and cell phone.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2" }, { "instance_id": "dev_943", "db_id": "dog_kennels", "question": "Find the id and cell phone of the professionals who operate two or more types of treatments.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )" }, { "instance_id": "dev_946", "db_id": "dog_kennels", "question": "List the date of each treatment, together with the first name of the professional who operated it.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id" }, { "instance_id": "dev_947", "db_id": "dog_kennels", "question": "What are the date and the operating professional's first name of each treatment?", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id" }, { "instance_id": "dev_948", "db_id": "dog_kennels", "question": "List the cost of each treatment and the corresponding treatment type description.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code" }, { "instance_id": "dev_949", "db_id": "dog_kennels", "question": "What are the cost and treatment type description of each treatment?", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code" }, { "instance_id": "dev_950", "db_id": "dog_kennels", "question": "List each owner's first name, last name, and the size of his for her dog.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id" }, { "instance_id": "dev_951", "db_id": "dog_kennels", "question": "What are each owner's first name, last name, and the size of their dog?", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id" }, { "instance_id": "dev_952", "db_id": "dog_kennels", "question": "List pairs of the owner's first name and the dogs's name.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id" }, { "instance_id": "dev_953", "db_id": "dog_kennels", "question": "What are each owner's first name and their dogs's name?", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id" }, { "instance_id": "dev_954", "db_id": "dog_kennels", "question": "List the names of the dogs of the rarest breed and the treatment dates of them.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )" }, { "instance_id": "dev_955", "db_id": "dog_kennels", "question": "Which dogs are of the rarest breed? Show their names and treatment dates.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'" }, { "instance_id": "dev_957", "db_id": "dog_kennels", "question": "Find the first names of owners living in Virginia and the names of dogs they own.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id" }, { "instance_id": "dev_959", "db_id": "dog_kennels", "question": "Find the arriving date and the departing date of the dogs that received a treatment.", "db_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id" }, { "instance_id": "dev_960", "db_id": "dog_kennels", "question": "List the last name of the owner owning the youngest dog.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )" }, { "instance_id": "dev_961", "db_id": "dog_kennels", "question": "Who owns the youngest dog? Give me his or her last name.", "db_type": "sqlite", "db_size": 49, "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'" }, { "instance_id": "dev_964", "db_id": "dog_kennels", "question": "What are the arriving date and the departing date of all the dogs?", "db_type": "sqlite", "db_size": 49, "query": "SELECT date_arrived , date_departed FROM Dogs" }, { "instance_id": "dev_965", "db_id": "dog_kennels", "question": "List the arrival date and the departure date for all the dogs.", "db_type": "sqlite", "db_size": 49, "query": "SELECT date_arrived , date_departed FROM Dogs" }, { "instance_id": "dev_966", "db_id": "dog_kennels", "question": "How many dogs went through any treatments?", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(DISTINCT dog_id) FROM Treatments" }, { "instance_id": "dev_967", "db_id": "dog_kennels", "question": "Count the number of dogs that went through a treatment.", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(DISTINCT dog_id) FROM Treatments" }, { "instance_id": "dev_968", "db_id": "dog_kennels", "question": "How many professionals have performed any treatment to dogs?", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(DISTINCT professional_id) FROM Treatments" }, { "instance_id": "dev_969", "db_id": "dog_kennels", "question": "Find the number of professionals who have ever treated dogs.", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(DISTINCT professional_id) FROM Treatments" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'" }, { "instance_id": "dev_974", "db_id": "dog_kennels", "question": "How many dogs have an age below the average?", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )" }, { "instance_id": "dev_975", "db_id": "dog_kennels", "question": "Count the number of dogs of an age below the average.", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )" }, { "instance_id": "dev_976", "db_id": "dog_kennels", "question": "How much does the most recent treatment cost?", "db_type": "sqlite", "db_size": 49, "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1" }, { "instance_id": "dev_977", "db_id": "dog_kennels", "question": "Show me the cost of the most recently performed treatment.", "db_type": "sqlite", "db_size": 49, "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1" }, { "instance_id": "dev_978", "db_id": "dog_kennels", "question": "How many dogs have not gone through any treatment?", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )" }, { "instance_id": "dev_979", "db_id": "dog_kennels", "question": "Tell me the number of dogs that have not received any treatment .", "db_type": "sqlite", "db_size": 49, "query": "select count(*) from dogs where dog_id not in ( select dog_id from treatments )" }, { "instance_id": "dev_980", "db_id": "dog_kennels", "question": "How many owners temporarily do not have any dogs?", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )" }, { "instance_id": "dev_981", "db_id": "dog_kennels", "question": "Find the number of owners who do not own any dogs at this moment.", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )" }, { "instance_id": "dev_982", "db_id": "dog_kennels", "question": "How many professionals did not operate any treatment on dogs?", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )" }, { "instance_id": "dev_983", "db_id": "dog_kennels", "question": "Find the number of professionals who have not treated any dogs.", "db_type": "sqlite", "db_size": 49, "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1" }, { "instance_id": "dev_986", "db_id": "dog_kennels", "question": "What is the average age of all the dogs?", "db_type": "sqlite", "db_size": 49, "query": "SELECT avg(age) FROM Dogs" }, { "instance_id": "dev_987", "db_id": "dog_kennels", "question": "Compute the average age of all the dogs.", "db_type": "sqlite", "db_size": 49, "query": "SELECT avg(age) FROM Dogs" }, { "instance_id": "dev_988", "db_id": "dog_kennels", "question": "What is the age of the oldest dog?", "db_type": "sqlite", "db_size": 49, "query": "SELECT max(age) FROM Dogs" }, { "instance_id": "dev_989", "db_id": "dog_kennels", "question": "Tell me the age of the oldest dog.", "db_type": "sqlite", "db_size": 49, "query": "SELECT max(age) FROM Dogs" }, { "instance_id": "dev_990", "db_id": "dog_kennels", "question": "How much does each charge type costs? List both charge type and amount.", "db_type": "sqlite", "db_size": 49, "query": "SELECT charge_type , charge_amount FROM Charges" }, { "instance_id": "dev_991", "db_id": "dog_kennels", "question": "List each charge type and its amount.", "db_type": "sqlite", "db_size": 49, "query": "SELECT charge_type , charge_amount FROM Charges" }, { "instance_id": "dev_992", "db_id": "dog_kennels", "question": "How much does the most expensive charge type costs?", "db_type": "sqlite", "db_size": 49, "query": "SELECT max(charge_amount) FROM Charges" }, { "instance_id": "dev_993", "db_id": "dog_kennels", "question": "What is the charge amount of the most expensive charge type?", "db_type": "sqlite", "db_size": 49, "query": "SELECT max(charge_amount) FROM Charges" }, { "instance_id": "dev_994", "db_id": "dog_kennels", "question": "List the email, cell phone and home phone of all the professionals.", "db_type": "sqlite", "db_size": 49, "query": "SELECT email_address , cell_number , home_phone FROM professionals" }, { "instance_id": "dev_995", "db_id": "dog_kennels", "question": "What are the email, cell phone and home phone of each professional?", "db_type": "sqlite", "db_size": 49, "query": "SELECT email_address , cell_number , home_phone FROM professionals" }, { "instance_id": "dev_996", "db_id": "dog_kennels", "question": "What are all the possible breed type and size type combinations?", "db_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT breed_code , size_code FROM dogs" }, { "instance_id": "dev_997", "db_id": "dog_kennels", "question": "Find the distinct breed type and size type combinations for dogs.", "db_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT breed_code , size_code FROM dogs" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code" }, { "instance_id": "dev_999", "db_id": "dog_kennels", "question": "What are each professional's first name and description of the treatment they have performed?", "db_type": "sqlite", "db_size": 49, "query": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code" }, { "instance_id": "dev_1000", "db_id": "singer", "question": "How many singers are there?", "db_type": "sqlite", "db_size": 10, "query": "SELECT count(*) FROM singer" }, { "instance_id": "dev_1001", "db_id": "singer", "question": "What is the count of singers?", "db_type": "sqlite", "db_size": 10, "query": "SELECT count(*) FROM singer" }, { "instance_id": "dev_1002", "db_id": "singer", "question": "List the name of singers in ascending order of net worth.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC" }, { "instance_id": "dev_1003", "db_id": "singer", "question": "What are the names of singers ordered by ascending net worth?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC" }, { "instance_id": "dev_1004", "db_id": "singer", "question": "What are the birth year and citizenship of singers?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Birth_Year , Citizenship FROM singer" }, { "instance_id": "dev_1005", "db_id": "singer", "question": "What are the birth years and citizenships of the singers?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Birth_Year , Citizenship FROM singer" }, { "instance_id": "dev_1006", "db_id": "singer", "question": "List the name of singers whose citizenship is not \"France\".", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer WHERE Citizenship != \"France\"" }, { "instance_id": "dev_1007", "db_id": "singer", "question": "What are the names of the singers who are not French citizens?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer WHERE Citizenship != \"France\"" }, { "instance_id": "dev_1008", "db_id": "singer", "question": "Show the name of singers whose birth year is either 1948 or 1949?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949" }, { "instance_id": "dev_1009", "db_id": "singer", "question": "What are the names of the singers whose birth years are either 1948 or 1949?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949" }, { "instance_id": "dev_1010", "db_id": "singer", "question": "What is the name of the singer with the largest net worth?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1" }, { "instance_id": "dev_1011", "db_id": "singer", "question": "What is the name of the singer who is worth the most?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1" }, { "instance_id": "dev_1012", "db_id": "singer", "question": "Show different citizenship of singers and the number of singers of each citizenship.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship" }, { "instance_id": "dev_1013", "db_id": "singer", "question": "For each citizenship, how many singers are from that country?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship" }, { "instance_id": "dev_1014", "db_id": "singer", "question": "Please show the most common citizenship of singers.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1" }, { "instance_id": "dev_1015", "db_id": "singer", "question": "What is the most common singer citizenship ?", "db_type": "sqlite", "db_size": 10, "query": "select citizenship from singer group by citizenship order by count(*) desc limit 1" }, { "instance_id": "dev_1016", "db_id": "singer", "question": "Show different citizenships and the maximum net worth of singers of each citizenship.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship" }, { "instance_id": "dev_1017", "db_id": "singer", "question": "For each citizenship, what is the maximum net worth?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship" }, { "instance_id": "dev_1018", "db_id": "singer", "question": "Show titles of songs and names of singers.", "db_type": "sqlite", "db_size": 10, "query": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID" }, { "instance_id": "dev_1019", "db_id": "singer", "question": "What are the song titles and singer names?", "db_type": "sqlite", "db_size": 10, "query": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID" }, { "instance_id": "dev_1020", "db_id": "singer", "question": "Show distinct names of singers that have songs with sales more than 300000.", "db_type": "sqlite", "db_size": 10, "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000" }, { "instance_id": "dev_1021", "db_id": "singer", "question": "what are the different names of the singers that have sales more than 300000?", "db_type": "sqlite", "db_size": 10, "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000" }, { "instance_id": "dev_1022", "db_id": "singer", "question": "Show the names of singers that have more than one song.", "db_type": "sqlite", "db_size": 10, "query": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1" }, { "instance_id": "dev_1023", "db_id": "singer", "question": "What are the names of the singers that have more than one songs?", "db_type": "sqlite", "db_size": 10, "query": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1" }, { "instance_id": "dev_1024", "db_id": "singer", "question": "Show the names of singers and the total sales of their songs.", "db_type": "sqlite", "db_size": 10, "query": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name" }, { "instance_id": "dev_1025", "db_id": "singer", "question": "For each singer name, what is the total sales for their songs?", "db_type": "sqlite", "db_size": 10, "query": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name" }, { "instance_id": "dev_1026", "db_id": "singer", "question": "List the name of singers that do not have any song.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)" }, { "instance_id": "dev_1027", "db_id": "singer", "question": "What is the sname of every sing that does not have any song?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)" }, { "instance_id": "dev_1028", "db_id": "singer", "question": "Show the citizenship shared by singers with birth year before 1945 and after 1955.", "db_type": "sqlite", "db_size": 10, "query": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955" }, { "instance_id": "dev_1029", "db_id": "singer", "question": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955?", "db_type": "sqlite", "db_size": 10, "query": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955" }, { "instance_id": "dev_1030", "db_id": "real_estate_properties", "question": "How many available features are there in total?", "db_type": "sqlite", "db_size": 37, "query": "SELECT count(*) FROM Other_Available_Features" }, { "instance_id": "dev_1031", "db_id": "real_estate_properties", "question": "What is the feature type name of feature AirCon?", "db_type": "sqlite", "db_size": 37, "query": "SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = \"AirCon\"" }, { "instance_id": "dev_1032", "db_id": "real_estate_properties", "question": "Show the property type descriptions of properties belonging to that code.", "db_type": "sqlite", "db_size": 37, "query": "SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code" }, { "instance_id": "dev_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_type": "sqlite", "db_size": 37, "query": "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" } ]