|
db_id,question,query,simple_question,simple_query,source
|
|
car_1,What is the average weight and year for each year?,"SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;",What is the average weight and year?,SELECT avg(Weight) FROM CARS_DATA,spider-dev
|
|
car_1,What is the maximum accelerate for different number of cylinders?,"SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;",What is the maximum accelerate?,SELECT max(Accelerate) FROM CARS_DATA,spider-dev
|
|
car_1,What is the maximum accelerate for all the different cylinders?,"SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;",What is the maximum accelerate?,SELECT max(Accelerate) FROM CARS_DATA,spider-dev
|
|
concert_singer,Show all countries and the number of singers in each country.,"SELECT country , count(*) FROM singer GROUP BY country",Show all countries.,SELECT country FROM singer,spider-dev
|
|
concert_singer,How many singers are from each country?,"SELECT country , count(*) FROM singer GROUP BY country",How many singers are?,SELECT count(*) FROM singer,spider-dev
|
|
concert_singer,Show the stadium name and the number of concerts in each stadium.,"SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id",Show the stadium names.,SELECT name FROM stadium,spider-dev
|
|
course_teach,Show different hometown of teachers and the number of teachers from each hometown.,"SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown",Show different hometown of teachers.,SELECT Hometown FROM teacher,spider-dev
|
|
course_teach,"For each hometown, how many teachers are there?","SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown",How many teachers are there?,SELECT COUNT(*) FROM teacher,spider-dev
|
|
course_teach,Show names of teachers and the number of courses they teach.,"SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name",Show names of teachers.,SELECT Name FROM teacher,spider-dev
|
|
course_teach,What are the names of the teachers and how many courses do they teach?,"SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name",What are the names of the teachers?,SELECT Name FROM teacher,spider-dev
|
|
orchestra,Please show the different record companies and the corresponding number of orchestras.,"SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company",Please show the different record companies.,SELECT Record_Company FROM orchestra ,spider-dev
|
|
orchestra,How many orchestras does each record company manage?,"SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company",How many orchestras does record companies manage?,SELECT COUNT(*) FROM orchestra,spider-dev
|
|
pets_1,Find the maximum weight for each type of pet. List the maximum weight and pet type.,"SELECT max(weight) , petType FROM pets GROUP BY petType",List the maximum weight,SELECT max(weight) FROM pets,spider-dev
|
|
pets_1,List the maximum weight and type for each type of pet.,"SELECT max(weight) , petType FROM pets GROUP BY petType",List the type of pet.,SELECT petType FROM pets,spider-dev
|
|
pets_1,Find the average and maximum age for each type of pet.,"SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype",Find the average and maximum age of pet.,"SELECT avg(pet_age) , max(pet_age) FROM pets",spider-dev
|
|
pets_1,What is the average and maximum age for each pet type?,"SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype",What is the average and maximum age of pet?,"SELECT avg(pet_age) , max(pet_age) FROM pets",spider-dev
|
|
poker_player,What are different nationalities of people and the corresponding number of people from each nation?,"SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality",What are different nationalities of people?,SELECT Nationality FROM people,spider-dev
|
|
singer,Show different citizenship of singers and the number of singers of each citizenship.,"SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship",Show different citizenship of singers.,SELECT Citizenship FROM singer,spider-dev
|
|
singer,Show different citizenships and the maximum net worth of singers of each citizenship.,"SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship",Show the maximum net worth of singers .,SELECT max(Net_Worth_Millions) FROM singer,spider-dev
|
|
tvshow,List each language and the number of TV Channels using it.,"SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE",List each language of TV Channels.,SELECT LANGUAGE FROM TV_Channel,spider-dev
|
|
tvshow,Find the number of cartoons directed by each of the listed directors.,"SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by",Find the number of cartoons.,SELECT count(*) FROM cartoon,spider-dev
|
|
tvshow,How many cartoons did each director create?,"SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by",How many cartoons did all director create?,SELECT count(*) FROM cartoon,spider-dev
|
|
world_1,Find the number of cities in each district whose population is greater than the average population of cities?,"SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District",Find the districts whose population is greater than the average population of cities?,SELECT District FROM city WHERE Population > (SELECT avg(Population) FROM city) ,spider-dev
|
|
world_1,What is the language spoken by the largest percentage of people in each country?,"SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode",What is the largest percentage of people?,SELECT max(Percentage) FROM countrylanguage,spider-dev
|
|
wta_1,Find the average ranking for each player and their first name.,"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",Find the average ranking of players.,SELECT avg(ranking) FROM rankings,spider-dev
|
|
wta_1,"What are the first names of all players, and their average rankings?","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",What are the first names of all players?,SELECT first_name FROM players,spider-dev
|
|
wta_1,find the number of players for each country.,"SELECT count(*) , country_code FROM players GROUP BY country_code",find the number of players.,SELECT count(*) FROM players,spider-dev
|
|
wta_1,How many players are from each country?,"SELECT count(*) , country_code FROM players GROUP BY country_code",How many players are?,SELECT count(*) FROM players,spider-dev
|
|
wta_1,Find the total number of tours for each ranking date.,"SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date",Find the total number of tours.,SELECT sum(tours) FROM rankings,spider-dev
|
|
wta_1,How many total tours were there for each ranking date?,"SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date",How many total tours were there?,SELECT sum(tours) FROM rankings,spider-dev
|
|
wta_1,Find the number of matches happened in each year.,"SELECT count(*) , YEAR FROM matches GROUP BY YEAR",Find the number of matches happened.,SELECT count(*) FROM matches,spider-dev
|
|
wta_1,How many matches were played in each year?,"SELECT count(*) , YEAR FROM matches GROUP BY YEAR",How many matches were played?,SELECT count(*) FROM matches,spider-dev
|
|
wta_1,Find the number of players for each hand type.,"SELECT count(*) , hand FROM players GROUP BY hand",Find the number of players.,SELECT count(*) FROM players,spider-dev
|
|
wta_1,How many players are there for each hand type?,"SELECT count(*) , hand FROM players GROUP BY hand",How many players are there?,SELECT count(*) FROM players,spider-dev
|
|
allergy_1,Show all allergy types and the number of allergies in each type.,"SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype",Show all allergy types.,SELECT allergytype FROM Allergy_type,spider-train
|
|
allergy_1,What are the allergy types and how many allergies correspond to each one?,"SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype",What are the allergy types?,SELECT allergytype FROM Allergy_type,spider-train
|
|
allergy_1,Show all majors and corresponding number of students.,"SELECT major , count(*) FROM Student GROUP BY major",Show all majors.,SELECT major FROM Student,spider-train
|
|
allergy_1,How many students are there for each major?,"SELECT major , count(*) FROM Student GROUP BY major",How many students are?,SELECT count(*) FROM Student,spider-train
|
|
baseball_1,How many players enter hall of fame each year?,"SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;",How many players enter hall?,SELECT count(*) FROM hall_of_fame,spider-train
|
|
baseball_1,Count the number of players who enter hall of fame for each year.,"SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;",Count the number of players who enter hall of fame.,SELECT yearid FROM hall_of_fame,spider-train
|
|
baseball_1,What is the average number of attendance at home games for each year?,"SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;",What is the average number of attendance at home games?,SELECT avg(attendance) FROM home_game,spider-train
|
|
baseball_1,"For each year, return the year and the average number of attendance at home games.","SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;",Return the average number of attendance.,SELECT avg(attendance) FROM home_game,spider-train
|
|
behavior_monitoring,What are the line 1 and average monthly rentals of all student addresses?,"SELECT T1.line_1 , avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id",What is the average monthly rentals?,SELECT avg(monthly_rental) FROM Student_Addresses,spider-train
|
|
body_builder,List each birth place along with the number of people from there.,"SELECT Birth_Place , COUNT(*) FROM people GROUP BY Birth_Place",List each birth place.,SELECT Birth_Place FROM people,spider-train
|
|
candidate_poll,how many people are there whose weight is higher than 85 for each gender?,"SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex",how many people are there whose weight is higher than 85?,SELECT count(*) FROM people WHERE weight > 85,spider-train
|
|
candidate_poll,Count the number of people of each sex who have a weight higher than 85.,"SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex",Count the number of people who have a weight higher than 85.,SELECT count(*) FROM people WHERE weight > 85,spider-train
|
|
chinook_1,"Show the album names, ids and the number of tracks for each album.","SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID","Show the album names, ids and the number of tracks.","SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId",spider-train
|
|
chinook_1,"What are the names and ids of the different albums, and how many tracks are on each?","SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID",What are the names and ids of the different albums?,"SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId",spider-train
|
|
cinema,List all directors along with the number of films directed by each director.,"SELECT directed_by , count(*) FROM film GROUP BY directed_by",List all directors,SELECT directed_by FROM film,spider-train
|
|
cinema,What is total number of show times per dat for each cinema?,"SELECT T2.name , sum(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id",What is total number of show times per dat?,SELECT sum(show_times_per_day) FROM schedule,spider-train |