diff --git "a/train_spider.json" "b/train_spider.json" new file mode 100644--- /dev/null +++ "b/train_spider.json" @@ -0,0 +1,42002 @@ +[ + { + "db_id": "department_management", + "SpiderQuestion": "How many heads of the departments are older than 56 ?", + "SpiderSynQuestion": "How many leaders of the divisions are older than 56 ?", + "query": "SELECT count(*) FROM head WHERE age > 56" + }, + { + "db_id": "department_management", + "SpiderQuestion": "List the name, born state and age of the heads of departments ordered by age.", + "SpiderSynQuestion": "List the name, born state and age of the leaders of departments ordered by age.", + "query": "SELECT name , born_state , age FROM head ORDER BY age" + }, + { + "db_id": "department_management", + "SpiderQuestion": "List the creation year, name and budget of each department.", + "SpiderSynQuestion": "List the establishment year, name and budget of each division.", + "query": "SELECT creation , name , budget_in_billions FROM department" + }, + { + "db_id": "department_management", + "SpiderQuestion": "What are the maximum and minimum budget of the departments?", + "SpiderSynQuestion": "What are the maximum and minimum budget of the divisions?", + "query": "SELECT max(budget_in_billions) , min(budget_in_billions) FROM department" + }, + { + "db_id": "department_management", + "SpiderQuestion": "What is the average number of employees of the departments whose rank is between 10 and 15?", + "SpiderSynQuestion": "What is the average number of staffs of the divisions whose rank is between 10 and 15?", + "query": "SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15" + }, + { + "db_id": "department_management", + "SpiderQuestion": "What are the names of the heads who are born outside the California state?", + "SpiderSynQuestion": "What are the names of the leaders who are born outside the California state?", + "query": "SELECT name FROM head WHERE born_state != 'California'" + }, + { + "db_id": "department_management", + "SpiderQuestion": "What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?", + "SpiderSynQuestion": "What are the different establishment years of the divisions managed by a secretary born in state 'Alabama'?", + "query": "SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama'" + }, + { + "db_id": "department_management", + "SpiderQuestion": "What are the names of the states where at least 3 heads were born?", + "SpiderSynQuestion": "What are the names of the states where at least 3 leaders were born?", + "query": "SELECT born_state FROM head GROUP BY born_state HAVING count(*) >= 3" + }, + { + "db_id": "department_management", + "SpiderQuestion": "In which year were most departments established?", + "SpiderSynQuestion": "In which year were most divisions established?", + "query": "SELECT creation FROM department GROUP BY creation ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "department_management", + "SpiderQuestion": "Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?", + "SpiderSynQuestion": "Show the name and number of staffs for the divisions managed by heads whose temporary acting value is 'Yes'?", + "query": "SELECT T1.name , T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes'" + }, + { + "db_id": "department_management", + "SpiderQuestion": "How many acting statuses are there?", + "SpiderSynQuestion": "How many acting statuses are there?", + "query": "SELECT count(DISTINCT temporary_acting) FROM management" + }, + { + "db_id": "department_management", + "SpiderQuestion": "How many departments are led by heads who are not mentioned?", + "SpiderSynQuestion": "How many divisions are led by leaders who are not mentioned?", + "query": "SELECT count(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management);" + }, + { + "db_id": "department_management", + "SpiderQuestion": "What are the distinct ages of the heads who are acting?", + "SpiderSynQuestion": "What are the different ages of the leaders who are acting?", + "query": "SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes'" + }, + { + "db_id": "department_management", + "SpiderQuestion": "List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.", + "SpiderSynQuestion": "List the states where both the secretary of 'Treasury' division and the secretary of 'Homeland Security' were born.", + "query": "SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Homeland Security'" + }, + { + "db_id": "department_management", + "SpiderQuestion": "Which department has more than 1 head at a time? List the id, name and the number of heads.", + "SpiderSynQuestion": "Which division has more than 1 leader at a time? List the id,name and the number of leaders.", + "query": "SELECT T1.department_id , T1.name , count(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING count(*) > 1" + }, + { + "db_id": "department_management", + "SpiderQuestion": "Which head's name has the substring 'Ha'? List the id and name.", + "SpiderSynQuestion": "Which leader's name has the substring 'Ha'? List the id and name.", + "query": "SELECT head_id , name FROM head WHERE name LIKE '%Ha%'" + }, + { + "db_id": "farm", + "SpiderQuestion": "How many farms are there?", + "SpiderSynQuestion": "How many farms are there?", + "query": "SELECT count(*) FROM farm" + }, + { + "db_id": "farm", + "SpiderQuestion": "Count the number of farms.", + "SpiderSynQuestion": "Count the number of farms.", + "query": "SELECT count(*) FROM farm" + }, + { + "db_id": "farm", + "SpiderQuestion": "List the total number of horses on farms in ascending order.", + "SpiderSynQuestion": "List the total number of horses on farms in ascending order.", + "query": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC" + }, + { + "db_id": "farm", + "SpiderQuestion": "What is the total horses record for each farm, sorted ascending?", + "SpiderSynQuestion": "What is the total horses record for each farm, sorted ascending?", + "query": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the hosts of competitions whose theme is not \"Aliens\"?", + "SpiderSynQuestion": "What are the hosts of contests whose topic is not \"Aliens\"?", + "query": "SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens'" + }, + { + "db_id": "farm", + "SpiderQuestion": "Return the hosts of competitions for which the theme is not Aliens?", + "SpiderSynQuestion": "Return the hosts of contests for which the topic is not Aliens?", + "query": "SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens'" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the themes of farm competitions sorted by year in ascending order?", + "SpiderSynQuestion": "What are the topics of farm competitions sorted by year in ascending order?", + "query": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC" + }, + { + "db_id": "farm", + "SpiderQuestion": "Return the themes of farm competitions, sorted by year ascending.", + "SpiderSynQuestion": "Return the topics of farm competitions, sorted by year ascending.", + "query": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC" + }, + { + "db_id": "farm", + "SpiderQuestion": "What is the average number of working horses of farms with more than 5000 total number of horses?", + "SpiderSynQuestion": "What is the average number of working horses of farms with more than 5000 total number of horses?", + "query": "SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000" + }, + { + "db_id": "farm", + "SpiderQuestion": "Give the average number of working horses on farms with more than 5000 total horses.", + "SpiderSynQuestion": "Give the average number of working horses on farms with more than 5000 total horses.", + "query": "SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the maximum and minimum number of cows across all farms.", + "SpiderSynQuestion": "What are the maximum and minimum number of cows across all farms.", + "query": "SELECT max(Cows) , min(Cows) FROM farm" + }, + { + "db_id": "farm", + "SpiderQuestion": "Return the maximum and minimum number of cows across all farms.", + "SpiderSynQuestion": "Return the maximum and minimum number of cows across all farms.", + "query": "SELECT max(Cows) , min(Cows) FROM farm" + }, + { + "db_id": "farm", + "SpiderQuestion": "How many different statuses do cities have?", + "SpiderSynQuestion": "How many different statuses do towns have?", + "query": "SELECT count(DISTINCT Status) FROM city" + }, + { + "db_id": "farm", + "SpiderQuestion": "Count the number of different statuses.", + "SpiderSynQuestion": "Count the number of different statuses.", + "query": "SELECT count(DISTINCT Status) FROM city" + }, + { + "db_id": "farm", + "SpiderQuestion": "List official names of cities in descending order of population.", + "SpiderSynQuestion": "List official names of towns in descending order by the number of people.", + "query": "SELECT Official_Name FROM city ORDER BY Population DESC" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the official names of cities, ordered descending by population?", + "SpiderSynQuestion": "What are the formal names of towns, ordered descending by residents?", + "query": "SELECT Official_Name FROM city ORDER BY Population DESC" + }, + { + "db_id": "farm", + "SpiderQuestion": "List the official name and status of the city with the largest population.", + "SpiderSynQuestion": "List the formal name and status of the city with the largest populace.", + "query": "SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "What is the official name and status of the city with the most residents?", + "SpiderSynQuestion": "What is the formal name and status of the town with the most residents?", + "query": "SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "Show the years and the official names of the host cities of competitions.", + "SpiderSynQuestion": "Show the years and the formal names of the host towns of competitions.", + "query": "SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID" + }, + { + "db_id": "farm", + "SpiderQuestion": "Give the years and official names of the cities of each competition.", + "SpiderSynQuestion": "Give the years and formal names of the towns of each contest.", + "query": "SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID" + }, + { + "db_id": "farm", + "SpiderQuestion": "Show the official names of the cities that have hosted more than one competition.", + "SpiderSynQuestion": "Show the formal names of the towns that have held more than one contest.", + "query": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the official names of cities that have hosted more than one competition?", + "SpiderSynQuestion": "What are the formal names of towns that have hosted more than one competition?", + "query": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "Show the status of the city that has hosted the greatest number of competitions.", + "SpiderSynQuestion": "Show the status of the town that has hosted the greatest number of contests.", + "query": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "What is the status of the city that has hosted the most competitions?", + "SpiderSynQuestion": "What is the status of the town that has hosted the most contests?", + "query": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "Please show the themes of competitions with host cities having populations larger than 1000.", + "SpiderSynQuestion": "Please show the topics of contests with host cities having populations larger than 1000.", + "query": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the themes of competitions that have corresponding host cities with more than 1000 residents?", + "SpiderSynQuestion": "What are the topics of contests that have corresponding host cities with more than 1000 residents?", + "query": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000" + }, + { + "db_id": "farm", + "SpiderQuestion": "Please show the different statuses of cities and the average population of cities with each status.", + "SpiderSynQuestion": "Please show the different statuses of cities and the average populace of cities with each status.", + "query": "SELECT Status , avg(Population) FROM city GROUP BY Status" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the statuses and average populations of each city?", + "SpiderSynQuestion": "What are the statuses and average populace of each town?", + "query": "SELECT Status , avg(Population) FROM city GROUP BY Status" + }, + { + "db_id": "farm", + "SpiderQuestion": "Please show the different statuses, ordered by the number of cities that have each.", + "SpiderSynQuestion": "Please show the different statuses, ordered by the number of towns that have each.", + "query": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC" + }, + { + "db_id": "farm", + "SpiderQuestion": "Return the different statuses of cities, ascending by frequency.", + "SpiderSynQuestion": "Return the different statuses of towns, ascending by frequency.", + "query": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC" + }, + { + "db_id": "farm", + "SpiderQuestion": "List the most common type of Status across cities.", + "SpiderSynQuestion": "List the most common type of Status across towns.", + "query": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "What is the most common status across all cities?", + "SpiderSynQuestion": "What is the most common status across all towns?", + "query": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "farm", + "SpiderQuestion": "List the official names of cities that have not held any competition.", + "SpiderSynQuestion": "List the formal names of towns that have not held any competition.", + "query": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the official names of cities that have not hosted a farm competition?", + "SpiderSynQuestion": "What are the formal names of towns that have not hosted a farm competition?", + "query": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)" + }, + { + "db_id": "farm", + "SpiderQuestion": "Show the status shared by cities with population bigger than 1500 and smaller than 500.", + "SpiderSynQuestion": "Show the status shared by towns with number of people bigger than 1500 and smaller than 500.", + "query": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500" + }, + { + "db_id": "farm", + "SpiderQuestion": "Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?", + "SpiderSynQuestion": "Which statuses correspond to both towns that have a population over 1500 and towns that have a population lower than 500?", + "query": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500" + }, + { + "db_id": "farm", + "SpiderQuestion": "Find the official names of cities with population bigger than 1500 or smaller than 500.", + "SpiderSynQuestion": "Find the formal names of towns with number of people bigger than 1500 or smaller than 500.", + "query": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the official names of cities that have population over 1500 or less than 500?", + "SpiderSynQuestion": "What are the formal names of towns that have number of people over 1500 or less than 500?", + "query": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500" + }, + { + "db_id": "farm", + "SpiderQuestion": "Show the census ranking of cities whose status are not \"Village\".", + "SpiderSynQuestion": "Show the count of population ranking of towns whose status are not \"Village\".", + "query": "SELECT Census_Ranking FROM city WHERE Status != \"Village\"" + }, + { + "db_id": "farm", + "SpiderQuestion": "What are the census rankings of cities that do not have the status \"Village\"?", + "SpiderSynQuestion": "What are the count of population rankings of towns that do not have the status \"Village\"?", + "query": "SELECT Census_Ranking FROM city WHERE Status != \"Village\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "which course has most number of registered students?", + "SpiderSynQuestion": "which curriculum has most number of registered students?", + "query": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What is the name of the course with the most registered students?", + "SpiderSynQuestion": "What is the name of the curriculum with the most registered students?", + "query": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "what is id of students who registered some courses but the least number of courses in these students?", + "SpiderSynQuestion": "what is id of students who registered some curriculums but the least number of curriculums in these students?", + "query": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the students who registered for some courses but had the least number of courses for all students?", + "SpiderSynQuestion": "What are the ids of the students who registered for some courses but had the least number of courses for all students?", + "query": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "what are the first name and last name of all candidates?", + "SpiderSynQuestion": "what are the forename and surname of all candidates?", + "query": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the first and last names of all the candidates?", + "SpiderSynQuestion": "What are the full names of all the candidates?", + "query": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "List the id of students who never attends courses?", + "SpiderSynQuestion": "List the id of students who never attends curriculum?", + "query": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of every student who has never attended a course?", + "SpiderSynQuestion": "What are the ids of every student who has never attended a curriculum?", + "query": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "List the id of students who attended some courses?", + "SpiderSynQuestion": "List the id of students who attended some curriculums?", + "query": "SELECT student_id FROM student_course_attendance" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of all students who have attended at least one course?", + "SpiderSynQuestion": "What are the ids of all students who have attended at least one curriculum?", + "query": "SELECT student_id FROM student_course_attendance" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of all students for courses and what are the names of those courses?", + "SpiderSynQuestion": "What are the ids of all students for curriculums and what are the names of those curriculums?", + "query": "SELECT T1.student_id , T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What is detail of the student who most recently registered course?", + "SpiderSynQuestion": "What is detail of the student who most recently registered curriculum?", + "query": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What details do we have on the students who registered for courses most recently?", + "SpiderSynQuestion": "What details do we have on the students who registered for courses most recently?", + "query": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "How many students attend course English?", + "SpiderSynQuestion": "How many students attend curriculum English?", + "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"English\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "How many students are attending English courses?", + "SpiderSynQuestion": "How many students are attending English curriculum?", + "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"English\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "How many courses do the student whose id is 171 attend?", + "SpiderSynQuestion": "How many curriculums do the student whose id is 171 attend?", + "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "How many courses does the student with id 171 actually attend?", + "SpiderSynQuestion": "How many curriculums does the student with id 171 actually attend?", + "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "Find id of the candidate whose email is stanley.monahan@example.org?", + "SpiderSynQuestion": "Find id of the candidate whose email is stanley.monahan@example.org?", + "query": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What is the id of the candidate whose email is stanley.monahan@example.org?", + "SpiderSynQuestion": "What is the id of the candidate whose email is stanley.monahan@example.org?", + "query": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "Find id of the candidate who most recently accessed the course?", + "SpiderSynQuestion": "Find id of the candidate who most recently accessed the curriculum?", + "query": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What is the id of the candidate who most recently accessed the course?", + "SpiderSynQuestion": "What is the id of the candidate who most recently accessed the curriculum?", + "query": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What is detail of the student who registered the most number of courses?", + "SpiderSynQuestion": "What is detail of the student who registered the most number of courses?", + "query": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the details of the student who registered for the most number of courses?", + "SpiderSynQuestion": "What are the details of the student who registered for the most number of courses?", + "query": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "List the id of students who registered some courses and the number of their registered courses?", + "SpiderSynQuestion": "List the id of students who registered some curriculums and the number of their registered curriculums?", + "query": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "For every student who is registered for some course, how many courses are they registered for?", + "SpiderSynQuestion": "For every student who is registered for some curriculum, how many curriculums are they registered for?", + "query": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "How many registed students do each course have? List course name and the number of their registered students?", + "SpiderSynQuestion": "How many registed students do each curriculum have? List curriculum name and the number of their registered students?", + "query": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "For each course id, how many students are registered and what are the course names?", + "SpiderSynQuestion": "For each curriculum id, how many students are registered and what are the curriculum names?", + "query": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "Find id of candidates whose assessment code is \"Pass\"?", + "SpiderSynQuestion": "Find id of candidates whose assessment code is \"Pass\"?", + "query": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"Pass\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the candidates that have an outcome code of Pass?", + "SpiderSynQuestion": "What are the ids of the candidates that have an outcome code of Pass?", + "query": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"Pass\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "Find the cell mobile number of the candidates whose assessment code is \"Fail\"?", + "SpiderSynQuestion": "Find the cell phone number of the candidates whose assessment code is \"Fail\"?", + "query": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"Fail\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the cell phone numbers of the candidates that received an assessment code of \"Fail\"?", + "SpiderSynQuestion": "What are the cell phone numbers of the candidates that received an assessment code of \"Fail\"?", + "query": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"Fail\"" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the id of students who registered course 301?", + "SpiderSynQuestion": "What are the id of students who registered course 301?", + "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the students who registered for course 301?", + "SpiderSynQuestion": "What are the ids of the students who registered for course 301?", + "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What is the id of the student who most recently registered course 301?", + "SpiderSynQuestion": "What is the id of the student who most recently registered course 301?", + "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the students who registered for course 301 most recently?", + "SpiderSynQuestion": "What are the ids of the students who registered for course 301 most recently?", + "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "Find distinct cities of addresses of people?", + "SpiderSynQuestion": "Find different towns of locations of people?", + "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the different cities where people live?", + "SpiderSynQuestion": "What are the different towns where people live?", + "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "Find distinct cities of address of students?", + "SpiderSynQuestion": "Find different towns of location of students?", + "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the different cities where students live?", + "SpiderSynQuestion": "What are the different towns where students live?", + "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "List the names of courses in alphabetical order?", + "SpiderSynQuestion": "List the names of curriculums in alphabetical order?", + "query": "SELECT course_name FROM courses ORDER BY course_name" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the names of the courses in alphabetical order?", + "SpiderSynQuestion": "What are the names of the curriculums in alphabetical order?", + "query": "SELECT course_name FROM courses ORDER BY course_name" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "List the first names of people in alphabetical order?", + "SpiderSynQuestion": "List the forenames of people in alphabetical order?", + "query": "SELECT first_name FROM people ORDER BY first_name" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the first names of the people in alphabetical order?", + "SpiderSynQuestion": "What are the forenames of the people in alphabetical order?", + "query": "SELECT first_name FROM people ORDER BY first_name" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the id of students who registered courses or attended courses?", + "SpiderSynQuestion": "What are the id of students who registered curriculums or attended curriculums?", + "query": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the students who either registered or attended a course?", + "SpiderSynQuestion": "What are the ids of the students who either registered or attended a curriculum?", + "query": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "Find the id of courses which are registered or attended by student whose id is 121?", + "SpiderSynQuestion": "Find the id of curriculums which are registered or attended by student whose id is 121?", + "query": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the courses that are registered or attended by the student whose id is 121?", + "SpiderSynQuestion": "What are the ids of the curriculums that are registered or attended by the student whose id is 121?", + "query": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are all info of students who registered courses but not attended courses?", + "SpiderSynQuestion": "What are all info of students who registered curriculums but not attended curriculums?", + "query": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are all details of the students who registered but did not attend any course?", + "SpiderSynQuestion": "What are all details of the students who registered but did not attend any curriculum?", + "query": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "List the id of students who registered course statistics in the order of registration date.", + "SpiderSynQuestion": "List the id of students who registered curriculum statistics in the order of registration date.", + "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.registration_date" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the students who registered course statistics by order of registration date?", + "SpiderSynQuestion": "What are the ids of the students who registered curriculum statistics by order of registration date?", + "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.registration_date" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "List the id of students who attended statistics courses in the order of attendance date.", + "SpiderSynQuestion": "List the id of students who attended statistics curriculums in the order of attendance date.", + "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.date_of_attendance" + }, + { + "db_id": "student_assessment", + "SpiderQuestion": "What are the ids of the students who attended courses in the statistics department in order of attendance date.", + "SpiderSynQuestion": "What are the ids of the students who attended curriculums in the statistics department in order of attendance date.", + "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.date_of_attendance" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Give me the dates when the max temperature was higher than 85.", + "SpiderSynQuestion": "Give me the day when the max temperature was higher than 85.", + "query": "SELECT date FROM weather WHERE max_temperature_f > 85" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the dates with a maximum temperature higher than 85?", + "SpiderSynQuestion": "What are the day with a maximum temperature higher than 85?", + "query": "SELECT date FROM weather WHERE max_temperature_f > 85" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the names of stations that have latitude lower than 37.5?", + "SpiderSynQuestion": "What are the names of terminals that have latitude lower than 37.5?", + "query": "SELECT name FROM station WHERE lat < 37.5" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the names of all stations with a latitude smaller than 37.5?", + "SpiderSynQuestion": "What are the names of all terminals with a latitude smaller than 37.5?", + "query": "SELECT name FROM station WHERE lat < 37.5" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each city, return the highest latitude among its stations.", + "SpiderSynQuestion": "For each city, return the highest latitude among its terminals.", + "query": "SELECT city , max(lat) FROM station GROUP BY city" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each city, what is the highest latitude for its stations?", + "SpiderSynQuestion": "For each city, what is the highest latitude for its terminals?", + "query": "SELECT city , max(lat) FROM station GROUP BY city" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Give me the start station and end station for the trips with the three oldest id.", + "SpiderSynQuestion": "Give me the start terminal and end terminal for the tours with the three oldest id.", + "query": "SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the station station and end station for the trips with the three smallest ids?", + "SpiderSynQuestion": "What is the station station and end terminal for the tours with the three smallest ids?", + "query": "SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the average latitude and longitude of stations located in San Jose city?", + "SpiderSynQuestion": "What is the average latitude and longitude of terminals located in San Jose city?", + "query": "SELECT avg(lat) , avg(long) FROM station WHERE city = \"San Jose\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the average latitude and longitude in San Jose?", + "SpiderSynQuestion": "What is the average latitude and longitude in San Jose?", + "query": "SELECT avg(lat) , avg(long) FROM station WHERE city = \"San Jose\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the id of the trip that has the shortest duration?", + "SpiderSynQuestion": "What is the id of the tour that has the shortest duration?", + "query": "SELECT id FROM trip ORDER BY duration LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the id of the shortest trip?", + "SpiderSynQuestion": "What is the id of the shortest tour?", + "query": "SELECT id FROM trip ORDER BY duration LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the total and maximum duration of trips with bike id 636?", + "SpiderSynQuestion": "What is the total and maximum length of tours with bike id 636?", + "query": "SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the total and maximum duration for all trips with the bike id 636?", + "SpiderSynQuestion": "What is the total and maximum length for all tours with the bike id 636?", + "query": "SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each zip code, return the average mean temperature of August there.", + "SpiderSynQuestion": "For each postal code, return the average mean temperature of August there.", + "query": "SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE \"8/%\" GROUP BY zip_code" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each zip code, what is the average mean temperature for all dates that start with '8'?", + "SpiderSynQuestion": "For each postal code, what is the average mean temperature for all dates that start with '8'?", + "query": "SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE \"8/%\" GROUP BY zip_code" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "From the trip record, find the number of unique bikes.", + "SpiderSynQuestion": "From the tour record, find the number of unique bicycles.", + "query": "SELECT count(DISTINCT bike_id) FROM trip" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many different bike ids are there?", + "SpiderSynQuestion": "How many different bicycle ids are there?", + "query": "SELECT count(DISTINCT bike_id) FROM trip" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the number of distinct cities the stations are located at?", + "SpiderSynQuestion": "What is the number of different cities the terminals are located at?", + "query": "SELECT count(DISTINCT city) FROM station" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many different cities have these stations?", + "SpiderSynQuestion": "How many different cities have these terminals?", + "query": "SELECT count(DISTINCT city) FROM station" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many stations does Mountain View city has?", + "SpiderSynQuestion": "How many terminals does Mountain View city has?", + "query": "SELECT COUNT(*) FROM station WHERE city = \"Mountain View\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many stations are in Mountain View?", + "SpiderSynQuestion": "How many terminals are in Mountain View?", + "query": "SELECT COUNT(*) FROM station WHERE city = \"Mountain View\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Return the unique name for stations that have ever had 7 bikes available.", + "SpiderSynQuestion": "Return the unique name for terminals that have ever had 7 bicycles available.", + "query": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the different names for each station that has ever had 7 bikes available?", + "SpiderSynQuestion": "What are the different names for each terminal that has ever had 7 bikes available?", + "query": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Which start station had the most trips starting from August? Give me the name and id of the station.", + "SpiderSynQuestion": "Which start terminal had the most tours starting from August? Give me the name and id of the terminal.", + "query": "SELECT start_station_name , start_station_id FROM trip WHERE start_date LIKE \"8/%\" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the start station's name and id for the one that had the most start trips in August?", + "SpiderSynQuestion": "What are the start terminal's name and id for the one that had the most start tours in August?", + "query": "SELECT start_station_name , start_station_id FROM trip WHERE start_date LIKE \"8/%\" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Which bike traveled the most often in zip code 94002?", + "SpiderSynQuestion": "Which bicycle traveled the most often in zip code 94002?", + "query": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the id of the bike that traveled the most in 94002?", + "SpiderSynQuestion": "What is the id of the bicycle that traveled the most in 94002?", + "query": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many days had both mean humidity above 50 and mean visibility above 8?", + "SpiderSynQuestion": "How many days had both mean humidity above 50 and mean visibility above 8?", + "query": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the number of days that had an average humity above 50 and an average visibility above 8?", + "SpiderSynQuestion": "What is the number of days that had an average humidity above 50 and an average visibility above 8?", + "query": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the latitude, longitude, city of the station from which the shortest trip started?", + "SpiderSynQuestion": "What is the latitude, longitude, city of the terminal from which the shortest tour started?", + "query": "SELECT T1.lat , T1.long , T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?", + "SpiderSynQuestion": "What is the latitude, longitude, and city of the terminal from which the trip with smallest duration started?", + "query": "SELECT T1.lat , T1.long , T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids of stations that are located in San Francisco and have average bike availability above 10.", + "SpiderSynQuestion": "What are the ids of terminals that are located in San Francisco and have average bike availability above 10.", + "query": "SELECT id FROM station WHERE city = \"San Francisco\" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids of the stations in San Francisco that normally have more than 10 bikes available?", + "SpiderSynQuestion": "What are the ids of the terminals in San Francisco that normally have more than 10 bikes available?", + "query": "SELECT id FROM station WHERE city = \"San Francisco\" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?", + "SpiderSynQuestion": "What are the names and ids of terminals that had more than 14 bicycles available on average or were installed in December?", + "query": "SELECT T1.name , T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(T2.bikes_available) > 14 UNION SELECT name , id FROM station WHERE installation_date LIKE \"12/%\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?", + "SpiderSynQuestion": "What are the names and ids of all terminals that have more than 14 bikes available on average or had bikes installed in December?", + "query": "SELECT T1.name , T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(T2.bikes_available) > 14 UNION SELECT name , id FROM station WHERE installation_date LIKE \"12/%\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the 3 most common cloud cover rates in the region of zip code 94107?", + "SpiderSynQuestion": "What is the 3 most common cloud cover rates in the region of postal code 94107?", + "query": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the 3 most common cloud covers in the zip code of 94107?", + "SpiderSynQuestion": "What are the 3 most common cloud covers in the postal code of 94107?", + "query": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the zip code in which the average mean sea level pressure is the lowest?", + "SpiderSynQuestion": "What is the postal code in which the average mean sea level pressure is the lowest?", + "query": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the zip code that has the lowest average mean sea level pressure?", + "SpiderSynQuestion": "What is the postal code that has the lowest average mean sea level pressure?", + "query": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the average bike availability in stations that are not located in Palo Alto?", + "SpiderSynQuestion": "What is the average bicycle availability in stations that are not located in Palo Alto?", + "query": "SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = \"Palo Alto\")" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the average bike availablility for stations not in Palo Alto?", + "SpiderSynQuestion": "What is the average bicycle availablility for stations not in Palo Alto?", + "query": "SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = \"Palo Alto\")" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the average longitude of stations that never had bike availability more than 10?", + "SpiderSynQuestion": "What is the average longitude of terminals that never had bike availability more than 10?", + "query": "SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10)" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the mean longitude for all stations that have never had more than 10 bikes available?", + "SpiderSynQuestion": "What is the mean longitude for all terminals that have never had more than 10 bikes available?", + "query": "SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10)" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "When and in what zip code did max temperature reach 80?", + "SpiderSynQuestion": "When and in what postal code did max temperature reach 80?", + "query": "SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?", + "SpiderSynQuestion": "What postal codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?", + "query": "SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.", + "SpiderSynQuestion": "Give me ids for all the tour that took place in a zip code area with average mean temperature above 60.", + "query": "SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f) > 60" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each zip code, find the ids of all trips that have a higher average mean temperature above 60?", + "SpiderSynQuestion": "For each postal code, find the ids of all tours that have a higher average mean temperature above 60?", + "query": "SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f) > 60" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each zip code, return how many times max wind speed reached 25?", + "SpiderSynQuestion": "For each postal code, return how many times max wind speed reached 25?", + "query": "SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each zip code, how many times has the maximum wind speed reached 25 mph?", + "SpiderSynQuestion": "For each postal code, how many times has the maximum wind speed reached 25 mph?", + "query": "SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?", + "SpiderSynQuestion": "On which day and in which postal code was the min dew point lower than any day in postal code 94107?", + "query": "SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107)" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?", + "SpiderSynQuestion": "Which days had a minimum dew point smaller than any day in postal code 94107, and in which postal codes were those measurements taken?", + "query": "SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107)" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each trip, return its ending station's installation date.", + "SpiderSynQuestion": "For each tour, return its ending station's installation date.", + "query": "SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the installation date for each ending station on all the trips?", + "SpiderSynQuestion": "What is the installation date for each ending station on all the tours?", + "query": "SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Which trip started from the station with the largest dock count? Give me the trip id.", + "SpiderSynQuestion": "Which tour started from the station with the largest dock count? Give me the tour id.", + "query": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the id of the trip that started from the station with the highest dock count?", + "SpiderSynQuestion": "What is the id of the tour that started from the station with the highest dock count?", + "query": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Count the number of trips that did not end in San Francisco city.", + "SpiderSynQuestion": "Count the number of tours that did not end in San Francisco city.", + "query": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many trips did not end in San Francisco?", + "SpiderSynQuestion": "How many tours did not end in San Francisco?", + "query": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "In zip code 94107, on which day neither Fog nor Rain was not observed?", + "SpiderSynQuestion": "In postal code 94107, on which day neither Fog nor Rain was not observed?", + "query": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != \"Fog\" AND EVENTS != \"Rain\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "On which day has it neither been foggy nor rained in the zip code of 94107?", + "SpiderSynQuestion": "On which day has it neither been foggy nor rained in the postal code of 94107?", + "query": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != \"Fog\" AND EVENTS != \"Rain\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?", + "SpiderSynQuestion": "What are the ids of terminals that have latitude above 37.4 and never had bike availability below 7?", + "query": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", + "SpiderSynQuestion": "What are the ids of all terminals that have a latitude above 37.4 and have never had less than 7 bikes available?", + "query": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are names of stations that have average bike availability above 10 and are not located in San Jose city?", + "SpiderSynQuestion": "What are names of terminals that have average bicycle availability above 10 and are not located in San Jose city?", + "query": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = \"San Jose\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the names of all stations that have more than 10 bikes available and are not located in San Jose?", + "SpiderSynQuestion": "What are the names of all terminals that have more than 10 bikes available and are not located in San Jose?", + "query": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = \"San Jose\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the name, latitude, and city of the station with the lowest latitude?", + "SpiderSynQuestion": "What are the name, latitude, and city of the terminal with the lowest latitude?", + "query": "SELECT name , lat , city FROM station ORDER BY lat LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the name, latitude, and city of the station that is located the furthest South?", + "SpiderSynQuestion": "What is the name, latitude, and city of the terminal that is located the furthest South?", + "query": "SELECT name , lat , city FROM station ORDER BY lat LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?", + "SpiderSynQuestion": "What are the day, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?", + "query": "SELECT date , mean_temperature_f , mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?", + "SpiderSynQuestion": "What is the day, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?", + "query": "SELECT date , mean_temperature_f , mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "List the name and the number of stations for all the cities that have at least 15 stations.", + "SpiderSynQuestion": "List the name and the number of terminals for all the cities that have at least 15 terminals.", + "query": "SELECT city , COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the name of every city that has at least 15 stations and how many stations does it have?", + "SpiderSynQuestion": "What is the name of every city that has at least 15 terminals and how many terminals does it have?", + "query": "SELECT city , COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Find the ids and names of stations from which at least 200 trips started.", + "SpiderSynQuestion": "Find the ids and names of terminals from which at least 200 tours started.", + "query": "SELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids and names of all start stations that were the beginning of at least 200 trips?", + "SpiderSynQuestion": "What are the ids and names of all start terminals that were the beginning of at least 200 tours?", + "query": "SELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Find the zip code in which the average mean visibility is lower than 10.", + "SpiderSynQuestion": "Find the postal code in which the average mean visibility is lower than 10.", + "query": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each zip code, select all those that have an average mean visiblity below 10.", + "SpiderSynQuestion": "For each postal code, select all those that have an average mean visiblity below 10.", + "query": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "List all the cities in a decreasing order of each city's stations' highest latitude.", + "SpiderSynQuestion": "List all the cities in a decreasing order of each city's terminals' highest latitude.", + "query": "SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each city, list their names in decreasing order by their highest station latitude.", + "SpiderSynQuestion": "For each city, list their names in decreasing order by their highest terminal latitude.", + "query": "SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.", + "SpiderSynQuestion": "What are the day that had the top 5 cloud cover rates? Also tell me the cloud cover rate.", + "query": "SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the dates that have the 5 highest cloud cover rates and what are the rates?", + "SpiderSynQuestion": "What are the day that have the 5 highest cloud cover rates and what are the rates?", + "query": "SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids and durations of the trips with the top 3 durations?", + "SpiderSynQuestion": "What are the ids and durations of the tours with the top 3 durations?", + "query": "SELECT id , duration FROM trip ORDER BY duration DESC LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids of the trips that lasted the longest and how long did they last?", + "SpiderSynQuestion": "What are the ids of the tours that lasted the longest and how long did they last?", + "query": "SELECT id , duration FROM trip ORDER BY duration DESC LIMIT 3" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each station, return its longitude and the average duration of trips that started from the station.", + "SpiderSynQuestion": "For each terminal, return its longitude and the average duration of trips that started from the terminal.", + "query": "SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each start station id, what is its name, longitude and average duration of trips started there?", + "SpiderSynQuestion": "For each start terminal id, what is its name, longitude and average length of tours started there?", + "query": "SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each station, find its latitude and the minimum duration of trips that ended at the station.", + "SpiderSynQuestion": "For each terminal, find its latitude and the minimum length of tours that ended at the terminal.", + "query": "SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "For each end station id, what is its name, latitude, and minimum duration for trips ended there?", + "SpiderSynQuestion": "For each end terminal id, what is its name, latitude, and minimum length of the tours ended there?", + "query": "SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "List all the distinct stations from which a trip of duration below 100 started.", + "SpiderSynQuestion": "List all the different terminals from which a tour of duration below 100 started.", + "query": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are all the different start station names for a trip that lasted less than 100?", + "SpiderSynQuestion": "What are all the different start terminal names for a trip that lasted less than 100?", + "query": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Find all the zip codes in which the max dew point have never reached 70.", + "SpiderSynQuestion": "Find all the postal codes in which the max dew point have never reached 70.", + "query": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are all the different zip codes that have a maximum dew point that was always below 70?", + "SpiderSynQuestion": "What are all the different postal codes that have a maximum dew point that was always below 70?", + "query": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.", + "SpiderSynQuestion": "Find the id for the tours that lasted at least as long as the average duration of trips in zip code 94103.", + "query": "SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103)" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103?", + "SpiderSynQuestion": "What are the ids of all tours that had a duration as long as the average trip duration in the zip code 94103?", + "query": "SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103)" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the dates in which the mean sea level pressure was between 30.3 and 31?", + "SpiderSynQuestion": "What are the days in which the mean sea level pressure was between 30.3 and 31?", + "query": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the dates that have an average sea level pressure between 30.3 and 31?", + "SpiderSynQuestion": "What are the days that have an average sea level pressure between 30.3 and 31?", + "query": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.", + "SpiderSynQuestion": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.", + "query": "SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the days that had the smallest temperature range, and what was that range?", + "SpiderSynQuestion": "What are the days that had the smallest temperature range, and what was that range?", + "query": "SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the id and name of the stations that have ever had more than 12 bikes available?", + "SpiderSynQuestion": "What are the id and name of the terminals that have ever had more than 12 bikes available?", + "query": "SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the different ids and names of the stations that have had more than 12 bikes available?", + "SpiderSynQuestion": "What are the different ids and names of the terminals that have had more than 12 bicycles available?", + "query": "SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.", + "SpiderSynQuestion": "Give me the postal code where the average mean humidity is below 70 and at least 100 trips took place.", + "query": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*) >= 100" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?", + "SpiderSynQuestion": "What are the postal codes that have an average mean humidity below 70 and had at least 100 trips come through there?", + "query": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*) >= 100" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?", + "SpiderSynQuestion": "What are the names of terminals that are located in Palo Alto city but have never been the ending point of trips more than 100 times?", + "query": "SELECT name FROM station WHERE city = \"Palo Alto\" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips", + "SpiderSynQuestion": "What are the names of the terminals that are located in Palo Alto but have never been the ending point of the trips", + "query": "SELECT name FROM station WHERE city = \"Palo Alto\" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many trips started from Mountain View city and ended at Palo Alto city?", + "SpiderSynQuestion": "How many tours started from Mountain View city and ended at Palo Alto city?", + "query": "SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = \"Mountain View\" AND T3.city = \"Palo Alto\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "How many trips stated from a station in Mountain View and ended at one in Palo Alto?", + "SpiderSynQuestion": "How many tours stated from a terminal in Mountain View and ended at one in Palo Alto?", + "query": "SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = \"Mountain View\" AND T3.city = \"Palo Alto\"" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the average latitude and longitude of the starting points of all trips?", + "SpiderSynQuestion": "What is the average latitude and longitude of the starting points of all tours?", + "query": "SELECT avg(T1.lat) , avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id" + }, + { + "db_id": "bike_1", + "SpiderQuestion": "What is the average latitude and longitude of all starting stations for the trips?", + "SpiderSynQuestion": "What is the average latitude and longitude of all starting terminals for the tours?", + "query": "SELECT avg(T1.lat) , avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id" + }, + { + "db_id": "book_2", + "SpiderQuestion": "How many books are there?", + "SpiderSynQuestion": "How many books are there?", + "query": "SELECT count(*) FROM book" + }, + { + "db_id": "book_2", + "SpiderQuestion": "List the writers of the books in ascending alphabetical order.", + "SpiderSynQuestion": "List the authors of the books in ascending alphabetical order.", + "query": "SELECT Writer FROM book ORDER BY Writer ASC" + }, + { + "db_id": "book_2", + "SpiderQuestion": "List the titles of the books in ascending order of issues.", + "SpiderSynQuestion": "List the names of the books in ascending order of issues.", + "query": "SELECT Title FROM book ORDER BY Issues ASC" + }, + { + "db_id": "book_2", + "SpiderQuestion": "What are the titles of the books whose writer is not \"Elaine Lee\"?", + "SpiderSynQuestion": "What are the names of the books whose author is not \"Elaine Lee\"?", + "query": "SELECT Title FROM book WHERE Writer != \"Elaine Lee\"" + }, + { + "db_id": "book_2", + "SpiderQuestion": "What are the title and issues of the books?", + "SpiderSynQuestion": "What are the name and issues of the books?", + "query": "SELECT Title , Issues FROM book" + }, + { + "db_id": "book_2", + "SpiderQuestion": "What are the dates of publications in descending order of price?", + "SpiderSynQuestion": "What are the days of publications in descending order of price?", + "query": "SELECT Publication_Date FROM publication ORDER BY Price DESC" + }, + { + "db_id": "book_2", + "SpiderQuestion": "What are the distinct publishers of publications with price higher than 5000000?", + "SpiderSynQuestion": "What are the different publishers of publications with price higher than 5000000?", + "query": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000" + }, + { + "db_id": "book_2", + "SpiderQuestion": "List the publisher of the publication with the highest price.", + "SpiderSynQuestion": "List the publisher of the publication with the highest price.", + "query": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1" + }, + { + "db_id": "book_2", + "SpiderQuestion": "List the publication dates of publications with 3 lowest prices.", + "SpiderSynQuestion": "List the publication days of publications with 3 lowest prices.", + "query": "SELECT Publication_Date FROM publication ORDER BY Price ASC LIMIT 3" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Show the title and publication dates of books.", + "SpiderSynQuestion": "Show the name and publication dates of books.", + "query": "SELECT T1.Title , T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Show writers who have published a book with price more than 4000000.", + "SpiderSynQuestion": "Show authors who have published a book with price more than 4000000.", + "query": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Show the titles of books in descending order of publication price.", + "SpiderSynQuestion": "Show the names of books in descending order of publication price.", + "query": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Show publishers that have more than one publication.", + "SpiderSynQuestion": "Show publishers that have more than one publication.", + "query": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Show different publishers together with the number of publications they have.", + "SpiderSynQuestion": "Show different publishers together with the number of publications they have.", + "query": "SELECT Publisher , COUNT(*) FROM publication GROUP BY Publisher" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Please show the most common publication date.", + "SpiderSynQuestion": "Please show the most common publication day.", + "query": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "book_2", + "SpiderQuestion": "List the writers who have written more than one book.", + "SpiderSynQuestion": "List the authors who have written more than one book.", + "query": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1" + }, + { + "db_id": "book_2", + "SpiderQuestion": "List the titles of books that are not published.", + "SpiderSynQuestion": "List the names of books that are not published.", + "query": "SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication)" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.", + "SpiderSynQuestion": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.", + "query": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000" + }, + { + "db_id": "book_2", + "SpiderQuestion": "What is the number of distinct publication dates?", + "SpiderSynQuestion": "What is the number of different publication days?", + "query": "SELECT COUNT (DISTINCT Publication_Date) FROM publication" + }, + { + "db_id": "book_2", + "SpiderQuestion": "How many distinct publication dates are there in our record?", + "SpiderSynQuestion": "How many different publication days are there in our record?", + "query": "SELECT COUNT (DISTINCT Publication_Date) FROM publication" + }, + { + "db_id": "book_2", + "SpiderQuestion": "Show the prices of publications whose publisher is either \"Person\" or \"Wiley\"", + "SpiderSynQuestion": "How much those publications whose publisher is either \"Person\" or \"Wiley\"", + "query": "SELECT Price FROM publication WHERE Publisher = \"Person\" OR Publisher = \"Wiley\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "How many actors are there?", + "SpiderSynQuestion": "How many performers are there?", + "query": "SELECT count(*) FROM actor" + }, + { + "db_id": "musical", + "SpiderQuestion": "Count the number of actors.", + "SpiderSynQuestion": "Count the number of performers.", + "query": "SELECT count(*) FROM actor" + }, + { + "db_id": "musical", + "SpiderQuestion": "List the name of actors in ascending alphabetical order.", + "SpiderSynQuestion": "List the name of performers in ascending alphabetical order.", + "query": "SELECT Name FROM actor ORDER BY Name ASC" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of actors, ordered alphabetically?", + "SpiderSynQuestion": "What are the names of performers, ordered alphabetically?", + "query": "SELECT Name FROM actor ORDER BY Name ASC" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the characters and duration of actors?", + "SpiderSynQuestion": "What are the characters and duration of actors?", + "query": "SELECT Character , Duration FROM actor" + }, + { + "db_id": "musical", + "SpiderQuestion": "Return the characters and durations for each actor.", + "SpiderSynQuestion": "Return the characters and durations for each actor.", + "query": "SELECT Character , Duration FROM actor" + }, + { + "db_id": "musical", + "SpiderQuestion": "List the name of actors whose age is not 20.", + "SpiderSynQuestion": "List the name of performers whose age is not 20.", + "query": "SELECT Name FROM actor WHERE Age != 20" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of actors who are not 20 years old?", + "SpiderSynQuestion": "What are the names of performers who are not 20 years old?", + "query": "SELECT Name FROM actor WHERE Age != 20" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the characters of actors in descending order of age?", + "SpiderSynQuestion": "What are the characters of actors in descending order of age?", + "query": "SELECT Character FROM actor ORDER BY age DESC" + }, + { + "db_id": "musical", + "SpiderQuestion": "Return the characters for actors, ordered by age descending.", + "SpiderSynQuestion": "Return the characters for actors, ordered by age descending.", + "query": "SELECT Character FROM actor ORDER BY age DESC" + }, + { + "db_id": "musical", + "SpiderQuestion": "What is the duration of the oldest actor?", + "SpiderSynQuestion": "What is the duration of the oldest actor?", + "query": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "musical", + "SpiderQuestion": "Return the duration of the actor with the greatest age.", + "SpiderSynQuestion": "Return the duration of the performer with the greatest age.", + "query": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of musicals with nominee \"Bob Fosse\"?", + "SpiderSynQuestion": "What are the names of music dramas with nominee \"Bob Fosse\"?", + "query": "SELECT Name FROM musical WHERE Nominee = \"Bob Fosse\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "Return the names of musicals who have the nominee Bob Fosse.", + "SpiderSynQuestion": "Return the names of music dramas who have the nominee Bob Fosse.", + "query": "SELECT Name FROM musical WHERE Nominee = \"Bob Fosse\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the distinct nominees of the musicals with the award that is not \"Tony Award\"?", + "SpiderSynQuestion": "What are the different nominees of the musicals with the award that is not \"Tony Award\"?", + "query": "SELECT DISTINCT Nominee FROM musical WHERE Award != \"Tony Award\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "Return the different nominees of musicals that have an award that is not the Tony Award.", + "SpiderSynQuestion": "Return the different nominees of musicals that have an award that is not the Tony Award.", + "query": "SELECT DISTINCT Nominee FROM musical WHERE Award != \"Tony Award\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show names of actors and names of musicals they are in.", + "SpiderSynQuestion": "Show names of performers and names of musicals they are in.", + "query": "SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of actors and the musicals that they are in?", + "SpiderSynQuestion": "What are the names of performers and the musicals that they are in?", + "query": "SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show names of actors that have appeared in musical with name \"The Phantom of the Opera\".", + "SpiderSynQuestion": "Show names of performers that have appeared in musical with name \"The Phantom of the Opera\".", + "query": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"The Phantom of the Opera\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of actors who have been in the musical titled The Phantom of the Opera?", + "SpiderSynQuestion": "What are the names of performers who have been in the musical titled The Phantom of the Opera?", + "query": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"The Phantom of the Opera\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show names of actors in descending order of the year their musical is awarded.", + "SpiderSynQuestion": "Show names of performers in descending order of the year their musical is awarded.", + "query": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of actors ordered descending by the year in which their musical was awarded?", + "SpiderSynQuestion": "What are the names of performers ordered descending by the year in which their musical was awarded?", + "query": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show names of musicals and the number of actors who have appeared in the musicals.", + "SpiderSynQuestion": "Show names of music dramas and the number of actors who have appeared in the music dramas.", + "query": "SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID" + }, + { + "db_id": "musical", + "SpiderQuestion": "How many actors have appeared in each musical?", + "SpiderSynQuestion": "How many performers have appeared in each music drama?", + "query": "SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show names of musicals which have at least three actors.", + "SpiderSynQuestion": "Show names of musicals which have at least three performers.", + "query": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of musicals who have at 3 or more actors?", + "SpiderSynQuestion": "What are the names of music dramas who have at 3 or more performers?", + "query": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show different nominees and the number of musicals they have been nominated.", + "SpiderSynQuestion": "Show different nominees and the number of music dramas they have been nominated.", + "query": "SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee" + }, + { + "db_id": "musical", + "SpiderQuestion": "How many musicals has each nominee been nominated for?", + "SpiderSynQuestion": "How many music dramas has each nominee been nominated for?", + "query": "SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee" + }, + { + "db_id": "musical", + "SpiderQuestion": "Please show the nominee who has been nominated the greatest number of times.", + "SpiderSynQuestion": "Please show the nominee who has been nominated the greatest number of times.", + "query": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "musical", + "SpiderQuestion": "Who is the nominee who has been nominated for the most musicals?", + "SpiderSynQuestion": "Who is the nominee who has been nominated for the most music dramas?", + "query": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "musical", + "SpiderQuestion": "List the most common result of the musicals.", + "SpiderSynQuestion": "List the most common outcome of the music dramas.", + "query": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "musical", + "SpiderQuestion": "Return the most frequent result across all musicals.", + "SpiderSynQuestion": "Return the most frequent outcome across all music dramas.", + "query": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "musical", + "SpiderQuestion": "List the nominees that have been nominated more than two musicals.", + "SpiderSynQuestion": "List the nominees that have been nominated more than two music dramas.", + "query": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2" + }, + { + "db_id": "musical", + "SpiderQuestion": "Who are the nominees who have been nominated more than two times?", + "SpiderSynQuestion": "Who are the nominees who have been nominated more than two times?", + "query": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2" + }, + { + "db_id": "musical", + "SpiderQuestion": "List the name of musicals that do not have actors.", + "SpiderSynQuestion": "List the name of music dramas that do not have actors.", + "query": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)" + }, + { + "db_id": "musical", + "SpiderQuestion": "What are the names of musicals who have no actors?", + "SpiderSynQuestion": "What are the names of music dramas who have no performers?", + "query": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show the nominees that have nominated musicals for both \"Tony Award\" and \"Drama Desk Award\".", + "SpiderSynQuestion": "Show the nominees that have nominated music dramas for both \"Tony Award\" and \"Drama Desk Award\".", + "query": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" INTERSECT SELECT Nominee FROM musical WHERE Award = \"Drama Desk Award\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?", + "SpiderSynQuestion": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?", + "query": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" INTERSECT SELECT Nominee FROM musical WHERE Award = \"Drama Desk Award\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "Show the musical nominee with award \"Bob Fosse\" or \"Cleavant Derricks\".", + "SpiderSynQuestion": "Show the music drama nominee with award \"Bob Fosse\" or \"Cleavant Derricks\".", + "query": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" OR Award = \"Cleavant Derricks\"" + }, + { + "db_id": "musical", + "SpiderQuestion": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?", + "SpiderSynQuestion": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?", + "query": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" OR Award = \"Cleavant Derricks\"" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the emails of the user named \"Mary\".", + "SpiderSynQuestion": "Find the emails of the user named \"Mary\".", + "query": "SELECT email FROM user_profiles WHERE name = 'Mary'" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "What is the partition id of the user named \"Iron Man\".", + "SpiderSynQuestion": "What is the partition id of the user named \"Iron Man\".", + "query": "SELECT partitionid FROM user_profiles WHERE name = 'Iron Man'" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "How many users are there?", + "SpiderSynQuestion": "How many users are there?", + "query": "SELECT count(*) FROM user_profiles" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "How many followers does each user have?", + "SpiderSynQuestion": "How many followers does each user have?", + "query": "SELECT count(*) FROM follows" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the number of followers for each user.", + "SpiderSynQuestion": "Find the number of followers for each user.", + "query": "SELECT count(*) FROM follows GROUP BY f1" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the number of tweets in record.", + "SpiderSynQuestion": "Find the number of tweets in record.", + "query": "SELECT count(*) FROM tweets" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the number of users who posted some tweets.", + "SpiderSynQuestion": "Find the number of users who posted some tweets.", + "query": "SELECT count(DISTINCT UID) FROM tweets" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name and email of the user whose name contains the word \u2018Swift\u2019.", + "SpiderSynQuestion": "Find the name and email of the user whose name contains the word \u2018Swift\u2019.", + "query": "SELECT name , email FROM user_profiles WHERE name LIKE '%Swift%'" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.", + "SpiderSynQuestion": "Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.", + "query": "SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%'" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Return the text of tweets about the topic 'intern'.", + "SpiderSynQuestion": "Return the content of tweets about the topic 'intern'.", + "query": "SELECT text FROM tweets WHERE text LIKE '%intern%'" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name and email of the users who have more than 1000 followers.", + "SpiderSynQuestion": "Find the name and email of the users who have more than 1000 followers.", + "query": "SELECT name , email FROM user_profiles WHERE followers > 1000" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the names of the users whose number of followers is greater than that of the user named \"Tyler Swift\".", + "SpiderSynQuestion": "Find the names of the users whose number of followers is greater than that of the user named \"Tyler Swift\".", + "query": "SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > (SELECT count(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift')" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name and email for the users who have more than one follower.", + "SpiderSynQuestion": "Find the name and email for the users who have more than one follower.", + "query": "SELECT T1.name , T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > 1" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the names of users who have more than one tweet.", + "SpiderSynQuestion": "Find the names of users who have more than one tweet.", + "query": "SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the id of users who are followed by Mary and Susan.", + "SpiderSynQuestion": "Find the id of users who are followed by Mary and Susan.", + "query": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"Mary\" INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"Susan\"" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the id of users who are followed by Mary or Susan.", + "SpiderSynQuestion": "Find the id of users who are followed by Mary or Susan.", + "query": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"Mary\" OR T1.name = \"Susan\"" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name of the user who has the largest number of followers.", + "SpiderSynQuestion": "Find the name of the user who has the largest number of followers.", + "query": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name and email of the user followed by the least number of people.", + "SpiderSynQuestion": "Find the name and email of the user followed by the least number of people.", + "query": "SELECT name , email FROM user_profiles ORDER BY followers LIMIT 1" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.", + "SpiderSynQuestion": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.", + "query": "SELECT name , followers FROM user_profiles ORDER BY followers DESC" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "List the names of 5 users followed by the largest number of other users.", + "SpiderSynQuestion": "List the names of 5 users followed by the largest number of other users.", + "query": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "List the text of all tweets in the order of date.", + "SpiderSynQuestion": "List the content of all tweets in the order of date.", + "query": "SELECT text FROM tweets ORDER BY createdate" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name of each user and number of tweets tweeted by each of them.", + "SpiderSynQuestion": "Find the name of each user and number of tweets tweeted by each of them.", + "query": "SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name and partition id for users who tweeted less than twice.", + "SpiderSynQuestion": "Find the name and partition id for users who tweeted less than twice.", + "query": "SELECT T1.name , T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) < 2" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.", + "SpiderSynQuestion": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.", + "query": "SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the average number of followers for the users who do not have any tweet.", + "SpiderSynQuestion": "Find the average number of followers for the users who do not have any tweet.", + "query": "SELECT avg(followers) FROM user_profiles WHERE UID NOT IN (SELECT UID FROM tweets)" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the average number of followers for the users who had some tweets.", + "SpiderSynQuestion": "Find the average number of followers for the users who had some tweets.", + "query": "SELECT avg(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)" + }, + { + "db_id": "twitter_1", + "SpiderQuestion": "Find the maximum and total number of followers of all users.", + "SpiderSynQuestion": "Find the maximum and total number of followers of all users.", + "query": "SELECT max(followers) , sum(followers) FROM user_profiles" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the names of all the catalog entries.", + "SpiderSynQuestion": "Find the names of all the catalogue entries.", + "query": "SELECT distinct(catalog_entry_name) FROM catalog_contents" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are all the catalog entry names?", + "SpiderSynQuestion": "What are all the catalogue entry names?", + "query": "SELECT distinct catalog_entry_name FROM catalog_contents" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the list of attribute data types possessed by more than 3 attribute definitions.", + "SpiderSynQuestion": "Find the list of feature data categories possessed by more than 3 feature definitions.", + "query": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are the attribute data types with more than 3 attribute definitions?", + "SpiderSynQuestion": "What are the feature data categories with more than 3 feature definitions?", + "query": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What is the attribute data type of the attribute with name \"Green\"?", + "SpiderSynQuestion": "What is the feature data category of the feature with name \"Green\"?", + "query": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = \"Green\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the attribute data type for the attribute named \"Green\".", + "SpiderSynQuestion": "Find the feature data category for the feature named \"Green\".", + "query": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = \"Green\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the name and level of catalog structure with level between 5 and 10.", + "SpiderSynQuestion": "Find the name and level of catalogue structure with level between 5 and 10.", + "query": "SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are the name and level of catalog structure with level number between 5 and 10", + "SpiderSynQuestion": "What are the name and level of catalogue structure with level number between 5 and 10", + "query": "SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find all the catalog publishers whose name contains \"Murray\"", + "SpiderSynQuestion": "Find all the catalogue publishers whose name contains \"Murray\"", + "query": "SELECT distinct catalog_publisher FROM catalogs WHERE catalog_publisher LIKE \"%Murray%\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which catalog publishers have substring \"Murray\" in their names?", + "SpiderSynQuestion": "Which catalogue publishers have substring \"Murray\" in their names?", + "query": "SELECT distinct catalog_publisher FROM catalogs WHERE catalog_publisher LIKE \"%Murray%\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which catalog publisher has published the most catalogs?", + "SpiderSynQuestion": "Which catalogue publisher has published the most catalogues?", + "query": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the catalog publisher that has the most catalogs.", + "SpiderSynQuestion": "Find the catalogue publisher that has the most catalogues.", + "query": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the names and publication dates of all catalogs that have catalog level number greater than 5.", + "SpiderSynQuestion": "Find the names and publication days of all catalogues that have catalogue level number greater than 5.", + "query": "SELECT t1.catalog_name , t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are the name and publication date of the catalogs with catalog level number above 5?", + "SpiderSynQuestion": "What are the name and publication day of the catalogues with catalogue level number above 5?", + "query": "SELECT t1.catalog_name , t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are the entry names of catalog with the attribute possessed by most entries.", + "SpiderSynQuestion": "What are the entry names of catalogue with the attribute possessed by most entries.", + "query": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the entry names of the catalog with the attribute that have the most entries.", + "SpiderSynQuestion": "Find the entry names of the catalogue with the attribute that have the most entries.", + "query": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What is the entry name of the most expensive catalog (in USD)?", + "SpiderSynQuestion": "What is the entry name of the most expensive catalogue (in USD)?", + "query": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the entry name of the catalog with the highest price (in USD).", + "SpiderSynQuestion": "Find the entry name of the catalogue with the highest price (in USD).", + "query": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What is the level name of the cheapest catalog (in USD)?", + "SpiderSynQuestion": "What is the level name of the cheapest catalogue (in USD)?", + "query": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the level name of the catalog with the lowest price (in USD).", + "SpiderSynQuestion": "Find the level name of the catalogue with the lowest price (in USD).", + "query": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are the average and minimum price (in Euro) of all products?", + "SpiderSynQuestion": "What are the average and minimum price (in Euro) of all products?", + "query": "SELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Give me the average and minimum price (in Euro) of the products.", + "SpiderSynQuestion": "Give me the average and minimum price (in Euro) of the products.", + "query": "SELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What is the product with the highest height? Give me the catalog entry name.", + "SpiderSynQuestion": "What is the products with the highest height? Give me the catalogue entry name.", + "query": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which catalog content has the highest height? Give me the catalog entry name.", + "SpiderSynQuestion": "Which catalogue content has the highest height? Give me the catalogue entry name.", + "query": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the name of the product that has the smallest capacity.", + "SpiderSynQuestion": "Find the name of the product that has the smallest capacity.", + "query": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which catalog content has the smallest capacity? Return the catalog entry name.", + "SpiderSynQuestion": "Which catalogue content has the smallest capacity? Return the catalogue entry name.", + "query": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the names of all the products whose stock number starts with \"2\".", + "SpiderSynQuestion": "Find the names of all the products whose stock number starts with \"2\".", + "query": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE \"2%\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which catalog contents have a product stock number that starts from \"2\"? Show the catalog entry names.", + "SpiderSynQuestion": "Which catalogue contents have a product stock number that starts from \"2\"? Show the catalogue entry names.", + "query": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE \"2%\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the names of catalog entries with level number 8.", + "SpiderSynQuestion": "Find the names of catalogue entries with level number 8.", + "query": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = \"8\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are the names of catalog entries with level number 8?", + "SpiderSynQuestion": "What are the names of catalogue entries with level number 8?", + "query": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = \"8\"" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the names of the products with length smaller than 3 or height greater than 5.", + "SpiderSynQuestion": "Find the names of the products with length smaller than 3 or height greater than 5.", + "query": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.", + "SpiderSynQuestion": "Which catalogue contents have length below 3 or above 5? Find the catalogue entry names.", + "query": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the name and attribute ID of the attribute definitions with attribute value 0.", + "SpiderSynQuestion": "Find the name and feature ID of the feature definitions with feature value 0.", + "query": "SELECT t1.attribute_name , t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.", + "SpiderSynQuestion": "Which feature definitions have feature value 0? Give me the feature name and feature ID.", + "query": "SELECT t1.attribute_name , t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the name and capacity of products with price greater than 700 (in USD).", + "SpiderSynQuestion": "Find the name and capacity of products with price greater than 700 (in USD).", + "query": "SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.", + "SpiderSynQuestion": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.", + "query": "SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the dates on which more than one revisions were made.", + "SpiderSynQuestion": "Find the days on which more than one revisions were made.", + "query": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*) > 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "On which days more than one revisions were made on catalogs.", + "SpiderSynQuestion": "On which days more than one revisions were made on catalogs.", + "query": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*) > 1" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "How many products are there in the records?", + "SpiderSynQuestion": "How many goods are there in the records?", + "query": "SELECT count(*) FROM catalog_contents" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Find the total number of catalog contents.", + "SpiderSynQuestion": "Find the total number of catalog contents.", + "query": "SELECT count(*) FROM catalog_contents" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "Name all the products with next entry ID greater than 8.", + "SpiderSynQuestion": "Name all the products with next entry ID greater than 8.", + "query": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8" + }, + { + "db_id": "product_catalog", + "SpiderQuestion": "What are the catalog entry names of the products with next entry ID above 8?", + "SpiderSynQuestion": "What are the catalogue entry names of the products with next entry ID above 8?", + "query": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "How many aircrafts do we have?", + "SpiderSynQuestion": "How many airplanes do we have?", + "query": "SELECT count(*) FROM Aircraft" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "How many aircrafts exist in the database?", + "SpiderSynQuestion": "How many airplanes exist in the database?", + "query": "SELECT count(*) FROM Aircraft" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show name and distance for all aircrafts.", + "SpiderSynQuestion": "Show name and flight length for all airplanes.", + "query": "SELECT name , distance FROM Aircraft" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names and distances for all airplanes?", + "SpiderSynQuestion": "What are the names and flight length for all airplanes?", + "query": "SELECT name , distance FROM Aircraft" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show ids for all aircrafts with more than 1000 distance.", + "SpiderSynQuestion": "Show ids for all airplanes with more than 1000 distance.", + "query": "SELECT aid FROM Aircraft WHERE distance > 1000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the ids of all aircrafts that can cover a distance of more than 1000?", + "SpiderSynQuestion": "What are the ids of all airplanes that can cover a distance of more than 1000?", + "query": "SELECT aid FROM Aircraft WHERE distance > 1000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "How many aircrafts have distance between 1000 and 5000?", + "SpiderSynQuestion": "How many airplanes have flight length between 1000 and 5000?", + "query": "SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the count of aircrafts that have a distance between 1000 and 5000?", + "SpiderSynQuestion": "What is the count of plane that have a distance between 1000 and 5000?", + "query": "SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name and distance for aircraft with id 12?", + "SpiderSynQuestion": "What is the name and flight length for plane with id 12?", + "query": "SELECT name , distance FROM Aircraft WHERE aid = 12" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name and distance for the aircraft that has an id of 12?", + "SpiderSynQuestion": "What is the name and flight length for the plane that has an id of 12?", + "query": "SELECT name , distance FROM Aircraft WHERE aid = 12" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the minimum, average, and maximum distance of all aircrafts.", + "SpiderSynQuestion": "What is the minimum, average, and maximum flight length of all airplanes.", + "query": "SELECT min(distance) , avg(distance) , max(distance) FROM Aircraft" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Return the minimum, average and maximum distances traveled across all aircrafts.", + "SpiderSynQuestion": "Return the minimum, average and maximum flight length traveled across all airplanes.", + "query": "SELECT min(distance) , avg(distance) , max(distance) FROM Aircraft" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the id and name of the aircraft with the maximum distance.", + "SpiderSynQuestion": "Show the id and name of the airplane with the maximum distance.", + "query": "SELECT aid , name FROM Aircraft ORDER BY distance DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the id and name of the aircraft that can cover the maximum distance?", + "SpiderSynQuestion": "What is the id and name of the airplane that can cover the maximum distance?", + "query": "SELECT aid , name FROM Aircraft ORDER BY distance DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the name of aircrafts with top three lowest distances.", + "SpiderSynQuestion": "Show the name of airplanes with top three lowest distances.", + "query": "SELECT name FROM Aircraft ORDER BY distance LIMIT 3" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the aircrafts with top 3 shortest lengthes? List their names.", + "SpiderSynQuestion": "What are the airplanes with top 3 shortest lengthes? List their names.", + "query": "SELECT name FROM Aircraft ORDER BY distance LIMIT 3" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show names for all aircrafts with distances more than the average.", + "SpiderSynQuestion": "Show names for all planes with distances more than the average.", + "query": "SELECT name FROM Aircraft WHERE distance > (SELECT avg(distance) FROM Aircraft)" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names of all aircrafts that can cover more distances than average?", + "SpiderSynQuestion": "What are the names of all planes that can cover more distances than average?", + "query": "SELECT name FROM Aircraft WHERE distance > (SELECT avg(distance) FROM Aircraft)" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "How many employees do we have?", + "SpiderSynQuestion": "How many staffs do we have?", + "query": "SELECT count(*) FROM Employee" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the number of employees?", + "SpiderSynQuestion": "What is the number of staffs?", + "query": "SELECT count(*) FROM Employee" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show name and salary for all employees sorted by salary.", + "SpiderSynQuestion": "Show name and wage for all employees sorted by wage.", + "query": "SELECT name , salary FROM Employee ORDER BY salary" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name and salary of all employees in order of salary?", + "SpiderSynQuestion": "What is the name and wage of all staffs in order of wage?", + "query": "SELECT name , salary FROM Employee ORDER BY salary" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show ids for all employees with at least 100000 salary.", + "SpiderSynQuestion": "Show ids for all staffs with at least 100000 salary.", + "query": "SELECT eid FROM Employee WHERE salary > 100000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the id of every employee who has at least a salary of 100000?", + "SpiderSynQuestion": "What is the id of every staff who has at least a salary of 100000?", + "query": "SELECT eid FROM Employee WHERE salary > 100000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "How many employees have salary between 100000 and 200000?", + "SpiderSynQuestion": "How many staffs have wage between 100000 and 200000?", + "query": "SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the number of employees that have a salary between 100000 and 200000?", + "SpiderSynQuestion": "What is the number of staffs that have a wage between 100000 and 200000?", + "query": "SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name and salary for employee with id 242518965?", + "SpiderSynQuestion": "What is the name and wage for employee with id 242518965?", + "query": "SELECT name , salary FROM Employee WHERE eid = 242518965" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name and salary of the employee with the id 242518965?", + "SpiderSynQuestion": "What is the name and wage of the employee with the id 242518965?", + "query": "SELECT name , salary FROM Employee WHERE eid = 242518965" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is average and maximum salary of all employees.", + "SpiderSynQuestion": "What is average and maximum wage of all staffs.", + "query": "SELECT avg(salary) , max(salary) FROM Employee" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the average and largest salary of all employees?", + "SpiderSynQuestion": "What is the average and largest wage of all employees?", + "query": "SELECT avg(salary) , max(salary) FROM Employee" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the id and name of the employee with maximum salary.", + "SpiderSynQuestion": "Show the id and name of the staff with maximum wage .", + "query": "SELECT eid , name FROM Employee ORDER BY salary DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the id and name of the employee with the highest salary?", + "SpiderSynQuestion": "What is the id and name of the staff with the highest salary?", + "query": "SELECT eid , name FROM Employee ORDER BY salary DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the name of employees with three lowest salaries.", + "SpiderSynQuestion": "Show the name of staffs with three lowest salaries.", + "query": "SELECT name FROM Employee ORDER BY salary ASC LIMIT 3" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name of the 3 employees who get paid the least?", + "SpiderSynQuestion": "What is the name of the 3 staffs who get paid the least?", + "query": "SELECT name FROM Employee ORDER BY salary ASC LIMIT 3" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show names for all employees with salary more than the average.", + "SpiderSynQuestion": "Show names for all staffs with salary more than the average.", + "query": "SELECT name FROM Employee WHERE salary > (SELECT avg(salary) FROM Employee)" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names of all employees who have a salary higher than average?", + "SpiderSynQuestion": "What are the names of all staffs who have a salary higher than average?", + "query": "SELECT name FROM Employee WHERE salary > (SELECT avg(salary) FROM Employee)" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the id and salary of Mark Young.", + "SpiderSynQuestion": "Show the id and wage of Mark Young.", + "query": "SELECT eid , salary FROM Employee WHERE name = 'Mark Young'" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the id and salary of the employee named Mark Young?", + "SpiderSynQuestion": "What is the id and wage of the employee named Mark Young?", + "query": "SELECT eid , salary FROM Employee WHERE name = 'Mark Young'" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "How many flights do we have?", + "SpiderSynQuestion": "How many flights do we have?", + "query": "SELECT count(*) FROM Flight" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the number of flights?", + "SpiderSynQuestion": "What is the number of flights?", + "query": "SELECT count(*) FROM Flight" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.", + "SpiderSynQuestion": "Show flight number, starting point, destination of all flights in the alphabetical order of the departure cities.", + "query": "SELECT flno , origin , destination FROM Flight ORDER BY origin" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?", + "SpiderSynQuestion": "What is the flight number, starting point, and destination for all flights in alphabetical order by departure cities?", + "query": "SELECT flno , origin , destination FROM Flight ORDER BY origin" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show all flight number from Los Angeles.", + "SpiderSynQuestion": "Show all flight number from Los Angeles.", + "query": "SELECT flno FROM Flight WHERE origin = \"Los Angeles\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the numbers of all flights coming from Los Angeles?", + "SpiderSynQuestion": "What are the numbers of all flights coming from Los Angeles?", + "query": "SELECT flno FROM Flight WHERE origin = \"Los Angeles\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show origins of all flights with destination Honolulu.", + "SpiderSynQuestion": "Show starting point of all flights with terminal Honolulu.", + "query": "SELECT origin FROM Flight WHERE destination = \"Honolulu\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the origins of all flights that are headed to Honolulu?", + "SpiderSynQuestion": "What are the starting point of all flights that are headed to Honolulu?", + "query": "SELECT origin FROM Flight WHERE destination = \"Honolulu\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.", + "SpiderSynQuestion": "Show me the leaving day and arriving day for all flights from Los Angeles to Honolulu.", + "query": "SELECT departure_date , arrival_date FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the departure and arrival dates of all flights from LA to Honolulu?", + "SpiderSynQuestion": "What are the leaving and arriving days of all flights from LA to Honolulu?", + "query": "SELECT departure_date , arrival_date FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show flight number for all flights with more than 2000 distance.", + "SpiderSynQuestion": "Show flight number for all flights with more than 2000 distance.", + "query": "SELECT flno FROM Flight WHERE distance > 2000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the numbers of all flights that can cover a distance of more than 2000?", + "SpiderSynQuestion": "What are the numbers of all flights that can cover a distance of more than 2000?", + "query": "SELECT flno FROM Flight WHERE distance > 2000" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the average price for flights from Los Angeles to Honolulu.", + "SpiderSynQuestion": "What is the average price for flights from Los Angeles to Honolulu.", + "query": "SELECT avg(price) FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the average price for flights from LA to Honolulu?", + "SpiderSynQuestion": "What is the average price for flights from LA to Honolulu?", + "query": "SELECT avg(price) FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show origin and destination for flights with price higher than 300.", + "SpiderSynQuestion": "Show starting point and destination for flights with price higher than 300.", + "query": "SELECT origin , destination FROM Flight WHERE price > 300" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the origin and destination for all flights whose price is higher than 300?", + "SpiderSynQuestion": "What is the starting point and terminal for all flights whose price is higher than 300?", + "query": "SELECT origin , destination FROM Flight WHERE price > 300" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the flight number and distance of the flight with maximum price.", + "SpiderSynQuestion": "Show the flight number and flight length of the flight with maximum price.", + "query": "SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the flight number and its distance for the one with the maximum price?", + "SpiderSynQuestion": "What is the flight number and its flight length for the one with the maximum price?", + "query": "SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the flight number of flights with three lowest distances.", + "SpiderSynQuestion": "Show the flight number of flights with three lowest flight length.", + "query": "SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the numbers of the shortest flights?", + "SpiderSynQuestion": "What are the numbers of the shortest flights?", + "query": "SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the average distance and average price for flights from Los Angeles.", + "SpiderSynQuestion": "What is the average flight length and average price for flights from Los Angeles.", + "query": "SELECT avg(distance) , avg(price) FROM Flight WHERE origin = \"Los Angeles\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the average distance and price for all flights from LA?", + "SpiderSynQuestion": "What is the average flight length and price for all flights from LA?", + "query": "SELECT avg(distance) , avg(price) FROM Flight WHERE origin = \"Los Angeles\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show all origins and the number of flights from each origin.", + "SpiderSynQuestion": "Show all starting point and the number of flights from each starting point.", + "query": "SELECT origin , count(*) FROM Flight GROUP BY origin" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "For each origin, how many flights came from there?", + "SpiderSynQuestion": "For each starting point, how many flights came from there?", + "query": "SELECT origin , count(*) FROM Flight GROUP BY origin" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show all destinations and the number of flights to each destination.", + "SpiderSynQuestion": "Show all destinations and the number of flights to each terminal.", + "query": "SELECT destination , count(*) FROM Flight GROUP BY destination" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the destinations and number of flights to each one?", + "SpiderSynQuestion": "What are the destinations and number of flights to each one?", + "query": "SELECT destination , count(*) FROM Flight GROUP BY destination" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Which origin has most number of flights?", + "SpiderSynQuestion": "Which starting point has most number of flights?", + "query": "SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What place has the most flights coming from there?", + "SpiderSynQuestion": "What place has the most flights coming from there?", + "query": "SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Which destination has least number of flights?", + "SpiderSynQuestion": "Which terminal has least number of flights?", + "query": "SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What destination has the fewest number of flights?", + "SpiderSynQuestion": "What destination has the fewest number of flights?", + "query": "SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the aircraft name for the flight with number 99", + "SpiderSynQuestion": "What is the airplane name for the flight with number 99", + "query": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name of the aircraft that was on flight number 99?", + "SpiderSynQuestion": "What is the name of the airplane that was on flight number 99?", + "query": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show all flight numbers with aircraft Airbus A340-300.", + "SpiderSynQuestion": "Show all flight numbers with airplane Airbus A340-300.", + "query": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = \"Airbus A340-300\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the flight numbers for the aircraft Airbus A340-300?", + "SpiderSynQuestion": "What are the flight numbers for the airplane Airbus A340-300?", + "query": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = \"Airbus A340-300\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show aircraft names and number of flights for each aircraft.", + "SpiderSynQuestion": "Show plane names and number of flights for each plane.", + "query": "SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name of each aircraft and how many flights does each one complete?", + "SpiderSynQuestion": "What is the name of each plane and how many flights does each one complete?", + "query": "SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show names for all aircraft with at least two flights.", + "SpiderSynQuestion": "Show names for all plane with at least two flights.", + "query": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names for all aircrafts with at least 2 flights?", + "SpiderSynQuestion": "What are the names for all planes with at least 2 flights?", + "query": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "How many employees have certificate.", + "SpiderSynQuestion": "How many staffs have certificate.", + "query": "SELECT count(DISTINCT eid) FROM Certificate" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the count of distinct employees with certificates?", + "SpiderSynQuestion": "What is the count of different staffs with certificates?", + "query": "SELECT count(DISTINCT eid) FROM Certificate" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show ids for all employees who don't have a certificate.", + "SpiderSynQuestion": "Show ids for all staffs who don't have a certificate.", + "query": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the ids of all employees that don't have certificates?", + "SpiderSynQuestion": "What are the ids of all staffs that don't have certificates?", + "query": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show names for all aircrafts of which John Williams has certificates.", + "SpiderSynQuestion": "Show names for all aircrafts of which John Williams has credentials.", + "query": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = \"John Williams\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names of all aircrafts that John Williams have certificates to be able to fly?", + "SpiderSynQuestion": "What are the names of all plane that John Williams have certificates to be able to fly?", + "query": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = \"John Williams\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show names for all employees who have certificate of Boeing 737-800.", + "SpiderSynQuestion": "Show names for all staffs who have certificate of Boeing 737-800.", + "query": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names of all employees who have a certificate to fly Boeing 737-800?", + "SpiderSynQuestion": "What are the names of all staffs who have a certificate to fly Boeing 737-800?", + "query": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.", + "SpiderSynQuestion": "Show names for all staffs who have credentials on both Boeing 737-800 and Airbus A340-300.", + "query": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Airbus A340-300\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?", + "SpiderSynQuestion": "What are the names of all staffs who can fly both the Boeing 737-800 and the Airbus A340-300?", + "query": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Airbus A340-300\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show names for all employees who do not have certificate of Boeing 737-800.", + "SpiderSynQuestion": "Show names for all staffs who do not have certificate of Boeing 737-800.", + "query": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names of all employees who are not certified to fly Boeing 737-800s?", + "SpiderSynQuestion": "What are the names of all staffs who are not certified to fly Boeing 737-800s?", + "query": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the name of aircraft which fewest people have its certificate.", + "SpiderSynQuestion": "Show the name of plane which fewest people have its certificate.", + "query": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What are the names of the aircraft that the least people are certified to fly?", + "SpiderSynQuestion": "What are the names of the plane that the least people are certified to fly?", + "query": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.", + "SpiderSynQuestion": "Show the name and flight length of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.", + "query": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?", + "SpiderSynQuestion": "What is the name and flight length of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?", + "query": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "what is the salary and name of the employee who has the most number of aircraft certificates?", + "SpiderSynQuestion": "what is the wage and name of the employee who has the most number of aircraft certificates?", + "query": "SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the salaray and name of the employee that is certified to fly the most planes?", + "SpiderSynQuestion": "What is the wage and name of the employee that is certified to fly the most planes?", + "query": "SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?", + "SpiderSynQuestion": "What is the wage and name of the staff who has the most number of certificates on aircrafts with distance more than 5000?", + "query": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_1", + "SpiderQuestion": "What is the salaray and name of the employee with the most certificates to fly planes more than 5000?", + "SpiderSynQuestion": "What is the wage and name of the employee with the most certificates to fly planes more than 5000?", + "query": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many allergies are there?", + "SpiderSynQuestion": "How many hypersensitivities are there?", + "query": "SELECT count(DISTINCT allergy) FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many allergy entries are there?", + "SpiderSynQuestion": "How many hypersensitivity entries are there?", + "query": "SELECT count(DISTINCT allergy) FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many different allergy types exist?", + "SpiderSynQuestion": "How many different hypersensitivity categories exist?", + "query": "SELECT count(DISTINCT allergytype) FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many distinct allergies are there?", + "SpiderSynQuestion": "How many different hypersensitivities are there?", + "query": "SELECT count(DISTINCT allergytype) FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all allergy types.", + "SpiderSynQuestion": "Show all hypersensitivity categories.", + "query": "SELECT DISTINCT allergytype FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the different allergy types?", + "SpiderSynQuestion": "What are the different hypersensitivity categories?", + "query": "SELECT DISTINCT allergytype FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all allergies and their types.", + "SpiderSynQuestion": "Show all hypersensitivities and their categories.", + "query": "SELECT allergy , allergytype FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the allergies and their types?", + "SpiderSynQuestion": "What are the hypersensitivities and their categories?", + "query": "SELECT allergy , allergytype FROM Allergy_type" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all allergies with type food.", + "SpiderSynQuestion": "Show all hypersensitivities with type food.", + "query": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = \"food\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are all the different food allergies?", + "SpiderSynQuestion": "What are all the different food hypersensitivities?", + "query": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = \"food\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What is the type of allergy Cat?", + "SpiderSynQuestion": "What is the category of allergy Cat?", + "query": "SELECT allergytype FROM Allergy_type WHERE allergy = \"Cat\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What is allergy type of a cat allergy?", + "SpiderSynQuestion": "What is allergy category of a cat allergy?", + "query": "SELECT allergytype FROM Allergy_type WHERE allergy = \"Cat\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many allergies have type animal?", + "SpiderSynQuestion": "How many hypersensitivities have type animal?", + "query": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many animal type allergies exist?", + "SpiderSynQuestion": "How many animal category allergies exist?", + "query": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all allergy types and the number of allergies in each type.", + "SpiderSynQuestion": "Show all hypersensitivity categories and the number of hypersensitivities in each category.", + "query": "SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the allergy types and how many allergies correspond to each one?", + "SpiderSynQuestion": "What are the hypersensitivity categories and how many hypersensitivities correspond to each one?", + "query": "SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which allergy type has most number of allergies?", + "SpiderSynQuestion": "Which hypersensitivity category has most number of hypersensitivities?", + "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which allergy type is most common?", + "SpiderSynQuestion": "Which hypersensitivity category is most common?", + "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which allergy type has least number of allergies?", + "SpiderSynQuestion": "Which hypersensitivity category has least number of hypersensitivities?", + "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which allergy type is the least common?", + "SpiderSynQuestion": "Which hypersensitivity category is the least common?", + "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are there?", + "SpiderSynQuestion": "How many students are there?", + "query": "SELECT count(*) FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What is the total number of students?", + "SpiderSynQuestion": "What is the total number of students?", + "query": "SELECT count(*) FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show first name and last name for all students.", + "SpiderSynQuestion": "Show forename and surname for all students.", + "query": "SELECT Fname , Lname FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the full names of all students", + "SpiderSynQuestion": "What are the full names of all students", + "query": "SELECT Fname , Lname FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many different advisors are listed?", + "SpiderSynQuestion": "How many different advisers are listed?", + "query": "SELECT count(DISTINCT advisor) FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many advisors are there?", + "SpiderSynQuestion": "How many advisers are there?", + "query": "SELECT count(DISTINCT advisor) FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all majors.", + "SpiderSynQuestion": "Show all discipline.", + "query": "SELECT DISTINCT Major FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the different majors?", + "SpiderSynQuestion": "What are the different discipline?", + "query": "SELECT DISTINCT Major FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all cities where students live.", + "SpiderSynQuestion": "Show all towns where students live.", + "query": "SELECT DISTINCT city_code FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What cities do students live in?", + "SpiderSynQuestion": "What towns do students live in?", + "query": "SELECT DISTINCT city_code FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show first name, last name, age for all female students. Their sex is F.", + "SpiderSynQuestion": "Show forename, family name, age for all female students. Their sex is F.", + "query": "SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the full names and ages for all female students whose sex is F?", + "SpiderSynQuestion": "What are the full names and ages for all female students whose sex is F?", + "query": "SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show student ids for all male students.", + "SpiderSynQuestion": "Show student ids for all male students.", + "query": "SELECT StuID FROM Student WHERE Sex = 'M'" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the student ids for all male students?", + "SpiderSynQuestion": "What are the student ids for all male students?", + "query": "SELECT StuID FROM Student WHERE Sex = 'M'" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are age 18?", + "SpiderSynQuestion": "How many students are age 18?", + "query": "SELECT count(*) FROM Student WHERE age = 18" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are 18 years old?", + "SpiderSynQuestion": "How many students are 18 years old?", + "query": "SELECT count(*) FROM Student WHERE age = 18" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all student ids who are older than 20.", + "SpiderSynQuestion": "Show all student ids who are older than 20.", + "query": "SELECT StuID FROM Student WHERE age > 20" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the student ids for students over 20 years old?", + "SpiderSynQuestion": "What are the student ids for students over 20 years old?", + "query": "SELECT StuID FROM Student WHERE age > 20" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which city does the student whose last name is \"Kim\" live in?", + "SpiderSynQuestion": "Which town does the student whose surname is \"Kim\" live in?", + "query": "SELECT city_code FROM Student WHERE LName = \"Kim\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Give the city that the student whose family name is Kim lives in.", + "SpiderSynQuestion": "Give the town that the student whose surname is Kim lives in.", + "query": "SELECT city_code FROM Student WHERE LName = \"Kim\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Who is the advisor of student with ID 1004?", + "SpiderSynQuestion": "Who is the adviser of student with ID 1004?", + "query": "SELECT Advisor FROM Student WHERE StuID = 1004" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Who advises student 1004?", + "SpiderSynQuestion": "Who advises student 1004?", + "query": "SELECT Advisor FROM Student WHERE StuID = 1004" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students live in HKG or CHI?", + "SpiderSynQuestion": "How many students live in HKG or CHI?", + "query": "SELECT count(*) FROM Student WHERE city_code = \"HKG\" OR city_code = \"CHI\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Give the number of students living in either HKG or CHI.", + "SpiderSynQuestion": "Give the number of students living in either HKG or CHI.", + "query": "SELECT count(*) FROM Student WHERE city_code = \"HKG\" OR city_code = \"CHI\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show the minimum, average, and maximum age of all students.", + "SpiderSynQuestion": "Show the minimum, average, and maximum age of all students.", + "query": "SELECT min(age) , avg(age) , max(age) FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What is the minimum, mean, and maximum age across all students?", + "SpiderSynQuestion": "What is the minimum, mean, and maximum age across all students?", + "query": "SELECT min(age) , avg(age) , max(age) FROM Student" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What is the last name of the youngest student?", + "SpiderSynQuestion": "What is the surname of the youngest student?", + "query": "SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Provide the last name of the youngest student.", + "SpiderSynQuestion": "Provide the surname of the youngest student.", + "query": "SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show the student id of the oldest student.", + "SpiderSynQuestion": "Show the student id of the oldest student.", + "query": "SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What student id corresponds to the oldest student?", + "SpiderSynQuestion": "What student id corresponds to the oldest student?", + "query": "SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all majors and corresponding number of students.", + "SpiderSynQuestion": "Show all discipline and corresponding number of students.", + "query": "SELECT major , count(*) FROM Student GROUP BY major" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are there for each major?", + "SpiderSynQuestion": "How many students are there for each discipline?", + "query": "SELECT major , count(*) FROM Student GROUP BY major" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which major has most number of students?", + "SpiderSynQuestion": "Which discipline has most number of students?", + "query": "SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What is the largest major?", + "SpiderSynQuestion": "What is the largest discipline?", + "query": "SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all ages and corresponding number of students.", + "SpiderSynQuestion": "Show all ages and corresponding number of students.", + "query": "SELECT age , count(*) FROM Student GROUP BY age" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How old is each student and how many students are each age?", + "SpiderSynQuestion": "How old is each student and how many students are each age?", + "query": "SELECT age , count(*) FROM Student GROUP BY age" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show the average age for male and female students.", + "SpiderSynQuestion": "Show the average age for schoolboy and schoolgirl .", + "query": "SELECT avg(age) , sex FROM Student GROUP BY sex" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the average ages for male and female students?", + "SpiderSynQuestion": "What are the average ages for schoolboy and schoolgirl?", + "query": "SELECT avg(age) , sex FROM Student GROUP BY sex" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all cities and corresponding number of students.", + "SpiderSynQuestion": "Show all towns and corresponding number of students.", + "query": "SELECT city_code , count(*) FROM Student GROUP BY city_code" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students live in each city?", + "SpiderSynQuestion": "How many students live in each town?", + "query": "SELECT city_code , count(*) FROM Student GROUP BY city_code" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all advisors and corresponding number of students.", + "SpiderSynQuestion": "Show all advisers and corresponding number of students.", + "query": "SELECT advisor , count(*) FROM Student GROUP BY advisor" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students does each advisor have?", + "SpiderSynQuestion": "How many students does each adviser have?", + "query": "SELECT advisor , count(*) FROM Student GROUP BY advisor" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which advisor has most number of students?", + "SpiderSynQuestion": "Which adviser has most number of students?", + "query": "SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Give the advisor with the most students.", + "SpiderSynQuestion": "Give the adviser with the most students.", + "query": "SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students have cat allergies?", + "SpiderSynQuestion": "How many students have cat allergies?", + "query": "SELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are affected by cat allergies?", + "SpiderSynQuestion": "How many students are affected by cat allergies?", + "query": "SELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all student IDs who have at least two allergies.", + "SpiderSynQuestion": "Show all student IDs who have at least two allergies.", + "query": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the students ids of students who have more than one allergy?", + "SpiderSynQuestion": "What are the students ids of students who have more than one allergy?", + "query": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the student ids of students who don't have any allergies?", + "SpiderSynQuestion": "What are the student ids of students who don't have any allergies?", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which students are unaffected by allergies?", + "SpiderSynQuestion": "Which students are unaffected by allergies?", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many female students have milk or egg allergies?", + "SpiderSynQuestion": "How many schoolgirl have milk or egg allergies?", + "query": "SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = \"F\" AND T1.allergy = \"Milk\" OR T1.allergy = \"Eggs\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students who are female are allergic to milk or eggs?", + "SpiderSynQuestion": "How many students who are female are allergic to milk or eggs?", + "query": "SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = \"F\" AND T1.allergy = \"Milk\" OR T1.allergy = \"Eggs\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students have a food allergy?", + "SpiderSynQuestion": "How many students have a food allergy?", + "query": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are affected by food related allergies?", + "SpiderSynQuestion": "How many students are affected by food related allergies?", + "query": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which allergy has most number of students affected?", + "SpiderSynQuestion": "Which hypersensitivity has most number of students affected?", + "query": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Which allergy is the most common?", + "SpiderSynQuestion": "Which hypersensitivity is the most common?", + "query": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all allergies with number of students affected.", + "SpiderSynQuestion": "Show all hypersensitivities with number of students affected.", + "query": "SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students have each different allergy?", + "SpiderSynQuestion": "How many students have each different hypersensitivity?", + "query": "SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Show all allergy type with number of students affected.", + "SpiderSynQuestion": "Show all hypersensitivity category with number of students affected.", + "query": "SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are affected by each allergy type?", + "SpiderSynQuestion": "How many students are affected by each hypersensitivity category?", + "query": "SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Find the last name and age of the student who has allergy to both milk and cat.", + "SpiderSynQuestion": "Find the surname and age of the student who has allergy to both milk and cat.", + "query": "SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the last names and ages of the students who are allergic to milk and cat?", + "SpiderSynQuestion": "What are the surnames and ages of the students who are allergic to milk and cat?", + "query": "SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.", + "SpiderSynQuestion": "What are the hypersensitivities and their categories that the student with forename Lisa has? And order the result by name of hypersensitivities.", + "query": "SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = \"Lisa\" ORDER BY T1.Allergy" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.", + "SpiderSynQuestion": "What are the hypersensitivities the girl named Lisa has? And what are the categories of them? Order the result by hypersensitivity names.", + "query": "SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = \"Lisa\" ORDER BY T1.Allergy" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Find the first name and gender of the student who has allergy to milk but not cat.", + "SpiderSynQuestion": "Find the forename and gender of the student who has allergy to milk but not cat.", + "query": "SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the first name and gender of the students who have allergy to milk but can put up with cats?", + "SpiderSynQuestion": "What are the forename and gender of the students who have allergy to milk but can put up with cats?", + "query": "SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Find the average age of the students who have allergies with food and animal types.", + "SpiderSynQuestion": "Find the average age of the students who have allergies with food and animal types.", + "query": "SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"animal\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How old are the students with allergies to food and animal types on average?", + "SpiderSynQuestion": "How old are the students with allergies to food and animal types on average?", + "query": "SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"animal\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "List the first and last name of the students who do not have any food type allergy.", + "SpiderSynQuestion": "List the forename and surname of the students who do not have any food type allergy.", + "query": "SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What is the full name of each student who is not allergic to any type of food.", + "SpiderSynQuestion": "What is the full name of each student who is not allergic to any type of food.", + "query": "SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Find the number of male (sex is 'M') students who have some food type allery.", + "SpiderSynQuestion": "Find the number of schoolboy (sex is 'M') who have some food type allery.", + "query": "SELECT count(*) FROM Student WHERE sex = \"M\" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many male students (sex is 'M') are allergic to any type of food?", + "SpiderSynQuestion": "How many schoolboy (sex is 'M') are allergic to any type of food?", + "query": "SELECT count(*) FROM Student WHERE sex = \"M\" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Find the different first names and cities of the students who have allergy to milk or cat.", + "SpiderSynQuestion": "Find the different forenames and cities of the students who have allergy to milk or cat.", + "query": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", + "SpiderSynQuestion": "What are the different forenames and cities of the students who have allergy either to milk or to cat?", + "query": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", + "SpiderSynQuestion": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", + "query": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "How many students are over 18 and do not have allergy to food type or animal type?", + "SpiderSynQuestion": "How many students are over 18 and do not have allergy to food type or animal type?", + "query": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "Find the first name and major of the students who are not allegry to soy.", + "SpiderSynQuestion": "Find the forename and discipline of the students who are not allegry to soy.", + "query": "SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Soy\")" + }, + { + "db_id": "allergy_1", + "SpiderQuestion": "What are the first name and major of the students who are able to consume soy?", + "SpiderSynQuestion": "What are the forename and discipline of the students who are able to consume soy?", + "query": "SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Soy\")" + }, + { + "db_id": "store_1", + "SpiderQuestion": "A list of the top 5 countries by number of invoices. List country name and number of invoices.", + "SpiderSynQuestion": "A list of the top 5 nationalities by number of invoices. List nationality name and number of invoices.", + "query": "SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the top 5 countries by number of invoices and how many do they have?", + "SpiderSynQuestion": "What are the top 5 nationalities by number of invoices and how many do they have?", + "query": "SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.", + "SpiderSynQuestion": "A list of the top 8 nationalities by gross/total invoice size. List nationality name and gross invoice size.", + "query": "SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of the top 8 countries by total invoice size and what are those sizes?", + "SpiderSynQuestion": "What are the names of the top 8 nationalities by gross invoice size and what are those sizes?", + "query": "SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "A list of the top 10 countries by average invoice size. List country name and average invoice size.", + "SpiderSynQuestion": "A list of the top 10 nationalities by average invoice size. List nationality name and average invoice size.", + "query": "SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of the countries and average invoice size of the top countries by size?", + "SpiderSynQuestion": "What are the names of the nations and average invoice size of the top nations by size?", + "query": "SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Find out 5 customers who most recently purchased something. List customers' first and last name.", + "SpiderSynQuestion": "Find out 5 customers who most recently purchased something. List customers' forename and family name.", + "query": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the first and last names of the 5 customers who purchased something most recently?", + "SpiderSynQuestion": "What are the forename and surnames of the 5 customers who purchased something most recently?", + "query": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.", + "SpiderSynQuestion": "Find out the top 10 customers by total number of orders. List customers' forename and surname and the number of total orders.", + "query": "SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the top 10 customers' first and last names by total number of orders and how many orders did they make?", + "SpiderSynQuestion": "What are the top 10 customers' forename and family name by total number of orders and how many orders did they make?", + "query": "SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.", + "SpiderSynQuestion": "List the top 10 customers by total gross sales. List customers' forename and family name and total gross sales.", + "query": "SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?", + "SpiderSynQuestion": "What are the top 10 customers' forename and family name with the highest gross sales, and also what are the sales?", + "query": "SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the top 5 genres by number of tracks. List genres name and total tracks.", + "SpiderSynQuestion": "List the top 5 genres by number of tracks. List genres name and total tracks.", + "query": "SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many tracks does each genre have and what are the names of the top 5?", + "SpiderSynQuestion": "How many tracks does each genre have and what are the names of the top 5?", + "query": "SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List every album's title.", + "SpiderSynQuestion": "List every album's name.", + "query": "SELECT title FROM albums;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the titles of all the albums?", + "SpiderSynQuestion": "What are the names of all the albums?", + "query": "SELECT title FROM albums;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List every album ordered by album title in ascending order.", + "SpiderSynQuestion": "List every album ordered by album name in ascending order.", + "query": "SELECT title FROM albums ORDER BY title;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the titles of all the albums alphabetically ascending?", + "SpiderSynQuestion": "What are the names of all the albums alphabetically ascending?", + "query": "SELECT title FROM albums ORDER BY title;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List every album whose title starts with A in alphabetical order.", + "SpiderSynQuestion": "List every album whose name starts with A in alphabetical order.", + "query": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the titles of all albums that start with A in alphabetical order?", + "SpiderSynQuestion": "What are the names of all albums that start with A in alphabetical order?", + "query": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the customers first and last name of 10 least expensive invoices.", + "SpiderSynQuestion": "List the customers forename and family name of 10 least expensive invoices.", + "query": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the first and last names of the customers with the 10 cheapest invoices?", + "SpiderSynQuestion": "What are the forename and family name of the customers with the 10 cheapest invoices?", + "query": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List total amount of invoice from Chicago, IL.", + "SpiderSynQuestion": "List gross amount of invoice from Chicago, IL.", + "query": "SELECT sum(total) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the total amount of money in the invoices billed from Chicago, Illinois?", + "SpiderSynQuestion": "What are the gross amount of money in the invoices billed from Chicago, Illinois?", + "query": "SELECT sum(total) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the number of invoices from Chicago, IL.", + "SpiderSynQuestion": "List the number of invoices from Chicago, IL.", + "query": "SELECT COUNT(*) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many invoices were billed from Chicago, IL?", + "SpiderSynQuestion": "How many invoices were billed from Chicago, IL?", + "query": "SELECT COUNT(*) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the number of invoices from the US, grouped by state.", + "SpiderSynQuestion": "List the number of invoices from the US, grouped by state.", + "query": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many invoices were billed from each state?", + "SpiderSynQuestion": "How many invoices were billed from each state?", + "query": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the state in the US with the most invoices.", + "SpiderSynQuestion": "List the state in the US with the most invoices.", + "query": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the states with the most invoices?", + "SpiderSynQuestion": "What are the states with the most invoices?", + "query": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the number of invoices and the invoice total from California.", + "SpiderSynQuestion": "List the number of invoices and the invoice gross from California.", + "query": "SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = \"CA\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the number of invoices and total money billed in them from CA?", + "SpiderSynQuestion": "What is the number of invoices and the number of money billed in them from CA?", + "query": "SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = \"CA\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List Aerosmith's albums.", + "SpiderSynQuestion": "List Aerosmith's albums.", + "query": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Aerosmith\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the titles of all the Aerosmith albums?", + "SpiderSynQuestion": "What are the names of all the Aerosmith albums?", + "query": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Aerosmith\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many albums does Billy Cobham has?", + "SpiderSynQuestion": "How many albums does Billy Cobham has?", + "query": "SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Billy Cobham\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many albums has Billy Cobam released?", + "SpiderSynQuestion": "How many albums has Billy Cobam released?", + "query": "SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Billy Cobham\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Eduardo Martins is a customer at which company?", + "SpiderSynQuestion": "Eduardo Martins is a customer at which enterprise?", + "query": "SELECT company FROM customers WHERE first_name = \"Eduardo\" AND last_name = \"Martins\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the company where Eduardo Martins is a customer?", + "SpiderSynQuestion": "What is the enterprise where Eduardo Martins is a customer?", + "query": "SELECT company FROM customers WHERE first_name = \"Eduardo\" AND last_name = \"Martins\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is Astrid Gruber's email and phone number?", + "SpiderSynQuestion": "What is Astrid Gruber's email and mobile number?", + "query": "SELECT email , phone FROM customers WHERE first_name = \"Astrid\" AND last_name = \"Gruber\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the email and phone number of Astrid Gruber the customer?", + "SpiderSynQuestion": "What is the email and mobile number of Astrid Gruber the customer?", + "query": "SELECT email , phone FROM customers WHERE first_name = \"Astrid\" AND last_name = \"Gruber\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many customers live in Prague city?", + "SpiderSynQuestion": "How many clients live in Prague city?", + "query": "SELECT count(*) FROM customers WHERE city = \"Prague\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many customers live in the city of Prague?", + "SpiderSynQuestion": "How many clients live in the city of Prague?", + "query": "SELECT count(*) FROM customers WHERE city = \"Prague\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many customers in state of CA?", + "SpiderSynQuestion": "How many clients in state of CA?", + "query": "SELECT count(*) FROM customers WHERE state = \"CA\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many customers are from California?", + "SpiderSynQuestion": "How many clients are from California?", + "query": "SELECT count(*) FROM customers WHERE state = \"CA\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What country does Roberto Almeida live?", + "SpiderSynQuestion": "What nation does Roberto Almeida live?", + "query": "SELECT country FROM customers WHERE first_name = \"Roberto\" AND last_name = \"Almeida\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "In which country does Roberto Almeida?", + "SpiderSynQuestion": "In which nation does Roberto Almeida?", + "query": "SELECT country FROM customers WHERE first_name = \"Roberto\" AND last_name = \"Almeida\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the name of albums that are released by aritist whose name has 'Led'", + "SpiderSynQuestion": "List the name of albums that are released by aritist whose name has 'Led'", + "query": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the title of the album that was released by the artist whose name has the phrase 'Led'?", + "SpiderSynQuestion": "What is the name of the album that was released by the artist whose name has the phrase 'Led'?", + "query": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many customers does Steve Johnson support?", + "SpiderSynQuestion": "How many clients does Steve Johnson support?", + "query": "SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = \"Steve\" AND T1.last_name = \"Johnson\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the count of customers that Steve Johnson supports?", + "SpiderSynQuestion": "What is the count of customers that Steve Johnson supports?", + "query": "SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = \"Steve\" AND T1.last_name = \"Johnson\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the title, phone and hire date of Nancy Edwards?", + "SpiderSynQuestion": "What is the name, mobile and hire date of Nancy Edwards?", + "query": "SELECT title , phone , hire_date FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the title, phone number and hire date for the employee named Nancy Edwards?", + "SpiderSynQuestion": "What is the name, mobile number and hire date for the employee named Nancy Edwards?", + "query": "SELECT title , phone , hire_date FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "find the full name of employees who report to Nancy Edwards?", + "SpiderSynQuestion": "find the full name of staffs who report to Nancy Edwards?", + "query": "SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = \"Nancy\" AND T1.last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the first and last name of the employee who reports to Nancy Edwards?", + "SpiderSynQuestion": "What is the forename and surname of the employee who reports to Nancy Edwards?", + "query": "SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = \"Nancy\" AND T1.last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the address of employee Nancy Edwards?", + "SpiderSynQuestion": "What is the location of employee Nancy Edwards?", + "query": "SELECT address FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is Nancy Edwards's address?", + "SpiderSynQuestion": "What is Nancy Edwards's location?", + "query": "SELECT address FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Find the full name of employee who supported the most number of customers.", + "SpiderSynQuestion": "Find the full name of employee who supported the most number of customers.", + "query": "SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the full name of the employee who has the most customers?", + "SpiderSynQuestion": "What is the full name of the staff who has the most customers?", + "query": "SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many employees are living in Canada?", + "SpiderSynQuestion": "How many staffs are living in Canada?", + "query": "SELECT count(*) FROM employees WHERE country = \"Canada\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many employees live in Canada?", + "SpiderSynQuestion": "How many staffs live in Canada?", + "query": "SELECT count(*) FROM employees WHERE country = \"Canada\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is employee Nancy Edwards's phone number?", + "SpiderSynQuestion": "What is employee Nancy Edwards's telephone number?", + "query": "SELECT phone FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the the phone number of Nancy Edwards?", + "SpiderSynQuestion": "What is the the telephone number of Nancy Edwards?", + "query": "SELECT phone FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Who is the youngest employee in the company? List employee's first and last name.", + "SpiderSynQuestion": "Who is the youngest employee in the company? List employee's full name.", + "query": "SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What si the youngest employee's first and last name?", + "SpiderSynQuestion": "What si the youngest employee's full name?", + "query": "SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List top 10 employee work longest in the company. List employee's first and last name.", + "SpiderSynQuestion": "List top 10 employee work longest in the company. List employee's forename and surname.", + "query": "SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the first and last names of the top 10 longest-serving employees?", + "SpiderSynQuestion": "What are the forename and surnames of the top 10 longest-serving employees?", + "query": "SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Find the number of employees whose title is IT Staff from each city?", + "SpiderSynQuestion": "Find the number of staffs whose title is IT Staff from each city?", + "query": "SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many employees who are IT staff are from each city?", + "SpiderSynQuestion": "How many staffs who are IT staff are from each city?", + "query": "SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", + "SpiderSynQuestion": "Which employee manage most number of peoples? List employee's forename and surname, and number of people report to that employee.", + "query": "SELECT T2.first_name , T2.last_name , count(distinct T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count( distinct T1.reports_to) DESC LIMIT 1;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the first and last names of all the employees and how many people report to them?", + "SpiderSynQuestion": "What are the forename and family name of all the employees and how many people report to them?", + "query": "SELECT T2.first_name , T2.last_name , count(distinct T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(distinct T1.reports_to) DESC LIMIT 1;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many orders does Lucas Mancini has?", + "SpiderSynQuestion": "How many orders does Lucas Mancini has?", + "query": "SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many orders does Luca Mancini have in his invoices?", + "SpiderSynQuestion": "How many orders does Luca Mancini have in his invoices?", + "query": "SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the total amount of money spent by Lucas Mancini?", + "SpiderSynQuestion": "What is the number of money spent by Lucas Mancini?", + "query": "SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How much money did Lucas Mancini spend?", + "SpiderSynQuestion": "How much money did Lucas Mancini spend?", + "query": "SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List all media types.", + "SpiderSynQuestion": "List all media types.", + "query": "SELECT name FROM media_types;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all the media types?", + "SpiderSynQuestion": "What are the names of all the media types?", + "query": "SELECT name FROM media_types;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List all different genre types.", + "SpiderSynQuestion": "List all different genre types.", + "query": "SELECT DISTINCT name FROM genres;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the different names of the genres?", + "SpiderSynQuestion": "What are the different names of the genres?", + "query": "SELECT DISTINCT name FROM genres;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the name of all playlist.", + "SpiderSynQuestion": "List the name of all playlist.", + "query": "SELECT name FROM playlists;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all the playlists?", + "SpiderSynQuestion": "What are the names of all the playlists?", + "query": "SELECT name FROM playlists;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Who is the composer of track Fast As a Shark?", + "SpiderSynQuestion": "Who is the songwriter of track Fast As a Shark?", + "query": "SELECT composer FROM tracks WHERE name = \"Fast As a Shark\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the composer who created the track \"Fast As a Shark\"?", + "SpiderSynQuestion": "What is the songwriter who created the track \"Fast As a Shark\"?", + "query": "SELECT composer FROM tracks WHERE name = \"Fast As a Shark\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How long does track Fast As a Shark has?", + "SpiderSynQuestion": "How long does track Fast As a Shark has?", + "query": "SELECT milliseconds FROM tracks WHERE name = \"Fast As a Shark\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many milliseconds long is Fast As a Shark?", + "SpiderSynQuestion": "How many milliseconds long is Fast As a Shark?", + "query": "SELECT milliseconds FROM tracks WHERE name = \"Fast As a Shark\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the name of tracks whose genre is Rock?", + "SpiderSynQuestion": "What is the name of tracks whose genre is Rock?", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the name of all tracks in the Rock genre?", + "SpiderSynQuestion": "What is the name of all tracks in the Rock genre?", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is title of album which track Balls to the Wall belongs to?", + "SpiderSynQuestion": "What is name of album which track Balls to the Wall belongs to?", + "query": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = \"Balls to the Wall\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the name of the album that has the track Ball to the Wall?", + "SpiderSynQuestion": "What is the name of the album that has the track Ball to the Wall?", + "query": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = \"Balls to the Wall\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List name of all tracks in Balls to the Wall.", + "SpiderSynQuestion": "List name of all tracks in Balls to the Wall.", + "query": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = \"Balls to the Wall\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the name of all tracks in the album named Balls to the Wall?", + "SpiderSynQuestion": "What is the name of all tracks in the album named Balls to the Wall?", + "query": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = \"Balls to the Wall\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List title of albums have the number of tracks greater than 10.", + "SpiderSynQuestion": "List name of albums have the number of tracks greater than 10.", + "query": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of the albums that have more than 10 tracks?", + "SpiderSynQuestion": "What are the names of the albums that have more than 10 tracks?", + "query": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.", + "SpiderSynQuestion": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" AND T3.name = \"MPEG audio file\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all Rock tracks that are stored on MPEG audio files?", + "SpiderSynQuestion": "What are the names of all Rock tracks that are stored on MPEG audio files?", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" AND T3.name = \"MPEG audio file\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.", + "SpiderSynQuestion": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" OR T3.name = \"MPEG audio file\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?", + "SpiderSynQuestion": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" OR T3.name = \"MPEG audio file\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the name of tracks belongs to genre Rock or genre Jazz.", + "SpiderSynQuestion": "List the name of tracks belongs to genre Rock or genre Jazz.", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\" OR T1.name = \"Jazz\"" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of the tracks that are Rock or Jazz songs?", + "SpiderSynQuestion": "What are the names of the tracks that are Rock or Jazz songs?", + "query": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\" OR T1.name = \"Jazz\"" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the name of all tracks in the playlists of Movies.", + "SpiderSynQuestion": "List the name of all tracks in the playlists of Movies.", + "query": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = \"Movies\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all tracks that are on playlists titled Movies?", + "SpiderSynQuestion": "What are the names of all tracks that are on playlists titled Movies?", + "query": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = \"Movies\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List the name of playlist which has number of tracks greater than 100.", + "SpiderSynQuestion": "List the name of playlist which has number of tracks greater than 100.", + "query": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all playlists that have more than 100 tracks?", + "SpiderSynQuestion": "What are the names of all playlists that have more than 100 tracks?", + "query": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "List all tracks bought by customer Daan Peeters.", + "SpiderSynQuestion": "List all tracks bought by customer Daan Peeters.", + "query": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = \"Daan\" AND T4.last_name = \"Peeters\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the tracks that Dean Peeters bought?", + "SpiderSynQuestion": "What are the tracks that Dean Peeters bought?", + "query": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = \"Daan\" AND T4.last_name = \"Peeters\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How much is the track Fast As a Shark?", + "SpiderSynQuestion": "How much is the track Fast As a Shark?", + "query": "SELECT unit_price FROM tracks WHERE name = \"Fast As a Shark\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What is the unit price of the tune \"Fast As a Shark\"?", + "SpiderSynQuestion": "What is the unit price of the tune \"Fast As a Shark\"?", + "query": "SELECT unit_price FROM tracks WHERE name = \"Fast As a Shark\";" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Find the name of tracks which are in Movies playlist but not in music playlist.", + "SpiderSynQuestion": "Find the name of tracks which are in Movies playlist but not in music playlist.", + "query": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?", + "SpiderSynQuestion": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?", + "query": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Find the name of tracks which are in both Movies and music playlists.", + "SpiderSynQuestion": "Find the name of tracks which are in both Movies and music playlists.", + "query": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'" + }, + { + "db_id": "store_1", + "SpiderQuestion": "What are the names of all the tracks that are in both the Movies and music playlists?", + "SpiderSynQuestion": "What are the names of all the tracks that are in both the Movies and music playlists?", + "query": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'" + }, + { + "db_id": "store_1", + "SpiderQuestion": "Find number of tracks in each genre?", + "SpiderSynQuestion": "Find number of tracks in each genre?", + "query": "SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;" + }, + { + "db_id": "store_1", + "SpiderQuestion": "How many tracks are in each genre?", + "SpiderSynQuestion": "How many tracks are in each genre?", + "query": "SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "How many editors are there?", + "SpiderSynQuestion": "How many editors are there?", + "query": "SELECT count(*) FROM editor" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "List the names of editors in ascending order of age.", + "SpiderSynQuestion": "List the names of editors in ascending order of age.", + "query": "SELECT Name FROM editor ORDER BY Age ASC" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "What are the names and ages of editors?", + "SpiderSynQuestion": "What are the names and ages of editors?", + "query": "SELECT Name , Age FROM editor" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "List the names of editors who are older than 25.", + "SpiderSynQuestion": "List the names of editors who are older than 25.", + "query": "SELECT Name FROM editor WHERE Age > 25" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Show the names of editors of age either 24 or 25.", + "SpiderSynQuestion": "Show the names of editors of age either 24 or 25.", + "query": "SELECT Name FROM editor WHERE Age = 24 OR Age = 25" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "What is the name of the youngest editor?", + "SpiderSynQuestion": "What is the name of the youngest editor?", + "query": "SELECT Name FROM editor ORDER BY Age ASC LIMIT 1" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "What are the different ages of editors? Show each age along with the number of editors of that age.", + "SpiderSynQuestion": "What are the different ages of editors? Show each age along with the number of editors of that age.", + "query": "SELECT Age , COUNT(*) FROM editor GROUP BY Age" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Please show the most common age of editors.", + "SpiderSynQuestion": "Please show the most common age of editors.", + "query": "SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Show the distinct themes of journals.", + "SpiderSynQuestion": "Show the different topics of journals.", + "query": "SELECT DISTINCT Theme FROM journal" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Show the names of editors and the theme of journals for which they serve on committees.", + "SpiderSynQuestion": "Show the names of editors and the topic of journals for which they serve on committees.", + "query": "SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "For each journal_committee, find the editor name and the journal theme.", + "SpiderSynQuestion": "For each journal_committee, find the editor name and the journal topic.", + "query": "SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.", + "SpiderSynQuestion": "Show the names and ages of editors and the topic of journals for which they serve on committees, in ascending alphabetical order of theme.", + "query": "SELECT T2.Name , T2.age , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Show the names of editors that are on the committee of journals with sales bigger than 3000.", + "SpiderSynQuestion": "Show the names of editors that are on the committee of journals with sales bigger than 3000.", + "query": "SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Show the id, name of each editor and the number of journal committees they are on.", + "SpiderSynQuestion": "Show the id, name of each editor and the number of journal committees they are on.", + "query": "SELECT T1.editor_id , T1.Name , COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "Show the names of editors that are on at least two journal committees.", + "SpiderSynQuestion": "Show the names of editors that are on at least two journal committees.", + "query": "SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "List the names of editors that are not on any journal committee.", + "SpiderSynQuestion": "List the names of editors that are not on any journal committee.", + "query": "SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee)" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.", + "SpiderSynQuestion": "List the day, topic and sales volume of the journal which did not have any of the listed editors serving on committee.", + "query": "SELECT date , theme , sales FROM journal EXCEPT SELECT T1.date , T1.theme , T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID" + }, + { + "db_id": "journal_committee", + "SpiderQuestion": "What is the average sales of the journals that have an editor whose work type is 'Photo'?", + "SpiderSynQuestion": "What is the average sales of the journals that have an editor whose work type is 'Photo'?", + "query": "SELECT avg(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo'" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many accounts do we have?", + "SpiderSynQuestion": "How many accounts do we have?", + "query": "SELECT count(*) FROM Accounts" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Count the number of accounts.", + "SpiderSynQuestion": "Count the number of accounts.", + "query": "SELECT count(*) FROM Accounts" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show ids, customer ids, names for all accounts.", + "SpiderSynQuestion": "Show ids, client ids, names for all accounts.", + "query": "SELECT account_id , customer_id , account_name FROM Accounts" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the account ids, customer ids, and account names for all the accounts?", + "SpiderSynQuestion": "What are the account ids, client ids, and account names for all the accounts?", + "query": "SELECT account_id , customer_id , account_name FROM Accounts" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show other account details for account with name 338.", + "SpiderSynQuestion": "Show other account information for account with name 338.", + "query": "SELECT other_account_details FROM Accounts WHERE account_name = \"338\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the other account details for the account with the name 338?", + "SpiderSynQuestion": "What are the other account information for the account with the name 338?", + "query": "SELECT other_account_details FROM Accounts WHERE account_name = \"338\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the first name, last name, and phone of the customer with account name 162?", + "SpiderSynQuestion": "What is the full name, and mobile of the client with account name 162?", + "query": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"162\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Give the full name and phone of the customer who has the account name 162.", + "SpiderSynQuestion": "Give the full name and telephone of the client who has the account name 162.", + "query": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"162\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many accounts does the customer with first name Art and last name Turcotte have?", + "SpiderSynQuestion": "How many accounts does the client with first name Art and last name Turcotte have?", + "query": "SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the number of accounts that the customer with the first name Art and last name Turcotte has.", + "SpiderSynQuestion": "Return the number of accounts that the client with the first name Art and last name Turcotte has.", + "query": "SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show all customer ids and the number of accounts for each customer.", + "SpiderSynQuestion": "Show all client ids and the number of accounts for each client.", + "query": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many accounts are there for each customer id?", + "SpiderSynQuestion": "How many accounts are there for each client id?", + "query": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the customer id and number of accounts with most accounts.", + "SpiderSynQuestion": "Show the client id and number of accounts with most accounts.", + "query": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the customer id of the customer with the most accounts, and how many accounts does this person have?", + "SpiderSynQuestion": "What is the client id of the client with the most accounts, and how many accounts does this person have?", + "query": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the customer first, last name and id with least number of accounts.", + "SpiderSynQuestion": "What is the client full name and id with least number of accounts.", + "query": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Give the full name and customer id of the customer with the fewest accounts.", + "SpiderSynQuestion": "Give the full name and client id of the client with the fewest accounts.", + "query": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the number of all customers without an account.", + "SpiderSynQuestion": "Show the number of all clients without an account.", + "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many customers do not have an account?", + "SpiderSynQuestion": "How many clients do not have an account?", + "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the first names and last names of customers without any account.", + "SpiderSynQuestion": "Show forenames and surnames of clients without any account.", + "query": "SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the full names of customers who do not have any accounts?", + "SpiderSynQuestion": "What are the full names of clients who do not have any accounts?", + "query": "SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show distinct first and last names for all customers with an account.", + "SpiderSynQuestion": "Show different full names for all clients with an account.", + "query": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the full names of customers who have accounts?", + "SpiderSynQuestion": "What are the full names of clients who have accounts?", + "query": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many customers have an account?", + "SpiderSynQuestion": "How many clients have an account?", + "query": "SELECT count(DISTINCT customer_id) FROM Accounts" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Count the number of customers who hold an account.", + "SpiderSynQuestion": "Count the number of clients who hold an account.", + "query": "SELECT count(DISTINCT customer_id) FROM Accounts" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many customers do we have?", + "SpiderSynQuestion": "How many clients do we have?", + "query": "SELECT count(*) FROM Customers" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Count the number of customers.", + "SpiderSynQuestion": "Count the number of clients.", + "query": "SELECT count(*) FROM Customers" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show ids, first names, last names, and phones for all customers.", + "SpiderSynQuestion": "Show ids,full names, and phones for all clients.", + "query": "SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the ids, full names, and phones of each customer?", + "SpiderSynQuestion": "What are the ids, full names, and telephones of each client?", + "query": "SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the phone and email for customer with first name Aniyah and last name Feest?", + "SpiderSynQuestion": "What is the telephone and email for client with first name Aniyah and last name Feest?", + "query": "SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the phone and email of the customer with the first name Aniyah and last name Feest.", + "SpiderSynQuestion": "Return the telephone and email of the client with the first name Aniyah and last name Feest.", + "query": "SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the number of customer cards.", + "SpiderSynQuestion": "Show the number of client cards.", + "query": "SELECT count(*) FROM Customers_cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many customer cards are there?", + "SpiderSynQuestion": "How many client cards are there?", + "query": "SELECT count(*) FROM Customers_cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show ids, customer ids, card type codes, card numbers for all cards.", + "SpiderSynQuestion": "Show ids, client ids, card type codes, card numbers for all cards.", + "query": "SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are card ids, customer ids, card types, and card numbers for each customer card?", + "SpiderSynQuestion": "What are card ids, client ids, card types, and card numbers for each client card?", + "query": "SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the date valid from and the date valid to for the card with card number '4560596484842'.", + "SpiderSynQuestion": "Show the date valid from and the date valid to for the card with card number '4560596484842'.", + "query": "SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = \"4560596484842\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the valid from and valid to dates for the card with the number 4560596484842?", + "SpiderSynQuestion": "What are the valid from and valid to dates for the card with the number 4560596484842?", + "query": "SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = \"4560596484842\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the first name, last name, and phone of the customer with card 4560596484842.", + "SpiderSynQuestion": "What is the full name, and mobile of the client with card 4560596484842.", + "query": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = \"4560596484842\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the full name and phone of the customer who has card number 4560596484842.", + "SpiderSynQuestion": "Return the full name and telephone of the client who has card number 4560596484842.", + "query": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = \"4560596484842\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many cards does customer Art Turcotte have?", + "SpiderSynQuestion": "How many cards does client Art Turcotte have?", + "query": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Count the number of cards the customer with the first name Art and last name Turcotte has.", + "SpiderSynQuestion": "Count the number of cards the customer with the first name Art and last name Turcotte has.", + "query": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many debit cards do we have?", + "SpiderSynQuestion": "How many debit cards do we have?", + "query": "SELECT count(*) FROM Customers_cards WHERE card_type_code = \"Debit\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Count the number of customer cards of the type Debit.", + "SpiderSynQuestion": "Count the number of client cards of the type Debit.", + "query": "SELECT count(*) FROM Customers_cards WHERE card_type_code = \"Debit\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many credit cards does customer Blanche Huels have?", + "SpiderSynQuestion": "How many credit cards does client Blanche Huels have?", + "query": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Blanche\" AND T2.customer_last_name = \"Huels\" AND T1.card_type_code = \"Credit\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Count the number of credit cards that the customer with first name Blanche and last name Huels has.", + "SpiderSynQuestion": "Count the number of credit cards that the client with first name Blanche and last name Huels has.", + "query": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Blanche\" AND T2.customer_last_name = \"Huels\" AND T1.card_type_code = \"Credit\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show all customer ids and the number of cards owned by each customer.", + "SpiderSynQuestion": "Show all client ids and the number of cards owned by each client.", + "query": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different customer ids, and how many cards does each one hold?", + "SpiderSynQuestion": "What are the different client ids, and how many cards does each one hold?", + "query": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the customer id with most number of cards, and how many does he have?", + "SpiderSynQuestion": "What is the client id with most number of cards, and how many does he have?", + "query": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the id of the customer who has the most cards, as well as the number of cards.", + "SpiderSynQuestion": "Return the id of the client who has the most cards, as well as the number of cards.", + "query": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show id, first and last names for all customers with at least two cards.", + "SpiderSynQuestion": "Show id, forename and surname for all clients with at least two cards.", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the ids and full names of customers who hold two or more cards?", + "SpiderSynQuestion": "What are the ids and full names of clients who hold two or more cards?", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the customer id, first and last name with least number of accounts.", + "SpiderSynQuestion": "What is the client id, forename and surname with least number of accounts.", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the id and full name of the customer who has the fewest accounts.", + "SpiderSynQuestion": "Return the id and full name of the client who has the fewest accounts.", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show all card type codes and the number of cards in each type.", + "SpiderSynQuestion": "Show all card type codes and the number of cards in each type.", + "query": "SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_type_code" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different card types, and how many cards are there of each?", + "SpiderSynQuestion": "What are the different card types, and how many cards are there of each?", + "query": "SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_type_code" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the card type code with most number of cards?", + "SpiderSynQuestion": "What is the card type code with most number of cards?", + "query": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the code of the card type that is most common.", + "SpiderSynQuestion": "Return the code of the card type that is most common.", + "query": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show card type codes with at least 5 cards.", + "SpiderSynQuestion": "Show card type codes with at least 5 cards.", + "query": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 5" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the codes of card types that have 5 or more cards?", + "SpiderSynQuestion": "What are the codes of card types that have 5 or more cards?", + "query": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 5" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show all card type codes and the number of customers holding cards in each type.", + "SpiderSynQuestion": "Show all card type codes and the number of clients holding cards in each type.", + "query": "SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different card type codes, and how many different customers hold each type?", + "SpiderSynQuestion": "What are the different card type codes, and how many different clients hold each type?", + "query": "SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the customer ids and firstname without a credit card.", + "SpiderSynQuestion": "Show the client ids and forename without a credit card.", + "query": "SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = \"Credit\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the ids and first names of customers who do not hold a credit card?", + "SpiderSynQuestion": "What are the ids and forename of clients who do not hold a credit card?", + "query": "SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = \"Credit\"" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show all card type codes.", + "SpiderSynQuestion": "Show all card type codes.", + "query": "SELECT DISTINCT card_type_code FROM Customers_Cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different card type codes?", + "SpiderSynQuestion": "What are the different card type codes?", + "query": "SELECT DISTINCT card_type_code FROM Customers_Cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the number of card types.", + "SpiderSynQuestion": "Show the number of card types.", + "query": "SELECT count(DISTINCT card_type_code) FROM Customers_Cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many different card types are there?", + "SpiderSynQuestion": "How many different card types are there?", + "query": "SELECT count(DISTINCT card_type_code) FROM Customers_Cards" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show all transaction types.", + "SpiderSynQuestion": "Show all transaction types.", + "query": "SELECT DISTINCT transaction_type FROM Financial_Transactions" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different types of transactions?", + "SpiderSynQuestion": "What are the different types of transactions?", + "query": "SELECT DISTINCT transaction_type FROM Financial_Transactions" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the number of transaction types.", + "SpiderSynQuestion": "Show the number of transaction types.", + "query": "SELECT count(DISTINCT transaction_type) FROM Financial_Transactions" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "How many different types of transactions are there?", + "SpiderSynQuestion": "How many different types of transactions are there?", + "query": "SELECT count(DISTINCT transaction_type) FROM Financial_Transactions" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the average and total transaction amount?", + "SpiderSynQuestion": "What is the average and total transaction amount?", + "query": "SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the average transaction amount, as well as the total amount of all transactions.", + "SpiderSynQuestion": "Return the average transaction amount, as well as the total amount of all transactions.", + "query": "SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the card type codes and the number of transactions.", + "SpiderSynQuestion": "Show the card type codes and the number of transactions.", + "query": "SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different card types, and how many transactions have been made with each?", + "SpiderSynQuestion": "What are the different card types, and how many transactions have been made with each?", + "query": "SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the transaction type and the number of transactions.", + "SpiderSynQuestion": "Show the transaction type and the number of transactions.", + "query": "SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different transaction types, and how many transactions of each have taken place?", + "SpiderSynQuestion": "What are the different transaction types, and how many transactions of each have taken place?", + "query": "SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What is the transaction type that has processed the greatest total amount in transactions?", + "SpiderSynQuestion": "What is the transaction type that has processed the greatest total amount in transactions?", + "query": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Return the type of transaction with the highest total amount.", + "SpiderSynQuestion": "Return the type of transaction with the highest total amount.", + "query": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "Show the account id and the number of transactions for each account", + "SpiderSynQuestion": "Show the account id and the number of transactions for each account", + "query": "SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_id" + }, + { + "db_id": "customers_card_transactions", + "SpiderQuestion": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?", + "SpiderSynQuestion": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?", + "query": "SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_id" + }, + { + "db_id": "race_track", + "SpiderQuestion": "How many tracks do we have?", + "SpiderSynQuestion": "How many tracks do we have?", + "query": "SELECT count(*) FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Count the number of tracks.", + "SpiderSynQuestion": "Count the number of tracks.", + "query": "SELECT count(*) FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show the name and location for all tracks.", + "SpiderSynQuestion": "Show the name and address for all tracks.", + "query": "SELECT name , LOCATION FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names and locations of all tracks?", + "SpiderSynQuestion": "What are the names and addresses of all tracks?", + "query": "SELECT name , LOCATION FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show names and seatings, ordered by seating for all tracks opened after 2000.", + "SpiderSynQuestion": "Show names and the number of seat, ordered by the number of seat for all tracks opened after 2000.", + "query": "SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names and seatings for all tracks opened after 2000, ordered by seating?", + "SpiderSynQuestion": "What are the names and number of seat for all tracks opened after 2000, ordered by number of seat?", + "query": "SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What is the name, location and seating for the most recently opened track?", + "SpiderSynQuestion": "What is the name, address and seating for the most recently opened track?", + "query": "SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Return the name, location, and seating of the track that was opened in the most recent year.", + "SpiderSynQuestion": "Return the name, address, and seating of the track that was opened in the most recent year.", + "query": "SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What is the minimum, maximum, and average seating for all tracks.", + "SpiderSynQuestion": "What is the minimum, maximum, and average number of seat for all tracks.", + "query": "SELECT min(seating) , max(seating) , avg(seating) FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Return the minimum, maximum, and average seating across all tracks.", + "SpiderSynQuestion": "Return the minimum, maximum, and average number of seat across all tracks.", + "query": "SELECT min(seating) , max(seating) , avg(seating) FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show the name, location, open year for all tracks with a seating higher than the average.", + "SpiderSynQuestion": "Show the name, address, open year for all tracks with a seating higher than the average.", + "query": "SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names, locations, and years of opening for tracks with seating higher than average?", + "SpiderSynQuestion": "What are the names, addresses, and years of opening for tracks with seating higher than average?", + "query": "SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are distinct locations where tracks are located?", + "SpiderSynQuestion": "What are different addresses where tracks are located?", + "query": "SELECT DISTINCT LOCATION FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Give the different locations of tracks.", + "SpiderSynQuestion": "Give the different addresses of tracks.", + "query": "SELECT DISTINCT LOCATION FROM track" + }, + { + "db_id": "race_track", + "SpiderQuestion": "How many races are there?", + "SpiderSynQuestion": "How many competitions are there?", + "query": "SELECT count(*) FROM race" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Count the number of races.", + "SpiderSynQuestion": "Count the number of races.", + "query": "SELECT count(*) FROM race" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the distinct classes that races can have?", + "SpiderSynQuestion": "What are the different types that races can have?", + "query": "SELECT DISTINCT CLASS FROM race" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Return the different classes of races.", + "SpiderSynQuestion": "Return the different type of races.", + "query": "SELECT DISTINCT CLASS FROM race" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show name, class, and date for all races.", + "SpiderSynQuestion": "Show name, type, and day for all races.", + "query": "SELECT name , CLASS , date FROM race" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names, classes, and dates for all races?", + "SpiderSynQuestion": "What are the names, type, and days for all races?", + "query": "SELECT name , CLASS , date FROM race" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show the race class and number of races in each class.", + "SpiderSynQuestion": "Show the race type and number of races in each type.", + "query": "SELECT CLASS , count(*) FROM race GROUP BY CLASS" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the different classes of races, and how many races correspond to each?", + "SpiderSynQuestion": "What are the different types of races, and how many races correspond to each?", + "query": "SELECT CLASS , count(*) FROM race GROUP BY CLASS" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What is the race class with most number of races.", + "SpiderSynQuestion": "What is the race type with most number of races.", + "query": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Give the class of races that is most common.", + "SpiderSynQuestion": "Give the type of races that is most common.", + "query": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "List the race class with at least two races.", + "SpiderSynQuestion": "List the race type with at least two races.", + "query": "SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the classes of races that have two or more corresponding races?", + "SpiderSynQuestion": "What are the types of races that have two or more corresponding races?", + "query": "SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names for tracks without a race in class 'GT'.", + "SpiderSynQuestion": "What are the names for tracks without a contest in class 'GT'.", + "query": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Give the names of tracks that do not have a race in the class 'GT'.", + "SpiderSynQuestion": "Give the names of tracks that do not have a contest in the class 'GT'.", + "query": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show all track names that have had no races.", + "SpiderSynQuestion": "Show all track names that have had no competitions.", + "query": "SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Return the names of tracks that have no had any races.", + "SpiderSynQuestion": "Return the names of tracks that have no had any competitions.", + "query": "SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.", + "SpiderSynQuestion": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.", + "query": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the years of opening for tracks with seating between 4000 and 5000?", + "SpiderSynQuestion": "What are the years of opening for tracks with seating between 4000 and 5000?", + "query": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show the name of track and the number of races in each track.", + "SpiderSynQuestion": "Show the name of track and the number of competitions in each track.", + "query": "SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names of different tracks, and how many races has each had?", + "SpiderSynQuestion": "What are the names of different tracks, and how many competitions has each had?", + "query": "SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show the name of track with most number of races.", + "SpiderSynQuestion": "Show the name of track with most number of contests.", + "query": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What is the name of the track that has had the greatest number of races?", + "SpiderSynQuestion": "What is the name of the track that has had the greatest number of contests?", + "query": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show the name and date for each race and its track name.", + "SpiderSynQuestion": "Show the name and day for each competition and its track name.", + "query": "SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names and dates of races, and the names of the tracks where they are held?", + "SpiderSynQuestion": "What are the names and days of races, and the names of the tracks where they are held?", + "query": "SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Show the name and location of track with 1 race.", + "SpiderSynQuestion": "Show the name and address of track with 1 race.", + "query": "SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the names and locations of tracks that have had exactly 1 race?", + "SpiderSynQuestion": "What are the names and addresses of tracks that have had exactly 1 race?", + "query": "SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1" + }, + { + "db_id": "race_track", + "SpiderQuestion": "Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.", + "SpiderSynQuestion": "Find the addresses where have both tracks with more than 90000 seats and tracks with less than 70000 seats.", + "query": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000" + }, + { + "db_id": "race_track", + "SpiderQuestion": "What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?", + "SpiderSynQuestion": "What are the addresses that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?", + "query": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "How many members have the black membership card?", + "SpiderSynQuestion": "How many members have the black membership card?", + "query": "SELECT count(*) FROM member WHERE Membership_card = 'Black'" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Find the number of members living in each address.", + "SpiderSynQuestion": "Find the number of members living in each location.", + "query": "SELECT count(*) , address FROM member GROUP BY address" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Give me the names of members whose address is in Harford or Waterbury.", + "SpiderSynQuestion": "Give me the names of members whose location is in Harford or Waterbury.", + "query": "SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Find the ids and names of members who are under age 30 or with black membership card.", + "SpiderSynQuestion": "Find the ids and names of members who are under age 30 or with black membership card.", + "query": "SELECT name , member_id FROM member WHERE Membership_card = 'Black' OR age < 30" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Find the purchase time, age and address of each member, and show the results in the order of purchase time.", + "SpiderSynQuestion": "Find the buy time, age and location of each member, and show the results in the order of buy time.", + "query": "SELECT Time_of_purchase , age , address FROM member ORDER BY Time_of_purchase" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Which membership card has more than 5 members?", + "SpiderSynQuestion": "Which membership card has more than 5 members?", + "query": "SELECT Membership_card FROM member GROUP BY Membership_card HAVING count(*) > 5" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Which address has both members younger than 30 and members older than 40?", + "SpiderSynQuestion": "Which location has both members younger than 30 and members older than 40?", + "query": "SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?", + "SpiderSynQuestion": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?", + "query": "SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "How many members are not living in Hartford?", + "SpiderSynQuestion": "How many members are not living in Hartford?", + "query": "SELECT count(*) FROM member WHERE address != 'Hartford'" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Which address do not have any member with the black membership card?", + "SpiderSynQuestion": "Which location do not have any member with the black membership card?", + "query": "SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Show the shop addresses ordered by their opening year.", + "SpiderSynQuestion": "Show the shop locations ordered by their opening year.", + "query": "SELECT address FROM shop ORDER BY open_year" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "What are the average score and average staff number of all shops?", + "SpiderSynQuestion": "What are the average score and average employee number of all shops?", + "query": "SELECT avg(num_of_staff) , avg(score) FROM shop" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Find the id and address of the shops whose score is below the average score.", + "SpiderSynQuestion": "Find the id and location of the shops whose score is below the average score.", + "query": "SELECT shop_id , address FROM shop WHERE score < (SELECT avg(score) FROM shop)" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Find the address and staff number of the shops that do not have any happy hour.", + "SpiderSynQuestion": "Find the location and employee number of the shops that do not have any happy hour.", + "query": "SELECT address , num_of_staff FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM happy_hour)" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "What are the id and address of the shops which have a happy hour in May?", + "SpiderSynQuestion": "What are the id and location of the shops which have a happy hour in May?", + "query": "SELECT t1.address , t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May'" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "which shop has happy hour most frequently? List its id and number of happy hours.", + "SpiderSynQuestion": "which store has happy hour most frequently? List its id and number of happy hours.", + "query": "SELECT shop_id , count(*) FROM happy_hour GROUP BY shop_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Which month has the most happy hours?", + "SpiderSynQuestion": "Which month has the most happy hours?", + "query": "SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "coffee_shop", + "SpiderQuestion": "Which months have more than 2 happy hours?", + "SpiderSynQuestion": "Which months have more than 2 happy hours?", + "query": "SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING count(*) > 2" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "How many albums are there?", + "SpiderSynQuestion": "How many albums are there?", + "query": "SELECT count(*) FROM ALBUM" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the number of albums.", + "SpiderSynQuestion": "Find the number of albums.", + "query": "SELECT count(*) FROM ALBUM" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "List the names of all music genres.", + "SpiderSynQuestion": "List the names of all music types.", + "query": "SELECT Name FROM GENRE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the names of different music genres?", + "SpiderSynQuestion": "What are the names of different music genres?", + "query": "SELECT Name FROM GENRE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find all the customer information in state NY.", + "SpiderSynQuestion": "Find all the client information in state NY.", + "query": "SELECT * FROM CUSTOMER WHERE State = \"NY\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is all the customer information for customers in NY state?", + "SpiderSynQuestion": "What is all the client information for customers in NY state?", + "query": "SELECT * FROM CUSTOMER WHERE State = \"NY\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the first names and last names of the employees who live in Calgary city.", + "SpiderSynQuestion": "What are the full names of the employees who live in Calgary city.", + "query": "SELECT FirstName , LastName FROM EMPLOYEE WHERE City = \"Calgary\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the full names of employees living in the city of Calgary.", + "SpiderSynQuestion": "Find the full names of employees living in the city of Calgary.", + "query": "SELECT FirstName , LastName FROM EMPLOYEE WHERE City = \"Calgary\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the distinct billing countries of the invoices?", + "SpiderSynQuestion": "What are the different billing countries of the invoices?", + "query": "SELECT distinct BillingCountry FROM INVOICE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the different billing countries for all invoices.", + "SpiderSynQuestion": "Find the different billing countries for all invoices.", + "query": "SELECT distinct BillingCountry FROM INVOICE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the names of all artists that have \"a\" in their names.", + "SpiderSynQuestion": "Find the names of all artists that have \"a\" in their names.", + "query": "SELECT Name FROM ARTIST WHERE Name LIKE \"%a%\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the names of artist who have the letter 'a' in their names?", + "SpiderSynQuestion": "What are the names of artist who have the letter 'a' in their names?", + "query": "SELECT Name FROM ARTIST WHERE Name LIKE \"%a%\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the title of all the albums of the artist \"AC/DC\".", + "SpiderSynQuestion": "Find the name of all the albums of the artist \"AC/DC\".", + "query": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"AC/DC\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the titles of albums by the artist \"AC/DC\"?", + "SpiderSynQuestion": "What are the names of albums by the artist \"AC/DC\"?", + "query": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"AC/DC\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Hom many albums does the artist \"Metallica\" have?", + "SpiderSynQuestion": "Hom many albums does the artist \"Metallica\" have?", + "query": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"Metallica\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the number of albums by the artist \"Metallica\".", + "SpiderSynQuestion": "Find the number of albums by the artist \"Metallica\".", + "query": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"Metallica\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Which artist does the album \"Balls to the Wall\" belong to?", + "SpiderSynQuestion": "Which artist does the album \"Balls to the Wall\" belong to?", + "query": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = \"Balls to the Wall\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the name of the artist who made the album \"Balls to the Wall\".", + "SpiderSynQuestion": "Find the name of the artist who made the album \"Balls to the Wall\".", + "query": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = \"Balls to the Wall\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Which artist has the most albums?", + "SpiderSynQuestion": "Which artist has the most albums?", + "query": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the name of the artist with the greatest number of albums?", + "SpiderSynQuestion": "What is the name of the artist with the greatest number of albums?", + "query": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the names of all the tracks that contain the word \"you\".", + "SpiderSynQuestion": "Find the names of all the tracks that contain the word \"you\".", + "query": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the names of tracks that contain the the word you in them?", + "SpiderSynQuestion": "What are the names of tracks that contain the the word you in them?", + "query": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the average unit price of all the tracks?", + "SpiderSynQuestion": "What is the average unit price of all the tracks?", + "query": "SELECT AVG(UnitPrice) FROM TRACK" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the average unit price for a track.", + "SpiderSynQuestion": "Find the average unit price for a track.", + "query": "SELECT AVG(UnitPrice) FROM TRACK" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the durations of the longest and the shortest tracks in milliseconds?", + "SpiderSynQuestion": "What are the durations of the longest and the shortest tracks in milliseconds?", + "query": "SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the maximum and minimum durations of tracks in milliseconds.", + "SpiderSynQuestion": "Find the maximum and minimum durations of tracks in milliseconds.", + "query": "SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Show the album names, ids and the number of tracks for each album.", + "SpiderSynQuestion": "Show the album names, ids and the number of tracks for each album.", + "query": "SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the names and ids of the different albums, and how many tracks are on each?", + "SpiderSynQuestion": "What are the names and ids of the different albums, and how many tracks are on each?", + "query": "SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the name of the most common genre in all tracks?", + "SpiderSynQuestion": "What is the name of the most common genre in all tracks?", + "query": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the name of the genre that is most frequent across all tracks.", + "SpiderSynQuestion": "Find the name of the genre that is most frequent across all tracks.", + "query": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the least common media type in all tracks?", + "SpiderSynQuestion": "What is the least common media type in all tracks?", + "query": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the name of the media type that is least common across all tracks?", + "SpiderSynQuestion": "What is the name of the media type that is least common across all tracks?", + "query": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.", + "SpiderSynQuestion": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.", + "query": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the titles and ids for albums containing tracks with unit price greater than 1?", + "SpiderSynQuestion": "What are the names and ids for albums containing tracks with unit price greater than 1?", + "query": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "How many tracks belong to rock genre?", + "SpiderSynQuestion": "How many tracks belong to rock genre?", + "query": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Count the number of tracks that are part of the rock genre.", + "SpiderSynQuestion": "Count the number of tracks that are part of the rock genre.", + "query": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the average unit price of tracks that belong to Jazz genre?", + "SpiderSynQuestion": "What is the average unit price of tracks that belong to Jazz genre?", + "query": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Jazz\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the average unit price of jazz tracks.", + "SpiderSynQuestion": "Find the average unit price of jazz tracks.", + "query": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Jazz\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the first name and last name of the customer that has email \"luisg@embraer.com.br\"?", + "SpiderSynQuestion": "What is the full name of the customer that has email \"luisg@embraer.com.br\"?", + "query": "SELECT FirstName , LastName FROM CUSTOMER WHERE Email = \"luisg@embraer.com.br\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the full name of the customer with the email \"luisg@embraer.com.br\".", + "SpiderSynQuestion": "Find the full name of the customer with the email \"luisg@embraer.com.br\".", + "query": "SELECT FirstName , LastName FROM CUSTOMER WHERE Email = \"luisg@embraer.com.br\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "How many customers have email that contains \"gmail.com\"?", + "SpiderSynQuestion": "How many clients have email that contains \"gmail.com\"?", + "query": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE \"%gmail.com%\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Count the number of customers that have an email containing \"gmail.com\".", + "SpiderSynQuestion": "Count the number of customers that have an email containing \"gmail.com\".", + "query": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE \"%gmail.com%\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the first name and last name employee helps the customer with first name Leonie?", + "SpiderSynQuestion": "What is the full name employee helps the customer with first name Leonie?", + "query": "SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = \"Leonie\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the full names of employees who help customers with the first name Leonie.", + "SpiderSynQuestion": "Find the full names of employees who help customers with the first name Leonie.", + "query": "SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = \"Leonie\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What city does the employee who helps the customer with postal code 70174 live in?", + "SpiderSynQuestion": "What city does the employee who helps the customer with postal code 70174 live in?", + "query": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = \"70174\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the cities corresponding to employees who help customers with the postal code 70174.", + "SpiderSynQuestion": "Find the cities corresponding to employees who help customers with the postal code 70174.", + "query": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = \"70174\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "How many distinct cities does the employees live in?", + "SpiderSynQuestion": "How many different cities does the employees live in?", + "query": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the number of different cities that employees live in.", + "SpiderSynQuestion": "Find the number of different cities that employees live in.", + "query": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.", + "SpiderSynQuestion": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.", + "query": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = \"Astrid\" AND LastName = \"Gruber\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?", + "SpiderSynQuestion": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?", + "query": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = \"Astrid\" AND LastName = \"Gruber\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find all the customer last names that do not have invoice totals larger than 20.", + "SpiderSynQuestion": "Find all the customer family names that do not have invoice totals larger than 20.", + "query": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the last names of customers without invoice totals exceeding 20?", + "SpiderSynQuestion": "What are the family names of customers without invoice totals exceeding 20?", + "query": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the first names of all customers that live in Brazil and have an invoice.", + "SpiderSynQuestion": "Find the forename of all customers that live in Brazil and have an invoice.", + "query": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Brazil\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the different first names for customers from Brazil who have also had an invoice?", + "SpiderSynQuestion": "What are the different forename for customers from Brazil who have also had an invoice?", + "query": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Brazil\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the address of all customers that live in Germany and have invoice.", + "SpiderSynQuestion": "Find the location of all customers that live in Germany and have invoice.", + "query": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Germany\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the addresses of customers living in Germany who have had an invoice?", + "SpiderSynQuestion": "What are the location of customers living in Germany who have had an invoice?", + "query": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Germany\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "List the phone numbers of all employees.", + "SpiderSynQuestion": "List the telephone numbers of all employees.", + "query": "SELECT Phone FROM EMPLOYEE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the phone numbers for each employee?", + "SpiderSynQuestion": "What are the mobile numbers for each employee?", + "query": "SELECT Phone FROM EMPLOYEE" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "How many tracks are in the AAC audio file media type?", + "SpiderSynQuestion": "How many tracks are in the AAC audio file media type?", + "query": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = \"AAC audio file\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Count the number of tracks that are of the media type \"AAC audio file\".", + "SpiderSynQuestion": "Count the number of tracks that are of the media type \"AAC audio file\".", + "query": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = \"AAC audio file\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?", + "SpiderSynQuestion": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?", + "query": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Latin\" OR T1.Name = \"Pop\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the average millisecond length of Latin and Pop tracks.", + "SpiderSynQuestion": "Find the average millisecond length of Latin and Pop tracks.", + "query": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Latin\" OR T1.Name = \"Pop\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Please show the employee first names and ids of employees who serve at least 10 customers.", + "SpiderSynQuestion": "Please show the employee forename and ids of employees who serve at least 10 customers.", + "query": "SELECT T1.FirstName , T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the first names and support rep ids for employees serving 10 or more customers?", + "SpiderSynQuestion": "What are the forename and support rep ids for employees serving 10 or more customers?", + "query": "SELECT T1.FirstName , T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Please show the employee last names that serves no more than 20 customers.", + "SpiderSynQuestion": "Please show the employee family name that serves no more than 20 customers.", + "query": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the last names of employees who serve at most 20 customers?", + "SpiderSynQuestion": "What are the family name of employees who serve at most 20 customers?", + "query": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Please list all album titles in alphabetical order.", + "SpiderSynQuestion": "Please list all album names in alphabetical order.", + "query": "SELECT Title FROM ALBUM ORDER BY Title" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are all the album titles, in alphabetical order?", + "SpiderSynQuestion": "What are all the album names, in alphabetical order?", + "query": "SELECT Title FROM ALBUM ORDER BY Title" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.", + "SpiderSynQuestion": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.", + "query": "SELECT T2.Name , T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?", + "SpiderSynQuestion": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?", + "query": "SELECT T2.Name , T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the names of artists that do not have any albums.", + "SpiderSynQuestion": "Find the names of artists that do not have any albums.", + "query": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the names of artists who have not released any albums?", + "SpiderSynQuestion": "What are the names of artists who have not released any albums?", + "query": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What is the average unit price of rock tracks?", + "SpiderSynQuestion": "What is the average unit price of rock tracks?", + "query": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the average unit price of tracks from the Rock genre.", + "SpiderSynQuestion": "Find the average unit price of tracks from the Rock genre.", + "query": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the duration of the longest and shortest pop tracks in milliseconds?", + "SpiderSynQuestion": "What are the duration of the longest and shortest pop tracks in milliseconds?", + "query": "SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Pop\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the maximum and minimum millisecond lengths of pop tracks.", + "SpiderSynQuestion": "Find the maximum and minimum millisecond lengths of pop tracks.", + "query": "SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Pop\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the birth dates of employees living in Edmonton?", + "SpiderSynQuestion": "What are the birthdays of employees living in Edmonton?", + "query": "SELECT BirthDate FROM EMPLOYEE WHERE City = \"Edmonton\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the birth dates corresponding to employees who live in the city of Edmonton.", + "SpiderSynQuestion": "Find the birthdays corresponding to employees who live in the city of Edmonton.", + "query": "SELECT BirthDate FROM EMPLOYEE WHERE City = \"Edmonton\"" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the distinct unit prices of all tracks?", + "SpiderSynQuestion": "What are the different unit prices of all tracks?", + "query": "SELECT distinct UnitPrice FROM TRACK" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the distinct unit prices for tracks.", + "SpiderSynQuestion": "Find the different unit prices for tracks.", + "query": "SELECT distinct UnitPrice FROM TRACK" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "How many artists do not have any album?", + "SpiderSynQuestion": "How many artists do not have any album?", + "query": "SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Cound the number of artists who have not released an album.", + "SpiderSynQuestion": "Cound the number of artists who have not released an album.", + "query": "SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?", + "SpiderSynQuestion": "What are the album names for albums containing both 'Reggae' and 'Rock' genre tracks?", + "query": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'" + }, + { + "db_id": "chinook_1", + "SpiderQuestion": "Find the titles of albums that contain tracks of both the Reggae and Rock genres.", + "SpiderSynQuestion": "Find the names of albums that contain tracks of both the Reggae and Rock genres.", + "query": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find all the phone numbers.", + "SpiderSynQuestion": "Find all the telephone numbers.", + "query": "SELECT customer_phone FROM available_policies" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are all the phone numbers?", + "SpiderSynQuestion": "What are all the telephone numbers?", + "query": "SELECT customer_phone FROM available_policies" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are the customer phone numbers under the policy \"Life Insurance\"?", + "SpiderSynQuestion": "What are the client mobile numbers under the policy \"Life Insurance\"?", + "query": "SELECT customer_phone FROM available_policies WHERE policy_type_code = \"Life Insurance\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are the phone numbers of customers using the policy with the code \"Life Insurance\"?", + "SpiderSynQuestion": "What are the mobile numbers of clients using the policy with the code \"Life Insurance\"?", + "query": "SELECT customer_phone FROM available_policies WHERE policy_type_code = \"Life Insurance\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Which policy type has the most records in the database?", + "SpiderSynQuestion": "Which insurance type has the most records in the database?", + "query": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Which policy type appears most frequently in the available policies?", + "SpiderSynQuestion": "Which insurance type appears most frequently in the available policies?", + "query": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are all the customer phone numbers under the most popular policy type?", + "SpiderSynQuestion": "What are all the client telephone numbers under the most popular policy type?", + "query": "SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the phone numbers of customers using the most common policy type among the available policies.", + "SpiderSynQuestion": "Find the telephone numbers of clients using the most common policy type among the available policies.", + "query": "SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the policy type used by more than 4 customers.", + "SpiderSynQuestion": "Find the insurance category used by more than 4 customers.", + "query": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the policy types more than 4 customers use. Show their type code.", + "SpiderSynQuestion": "Find the insurance categories more than 4 customers use. Show their category code.", + "query": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the total and average amount of settlements.", + "SpiderSynQuestion": "Find the total and average amount of settlements.", + "query": "SELECT sum(settlement_amount) , avg(settlement_amount) FROM settlements" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Return the sum and average of all settlement amounts.", + "SpiderSynQuestion": "Return the sum and average of all settlement amounts.", + "query": "SELECT sum(settlement_amount) , avg(settlement_amount) FROM settlements" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the name of services that have been used for more than 2 times in first notification of loss.", + "SpiderSynQuestion": "Find the name of services that have been used for more than 2 times in first notification of loss.", + "query": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING count(*) > 2" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Which services have been used more than twice in first notification of loss? Return the service name.", + "SpiderSynQuestion": "Which services have been used more than twice in first notification of loss? Return the service name.", + "query": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING count(*) > 2" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What is the effective date of the claim that has the largest amount of total settlement?", + "SpiderSynQuestion": "What is the effective day of the claim that has the largest amount of total settlement?", + "query": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the claim that has the largest total settlement amount. Return the effective date of the claim.", + "SpiderSynQuestion": "Find the claim that has the largest total settlement amount. Return the effective day of the claim.", + "query": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "How many policies are listed for the customer named \"Dayana Robel\"?", + "SpiderSynQuestion": "How many policies are listed for the client named \"Dayana Robel\"?", + "query": "SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Dayana Robel\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Count the total number of policies used by the customer named \"Dayana Robel\".", + "SpiderSynQuestion": "Count the total number of policies used by the client named \"Dayana Robel\".", + "query": "SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Dayana Robel\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What is the name of the customer who has the most policies listed?", + "SpiderSynQuestion": "What is the name of the client who has the most policies listed?", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Which customer uses the most policies? Give me the customer name.", + "SpiderSynQuestion": "Which client uses the most policies? Give me the client name.", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are all the policy types of the customer named \"Dayana Robel\"?", + "SpiderSynQuestion": "What are all the insurance categories of the client named \"Dayana Robel\"?", + "query": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = \"Dayana Robel\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Tell me the types of the policy used by the customer named \"Dayana Robel\".", + "SpiderSynQuestion": "Tell me the categories of the insurance used by the client named \"Dayana Robel\".", + "query": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = \"Dayana Robel\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are all the policy types of the customer that has the most policies listed?", + "SpiderSynQuestion": "What are all the insurance categories of the client that has the most policies listed?", + "query": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "List all the policy types used by the customer enrolled in the most policies.", + "SpiderSynQuestion": "List all the insurance categories used by the client enrolled in the most policies.", + "query": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "List all the services in the alphabetical order.", + "SpiderSynQuestion": "List all the services in the alphabetical order.", + "query": "SELECT service_name FROM services ORDER BY service_name" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Give me a list of all the service names sorted alphabetically.", + "SpiderSynQuestion": "Give me a list of all the service names sorted alphabetically.", + "query": "SELECT service_name FROM services ORDER BY service_name" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "How many services are there?", + "SpiderSynQuestion": "How many services are there?", + "query": "SELECT count(*) FROM services" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Count the total number of available services.", + "SpiderSynQuestion": "Count the total number of available services.", + "query": "SELECT count(*) FROM services" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the names of users who do not have a first notification of loss record.", + "SpiderSynQuestion": "Find the names of users who do not have a first notification of loss record.", + "query": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Which customers do not have a first notification of loss record? Give me the customer names.", + "SpiderSynQuestion": "Which users do not have a first notification of loss record? Give me the user names.", + "query": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the names of customers who have used either the service \"Close a policy\" or the service \"Upgrade a policy\".", + "SpiderSynQuestion": "Find the names of users who have used either the service \"Close a policy\" or the service \"Upgrade a policy\".", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" OR t3.service_name = \"Upgrade a policy\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Which customers have used the service named \"Close a policy\" or \"Upgrade a policy\"? Give me the customer names.", + "SpiderSynQuestion": "Which users have used the service named \"Close a policy\" or \"Upgrade a policy\"? Give me the user names.", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" OR t3.service_name = \"Upgrade a policy\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the names of customers who have used both the service \"Close a policy\" and the service \"New policy application\".", + "SpiderSynQuestion": "Find the names of users who have used both the service \"Close a policy\" and the service \"New policy application\".", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"New policy application\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Which customers have used both the service named \"Close a policy\" and the service named \"Upgrade a policy\"? Give me the customer names.", + "SpiderSynQuestion": "Which users have used both the service named \"Close a policy\" and the service named \"Upgrade a policy\"? Give me the user names.", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"New policy application\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the IDs of customers whose name contains \"Diana\".", + "SpiderSynQuestion": "Find the IDs of users whose name contains \"Diana\".", + "query": "SELECT customer_id FROM customers WHERE customer_name LIKE \"%Diana%\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are the IDs of customers who have \"Diana\" in part of their names?", + "SpiderSynQuestion": "What are the IDs of users who have \"Diana\" in part of their names?", + "query": "SELECT customer_id FROM customers WHERE customer_name LIKE \"%Diana%\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are the maximum and minimum settlement amount on record?", + "SpiderSynQuestion": "What are the maximum and minimum settlement amount on record?", + "query": "SELECT max(settlement_amount) , min(settlement_amount) FROM settlements" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Find the maximum and minimum settlement amount.", + "SpiderSynQuestion": "Find the maximum and minimum settlement amount.", + "query": "SELECT max(settlement_amount) , min(settlement_amount) FROM settlements" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "List all the customers in increasing order of IDs.", + "SpiderSynQuestion": "List all the users in increasing order of IDs.", + "query": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What is the ordered list of customer ids?", + "SpiderSynQuestion": "What is the ordered list of user ids?", + "query": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "Retrieve the open and close dates of all the policies associated with the customer whose name contains \"Diana\"", + "SpiderSynQuestion": "Retrieve the open and close dates of all the policies associated with the customer whose name contains \"Diana\"", + "query": "SELECT t2.date_opened , t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE \"%Diana%\"" + }, + { + "db_id": "insurance_fnol", + "SpiderQuestion": "What are the open and close dates of all the policies used by the customer who have \"Diana\" in part of their names?", + "SpiderSynQuestion": "What are the open and close dates of all the policies used by the customer who have \"Diana\" in part of their names?", + "query": "SELECT t2.date_opened , t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE \"%Diana%\"" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "How many kinds of enzymes are there?", + "SpiderSynQuestion": "How many kinds of enzymes are there?", + "query": "SELECT count(*) FROM enzyme" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the total count of enzymes?", + "SpiderSynQuestion": "What is the total count of enzymes?", + "query": "SELECT count(*) FROM enzyme" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "List the name of enzymes in descending lexicographical order.", + "SpiderSynQuestion": "List the name of enzymes in descending lexicographical order.", + "query": "SELECT name FROM enzyme ORDER BY name DESC" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names of enzymes in descending order?", + "SpiderSynQuestion": "What are the names of enzymes in descending order?", + "query": "SELECT name FROM enzyme ORDER BY name DESC" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "List the names and the locations that the enzymes can make an effect.", + "SpiderSynQuestion": "List the names and the position that the enzymes can make an effect.", + "query": "SELECT name , LOCATION FROM enzyme" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names and locations of all enzymes listed?", + "SpiderSynQuestion": "What are the names and position of all enzymes listed?", + "query": "SELECT name , LOCATION FROM enzyme" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?", + "SpiderSynQuestion": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?", + "query": "SELECT max(OMIM) FROM enzyme" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the maximum OMIM value in the database?", + "SpiderSynQuestion": "What is the maximum OMIM value in the database?", + "query": "SELECT max(OMIM) FROM enzyme" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?", + "SpiderSynQuestion": "What is the goods, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?", + "query": "SELECT product , chromosome , porphyria FROM enzyme WHERE LOCATION = 'Cytosol'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?", + "SpiderSynQuestion": "What is the goods, chromosome, and porphyria of the enzymes located at 'Cytosol'?", + "query": "SELECT product , chromosome , porphyria FROM enzyme WHERE LOCATION = 'Cytosol'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names of enzymes who does not produce 'Heme'?", + "SpiderSynQuestion": "What are the names of enzymes who does not produce 'Heme'?", + "query": "SELECT name FROM enzyme WHERE product != 'Heme'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names of enzymes whose product is not 'Heme'?", + "SpiderSynQuestion": "What are the names of enzymes whose goods is not 'Heme'?", + "query": "SELECT name FROM enzyme WHERE product != 'Heme'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?", + "SpiderSynQuestion": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?", + "query": "SELECT name , trade_name FROM medicine WHERE FDA_approved = 'Yes'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names and trade names of the medcines that are FDA approved?", + "SpiderSynQuestion": "What are the names and trade names of the medcines that are FDA approved?", + "query": "SELECT name , trade_name FROM medicine WHERE FDA_approved = 'Yes'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?", + "SpiderSynQuestion": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?", + "query": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?", + "SpiderSynQuestion": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?", + "query": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the ids and names of the medicine that can interact with two or more enzymes?", + "SpiderSynQuestion": "What are the ids and names of the medicine that can interact with two or more enzymes?", + "query": "SELECT T1.id , T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING count(*) >= 2" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?", + "SpiderSynQuestion": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?", + "query": "SELECT T1.id , T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING count(*) >= 2" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.", + "SpiderSynQuestion": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.", + "query": "SELECT T1.id , T1.Name , T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?", + "SpiderSynQuestion": "What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?", + "query": "SELECT T1.id , T1.Name , T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?", + "SpiderSynQuestion": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?", + "query": "SELECT T1.id , T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the id and name of the enzyme that can interact with the most medicines as an activator?", + "SpiderSynQuestion": "What is the id and name of the enzyme that can interact with the most medicines as an activator?", + "query": "SELECT T1.id , T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", + "SpiderSynQuestion": "What is the interplay category of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", + "query": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", + "SpiderSynQuestion": "What is the category of interplay for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", + "query": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the most common interaction type between enzymes and medicine? And how many are there?", + "SpiderSynQuestion": "What is the most common interplay category between enzymes and medicine? And how many are there?", + "query": "SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the most common types of interactions between enzymes and medicine, and how many types are there?", + "SpiderSynQuestion": "What are the most common categories of interplay between enzymes and medicine, and how many categories are there?", + "query": "SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "How many medicines have the FDA approval status 'No' ?", + "SpiderSynQuestion": "How many medicines have the FDA approval status 'No' ?", + "query": "SELECT count(*) FROM medicine WHERE FDA_approved = 'No'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "How many medicines were not approved by the FDA?", + "SpiderSynQuestion": "How many medicines were not approved by the FDA?", + "query": "SELECT count(*) FROM medicine WHERE FDA_approved = 'No'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "How many enzymes do not have any interactions?", + "SpiderSynQuestion": "How many enzymes do not have any interactions?", + "query": "SELECT count(*) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction );" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the count of enzymes without any interactions?", + "SpiderSynQuestion": "What is the count of enzymes without any interactions?", + "query": "SELECT count(*) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction );" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What is the id and trade name of the medicines can interact with at least 3 enzymes?", + "SpiderSynQuestion": "What is the id and trade name of the medicines can interact with at least 3 enzymes?", + "query": "SELECT T1.id , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?", + "SpiderSynQuestion": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?", + "query": "SELECT T1.id , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?", + "SpiderSynQuestion": "What are the different name, position and goods of the enzymes which has any 'inhibitor' interaction?", + "query": "SELECT DISTINCT T1.name , T1.location , T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?", + "SpiderSynQuestion": "What are the different names, positions, and goods of the enzymes that are capable inhibitor interactions?", + "query": "SELECT DISTINCT T1.name , T1.location , T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.", + "SpiderSynQuestion": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.", + "query": "SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?", + "SpiderSynQuestion": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?", + "query": "SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.", + "SpiderSynQuestion": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.", + "query": "SELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?", + "SpiderSynQuestion": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?", + "query": "SELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "How many distinct FDA approval statuses are there for the medicines?", + "SpiderSynQuestion": "How many different FDA approval statuses are there for the medicines?", + "query": "SELECT count(DISTINCT FDA_approved) FROM medicine" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "How many different FDA approval statuses exist for medicines?", + "SpiderSynQuestion": "How many different FDA approval statuses exist for medicines?", + "query": "SELECT count(DISTINCT FDA_approved) FROM medicine" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "Which enzyme names have the substring \"ALA\"?", + "SpiderSynQuestion": "Which enzyme names have the substring \"ALA\"?", + "query": "SELECT name FROM enzyme WHERE name LIKE \"%ALA%\"" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "What are the names of enzymes that include the string 'ALA'?", + "SpiderSynQuestion": "What are the names of enzymes that include the string 'ALA'?", + "query": "SELECT name FROM enzyme WHERE name LIKE \"%ALA%\"" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "find the number of medicines offered by each trade.", + "SpiderSynQuestion": "find the number of medicines offered by each trade.", + "query": "SELECT trade_name , count(*) FROM medicine GROUP BY trade_name" + }, + { + "db_id": "medicine_enzyme_interaction", + "SpiderQuestion": "How many medicines are offered by each trade name?", + "SpiderSynQuestion": "How many medicines are offered by each trade name?", + "query": "SELECT trade_name , count(*) FROM medicine GROUP BY trade_name" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "List all schools and their nicknames in the order of founded year.", + "SpiderSynQuestion": "List all schools and their monicker in the order of founded year.", + "query": "SELECT school , nickname FROM university ORDER BY founded" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the different schools and their nicknames, ordered by their founding years?", + "SpiderSynQuestion": "What are the different schools and their monicker, ordered by their founding years?", + "query": "SELECT school , nickname FROM university ORDER BY founded" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "List all public schools and their locations.", + "SpiderSynQuestion": "List all public schools and their addresses.", + "query": "SELECT school , LOCATION FROM university WHERE affiliation = 'Public'" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the public schools and what are their locations?", + "SpiderSynQuestion": "What are the public schools and what are their addresses?", + "query": "SELECT school , LOCATION FROM university WHERE affiliation = 'Public'" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "When was the school with the largest enrollment founded?", + "SpiderSynQuestion": "When was the school with the largest enrollment established?", + "query": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Return the founded year for the school with the largest enrollment.", + "SpiderSynQuestion": "Return the established year for the school with the largest enrollment.", + "query": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find the founded year of the newest non public school.", + "SpiderSynQuestion": "Find the established year of the newest non public school.", + "query": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What is the founded year of the non public school that was founded most recently?", + "SpiderSynQuestion": "What is the established year of the non public school that was founded most recently?", + "query": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "How many schools are in the basketball match?", + "SpiderSynQuestion": "How many schools are in the basketball match?", + "query": "SELECT count(DISTINCT school_id) FROM basketball_match" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Count the number of schools that have had basketball matches.", + "SpiderSynQuestion": "Count the number of schools that have had basketball matches.", + "query": "SELECT count(DISTINCT school_id) FROM basketball_match" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What is the highest acc percent score in the competition?", + "SpiderSynQuestion": "What is the highest acc percent score in the competition?", + "query": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Return the highest acc percent across all basketball matches.", + "SpiderSynQuestion": "Return the highest acc percent across all basketball matches.", + "query": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What is the primary conference of the school that has the lowest acc percent score in the competition?", + "SpiderSynQuestion": "What is the primary meeting of the school that has the lowest acc percent score in the competition?", + "query": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Return the primary conference of the school with the lowest acc percentage score.", + "SpiderSynQuestion": "Return the primary meeting of the school with the lowest acc percentage score.", + "query": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What is the team name and acc regular season score of the school that was founded for the longest time?", + "SpiderSynQuestion": "What is the team name and acc regular season score of the school that was founded for the longest time?", + "query": "SELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.", + "SpiderSynQuestion": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.", + "query": "SELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find the location and all games score of the school that has Clemson as its team name.", + "SpiderSynQuestion": "Find the addresses and all games score of the school that has Clemson as its team name.", + "query": "SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the all games score and location of the school called Clemson?", + "SpiderSynQuestion": "What are the all games score and address of the school called Clemson?", + "query": "SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the average enrollment size of the universities that are founded before 1850?", + "SpiderSynQuestion": "What are the average number of students enrolled\u00a0in\u00a0the universities that are founded before 1850?", + "query": "SELECT avg(enrollment) FROM university WHERE founded < 1850" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Return the average enrollment of universities founded before 1850.", + "SpiderSynQuestion": "Return the average number of students enrolled\u00a0in\u00a0the universities founded before 1850.", + "query": "SELECT avg(enrollment) FROM university WHERE founded < 1850" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Show the enrollment and primary_conference of the oldest college.", + "SpiderSynQuestion": "Show the number of students enrolled\u00a0and primary_conference of the oldest college.", + "query": "SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the enrollment and primary conference for the university which was founded the earliest?", + "SpiderSynQuestion": "What are the enrollment and primary meeting for the college which was founded the earliest?", + "query": "SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What is the total and minimum enrollment of all schools?", + "SpiderSynQuestion": "What is the total and minimum number of student enrolled in all schools?", + "query": "SELECT sum(enrollment) , min(enrollment) FROM university" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Return the total and minimum enrollments across all schools.", + "SpiderSynQuestion": "Return the total and minimum number of student enrolled in all schools.", + "query": "SELECT sum(enrollment) , min(enrollment) FROM university" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find the total student enrollment for different affiliation type schools.", + "SpiderSynQuestion": "Find the total number of student enrolled in different affiliation type schools.", + "query": "SELECT sum(enrollment) , affiliation FROM university GROUP BY affiliation" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the total enrollments of universities of each affiliation type?", + "SpiderSynQuestion": "What are the total number of student enrolled in the universities of each affiliation type?", + "query": "SELECT sum(enrollment) , affiliation FROM university GROUP BY affiliation" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "How many schools do not participate in the basketball match?", + "SpiderSynQuestion": "How many schools do not participate in the basketball match?", + "query": "SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Count the number of universities that do not participate in the baketball match.", + "SpiderSynQuestion": "Count the number of colleges that do not participate in the baketball match.", + "query": "SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find the schools that were either founded after 1850 or public.", + "SpiderSynQuestion": "Find the schools that were either founded after 1850 or public.", + "query": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the schools that were either founded before 1850 or are public?", + "SpiderSynQuestion": "What are the schools that were either founded before 1850 or are public?", + "query": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find how many different affiliation types there are.", + "SpiderSynQuestion": "Find how many different affiliation types there are.", + "query": "SELECT count(DISTINCT affiliation) FROM university" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Count the number of different affiliation types.", + "SpiderSynQuestion": "Count the number of different affiliation types.", + "query": "SELECT count(DISTINCT affiliation) FROM university" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find how many school locations have the word 'NY'.", + "SpiderSynQuestion": "Find how many school addresses have the word 'NY'.", + "query": "SELECT count(*) FROM university WHERE LOCATION LIKE \"%NY%\"" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "How many universities have a location that contains NY?", + "SpiderSynQuestion": "How many colleges have an address that contains NY?", + "query": "SELECT count(*) FROM university WHERE LOCATION LIKE \"%NY%\"" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find the team names of the universities whose enrollments are smaller than the average enrollment size.", + "SpiderSynQuestion": "Find the team names of the colleges whose enrollments are smaller than the average enrollment size.", + "query": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university)" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the names of teams from universities that have a below average enrollment?", + "SpiderSynQuestion": "What are the names of teams from colleges that have a below average enrollment?", + "query": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university)" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find the number of universities that have over a 20000 enrollment size for each affiliation type.", + "SpiderSynQuestion": "Find the number of colleges that have over a 20000 enrollment size for each affiliation type.", + "query": "SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?", + "SpiderSynQuestion": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?", + "query": "SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.", + "SpiderSynQuestion": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.", + "query": "SELECT sum(Enrollment) , affiliation FROM university WHERE founded > 1850 GROUP BY affiliation" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?", + "SpiderSynQuestion": "What are the different affiliations, and what is the total number of students enrolled in the schools founded after 1850 for each enrollment type?", + "query": "SELECT sum(Enrollment) , affiliation FROM university WHERE founded > 1850 GROUP BY affiliation" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What is the maximum enrollment across all schools?", + "SpiderSynQuestion": "What is the maximum enrollment across all schools?", + "query": "SELECT max(Enrollment) FROM university" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "Return the maximum enrollment across all schools.", + "SpiderSynQuestion": "Return the maximum enrollment across all schools.", + "query": "SELECT max(Enrollment) FROM university" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "List all information regarding the basketball match.", + "SpiderSynQuestion": "List the details regarding the basketball match.", + "query": "SELECT * FROM basketball_match" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What is all the information about the basketball match?", + "SpiderSynQuestion": "What is all the details about the basketball match?", + "query": "SELECT * FROM basketball_match" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "List names of all teams in the basketball competition, ordered by all home scores in descending order.", + "SpiderSynQuestion": "List names of all teams in the basketball competition, ordered by all home scores in descending order.", + "query": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC" + }, + { + "db_id": "university_basketball", + "SpiderQuestion": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?", + "SpiderSynQuestion": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?", + "query": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "the names of models that launched between 2002 and 2004.", + "SpiderSynQuestion": "the names of models that launched between 2002 and 2004.", + "query": "SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Which model has the least amount of RAM? List the model name and the amount of RAM.", + "SpiderSynQuestion": "Which model has the least amount of RAM? List the model name and the amount of RAM.", + "query": "SELECT Model_name , RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC LIMIT 1;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?", + "SpiderSynQuestion": "What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?", + "query": "SELECT chip_model , screen_mode FROM phone WHERE Hardware_Model_name = \"LG-P760\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "How many phone hardware models are produced by the company named \"Nokia Corporation\"?", + "SpiderSynQuestion": "How many telephone hardware models are produced by the company named \"Nokia Corporation\"?", + "query": "SELECT count(*) FROM phone WHERE Company_name = \"Nokia Corporation\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?", + "SpiderSynQuestion": "What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?", + "query": "SELECT max(T1.RAM_MiB) , min(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = \"Nokia Corporation\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "What is the average ROM size of phones produced by the company named \"Nokia Corporation\"?", + "SpiderSynQuestion": "What is the average ROM size of phones produced by the company named \"Nokia Corporation\"?", + "query": "SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = \"Nokia Corporation\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.", + "SpiderSynQuestion": "List the hardware model name and enterprise name for all the phones that were launched in year 2002 or have RAM size greater than 32.", + "query": "SELECT T2.Hardware_Model_name , T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.", + "SpiderSynQuestion": "Find all telephones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.", + "query": "SELECT Hardware_Model_name , Company_name FROM phone WHERE Accreditation_type LIKE 'Full';" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is \"LG-P760\".", + "SpiderSynQuestion": "Find the Char cells, Pixels and Hardware colors for the screen of the phone whose hardware model name is \"LG-P760\".", + "query": "SELECT T1.Char_cells , T1.Pixels , T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = \"LG-P760\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the hardware model name and company name for the phone whose screen mode type is \"Graphics.\"", + "SpiderSynQuestion": "List the hardware model name and enterprise name for the phone whose screen mode type is \"Graphics.\"", + "query": "SELECT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = \"Graphics\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.", + "SpiderSynQuestion": "Find the name of the enterprise that has the least number of phone models. List the company name and the number of phone model produced by that company.", + "query": "SELECT Company_name , count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the name of the company that produced more than one phone model.", + "SpiderSynQuestion": "List the name of the enterprise that produced more than one phone model.", + "query": "SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*) > 1;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the maximum, minimum and average number of used kb in screen mode.", + "SpiderSynQuestion": "List the maximum, minimum and average number of used kb in screen mode.", + "query": "SELECT max(used_kb) , min(used_kb) , avg(used_kb) FROM screen_mode;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the name of the phone model launched in year 2002 and with the highest RAM size.", + "SpiderSynQuestion": "List the name of the telephone model launched in year 2002 and with the highest RAM size.", + "query": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "What are the wifi and screen mode type of the hardware model named \"LG-P760\"?", + "SpiderSynQuestion": "What are the wifi and screen mode type of the hardware model named \"LG-P760\"?", + "query": "SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = \"LG-P760\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the hardware model name for the phones that have screen mode type \"Text\" or RAM size greater than 32.", + "SpiderSynQuestion": "List the hardware model name for the mobiles that have screen mode type \"Text\" or RAM size greater than 32.", + "query": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = \"Text\" OR T1.RAM_MiB > 32;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the hardware model name for the phones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\"", + "SpiderSynQuestion": "List the hardware model name for the telephones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\"", + "query": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = \"Graphics\" OR t2.Company_name = \"Nokia Corporation\"" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text.", + "SpiderSynQuestion": "List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text.", + "query": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = \"Nokia Corporation\" AND T1.Type != \"Text\";" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.", + "SpiderSynQuestion": "List the phone hardware model and enterprise name for the phones whose screen usage in kb is between 10 and 15.", + "query": "SELECT DISTINCT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15;" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the number of phones for each accreditation type.", + "SpiderSynQuestion": "Find the number of telephones for each accreditation type.", + "query": "SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "How many phones belongs to each accreditation type?", + "SpiderSynQuestion": "How many telephones belongs to each accreditation type?", + "query": "SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the accreditation level that more than 3 phones use.", + "SpiderSynQuestion": "Find the accreditation level that more than 3 phones use.", + "query": "SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*) > 3" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the details for all chip models.", + "SpiderSynQuestion": "Find the information for all chip models.", + "query": "SELECT * FROM chip_model" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "How many models do not have the wifi function?", + "SpiderSynQuestion": "How many models do not have the wifi function?", + "query": "SELECT count(*) FROM chip_model WHERE wifi = 'No'" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Count the number of chip model that do not have wifi.", + "SpiderSynQuestion": "Count the number of chip model that do not have wifi.", + "query": "SELECT count(*) FROM chip_model WHERE wifi = 'No'" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "List all the model names sorted by their launch year.", + "SpiderSynQuestion": "List all the model names sorted by their launch year.", + "query": "SELECT model_name FROM chip_model ORDER BY launch_year" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the average ram mib size of the chip models that are never used by any phone.", + "SpiderSynQuestion": "Find the average ram mib size of the chip models that are never used by any phone.", + "query": "SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the names of the chip models that are not used by any phone with full accreditation type.", + "SpiderSynQuestion": "Find the names of the chip models that are not used by any phone with full accreditation type.", + "query": "SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full'" + }, + { + "db_id": "phone_1", + "SpiderQuestion": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.", + "SpiderSynQuestion": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.", + "query": "SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full'" + }, + { + "db_id": "match_season", + "SpiderQuestion": "How many countries are there in total?", + "SpiderSynQuestion": "How many nations are there in total?", + "query": "SELECT count(*) FROM country" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Count the number of countries.", + "SpiderSynQuestion": "Count the number of nations.", + "query": "SELECT count(*) FROM country" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the country name and capital of all countries.", + "SpiderSynQuestion": "Show the nation name and capital of all nations.", + "query": "SELECT Country_name , Capital FROM country" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the names and capitals of each country?", + "SpiderSynQuestion": "What are the names and capitals of each nation?", + "query": "SELECT Country_name , Capital FROM country" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show all official native languages that contain the word \"English\".", + "SpiderSynQuestion": "Show all official native languages that contain the word \"English\".", + "query": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE \"%English%\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the official native languages that contain the string \"English\".", + "SpiderSynQuestion": "What are the official native languages that contain the string \"English\".", + "query": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE \"%English%\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show all distinct positions of matches.", + "SpiderSynQuestion": "Show all different positions of matches.", + "query": "SELECT DISTINCT POSITION FROM match_season" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the different positions for match season?", + "SpiderSynQuestion": "What are the different positions for match season?", + "query": "SELECT DISTINCT POSITION FROM match_season" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the players from college UCLA.", + "SpiderSynQuestion": "Show the participants from college UCLA.", + "query": "SELECT Player FROM match_season WHERE College = \"UCLA\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Who are the players from UCLA?", + "SpiderSynQuestion": "Who are the participants from UCLA?", + "query": "SELECT Player FROM match_season WHERE College = \"UCLA\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the distinct position of players from college UCLA or Duke.", + "SpiderSynQuestion": "Show the different position of players from college UCLA or Duke.", + "query": "SELECT DISTINCT POSITION FROM match_season WHERE College = \"UCLA\" OR College = \"Duke\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the different positions of players from UCLA or Duke colleges?", + "SpiderSynQuestion": "What are the different positions of players from UCLA or Duke colleges?", + "query": "SELECT DISTINCT POSITION FROM match_season WHERE College = \"UCLA\" OR College = \"Duke\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the draft pick numbers and draft classes of players whose positions are defenders.", + "SpiderSynQuestion": "Show the draft pick numbers and draft classes of players whose positions are defenders.", + "query": "SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = \"Defender\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the draft pick numbers and draft classes for players who play the Defender position?", + "SpiderSynQuestion": "What are the draft pick numbers and draft classes for players who play the Defender position?", + "query": "SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = \"Defender\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "How many distinct teams are involved in match seasons?", + "SpiderSynQuestion": "How many different teams are involved in match seasons?", + "query": "SELECT count(DISTINCT Team) FROM match_season" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Count the number of different teams involved in match season.", + "SpiderSynQuestion": "Count the number of different teams involved in match season.", + "query": "SELECT count(DISTINCT Team) FROM match_season" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the players and the years played.", + "SpiderSynQuestion": "Show the participants and the years played.", + "query": "SELECT Player , Years_Played FROM player" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Who are the different players and how many years has each played?", + "SpiderSynQuestion": "Who are the different participants and how many years has each played?", + "query": "SELECT Player , Years_Played FROM player" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show all team names.", + "SpiderSynQuestion": "Show all team names.", + "query": "SELECT Name FROM Team" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the names of all teams?", + "SpiderSynQuestion": "What are the names of all teams?", + "query": "SELECT Name FROM Team" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the season, the player, and the name of the country that player belongs to.", + "SpiderSynQuestion": "Show the season, the participant, and the name of the nation that player belongs to.", + "query": "SELECT T2.Season , T2.Player , T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country" + }, + { + "db_id": "match_season", + "SpiderQuestion": "For each player, what are their name, season, and country that they belong to?", + "SpiderSynQuestion": "For each participant, what are their name, season, and country that they belong to?", + "query": "SELECT T2.Season , T2.Player , T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Which players are from Indonesia?", + "SpiderSynQuestion": "Which participants are from Indonesia?", + "query": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = \"Indonesia\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Who are the players from Indonesia?", + "SpiderSynQuestion": "Who are the participants from Indonesia?", + "query": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = \"Indonesia\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the distinct positions of the players from a country whose capital is Dublin?", + "SpiderSynQuestion": "What are the different positions of the players from a nation whose capital is Dublin?", + "query": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = \"Dublin\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Give the different positions of players who play for the country with the capital Dublin.", + "SpiderSynQuestion": "Give the different positions of players who play for the nation with the capital Dublin.", + "query": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = \"Dublin\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the official languages of the countries of players from Maryland or Duke college?", + "SpiderSynQuestion": "What are the official languages of the nations of players from Maryland or Duke college?", + "query": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = \"Maryland\" OR T2.College = \"Duke\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Return the official native languages of countries who have players from Maryland or Duke colleges.", + "SpiderSynQuestion": "Return the official native languages of nations who have players from Maryland or Duke colleges.", + "query": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = \"Maryland\" OR T2.College = \"Duke\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "How many distinct official languages are there among countries of players whose positions are defenders.", + "SpiderSynQuestion": "How many different official languages are there among nations of players whose positions are defenders.", + "query": "SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Count the number of different official languages corresponding to countries that players who play Defender are from.", + "SpiderSynQuestion": "Count the number of different official languages corresponding to nations that players who play Defender are from.", + "query": "SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the season, the player, and the name of the team that players belong to.", + "SpiderSynQuestion": "Show the season, the participant, and the name of the team that players belong to.", + "query": "SELECT T1.Season , T1.Player , T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Who are the different players, what season do they play in, and what is the name of the team they are on?", + "SpiderSynQuestion": "Who are the different participants, what season do they play in, and what is the name of the team they are on?", + "query": "SELECT T1.Season , T1.Player , T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the positions of the players from the team with name \"Ryley Goldner\".", + "SpiderSynQuestion": "Show the positions of the players from the team with name \"Ryley Goldner\".", + "query": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Ryley Goldner\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Return the positions of players on the team Ryley Goldner.", + "SpiderSynQuestion": "Return the positions of players on the team Ryley Goldner.", + "query": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Ryley Goldner\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "How many distinct colleges are associated with players from the team with name \"Columbus Crew\".", + "SpiderSynQuestion": "How many different universities are associated with players from the team with name \"Columbus Crew\".", + "query": "SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Count the number of different colleges that players who play for Columbus Crew are from.", + "SpiderSynQuestion": "Count the number of different universities that players who play for Columbus Crew are from.", + "query": "SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the players and years played for players from team \"Columbus Crew\".", + "SpiderSynQuestion": "Show the participants and years played for players from team \"Columbus Crew\".", + "query": "SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the players who played for Columbus Crew, and how many years did each play for?", + "SpiderSynQuestion": "What are the participants who played for Columbus Crew, and how many years did each play for?", + "query": "SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the position of players and the corresponding number of players.", + "SpiderSynQuestion": "Show the position of players and the corresponding number of players.", + "query": "SELECT POSITION , COUNT(*) FROM match_season GROUP BY POSITION" + }, + { + "db_id": "match_season", + "SpiderQuestion": "How many players played each position?", + "SpiderSynQuestion": "How many players played each position?", + "query": "SELECT POSITION , COUNT(*) FROM match_season GROUP BY POSITION" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the country names and the corresponding number of players.", + "SpiderSynQuestion": "Show the nation names and the corresponding number of players.", + "query": "SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name" + }, + { + "db_id": "match_season", + "SpiderQuestion": "How many players are from each country?", + "SpiderSynQuestion": "How many participants are from each nation?", + "query": "SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Return all players sorted by college in ascending alphabetical order.", + "SpiderSynQuestion": "Return all gamers sorted by college in ascending alphabetical order.", + "query": "SELECT player FROM match_season ORDER BY College ASC" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are all the players who played in match season, sorted by college in ascending alphabetical order?", + "SpiderSynQuestion": "What are all the participants who played in match season, sorted by college in ascending alphabetical order?", + "query": "SELECT player FROM match_season ORDER BY College ASC" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the most common position of players in match seasons.", + "SpiderSynQuestion": "Show the most common position of players in match seasons.", + "query": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What is the position that is most common among players in match seasons?", + "SpiderSynQuestion": "What is the position that is most common among players in match seasons?", + "query": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the top 3 most common colleges of players in match seasons.", + "SpiderSynQuestion": "Show the top 3 most common universities of players in match seasons.", + "query": "SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the three colleges from which the most players are from?", + "SpiderSynQuestion": "What are the three universities from which the most players are from?", + "query": "SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the name of colleges that have at least two players.", + "SpiderSynQuestion": "Show the name of universities that have at least two players.", + "query": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the names of all colleges that have two or more players?", + "SpiderSynQuestion": "What are the names of all universities that have two or more players?", + "query": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Show the name of colleges that have at least two players in descending alphabetical order.", + "SpiderSynQuestion": "Show the name of universities that have at least two players in descending alphabetical order.", + "query": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the names of colleges that have two or more players, listed in descending alphabetical order?", + "SpiderSynQuestion": "What are the names of universities that have two or more players, listed in descending alphabetical order?", + "query": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the names of teams that do no have match season record?", + "SpiderSynQuestion": "What are the names of teams that do no have match season record?", + "query": "SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Return the names of teams that have no match season record.", + "SpiderSynQuestion": "Return the names of teams that have no match season record.", + "query": "SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)" + }, + { + "db_id": "match_season", + "SpiderQuestion": "What are the names of countries that have both players with position forward and players with position defender?", + "SpiderSynQuestion": "What are the names of nations that have both players with position forward and players with position defender?", + "query": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Forward\" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.", + "SpiderSynQuestion": "Return the names of nations that have players that play the Forward position, as well as players who play the Defender position.", + "query": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Forward\" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Which college have both players with position midfielder and players with position defender?", + "SpiderSynQuestion": "Which university have both players with position midfielder and players with position defender?", + "query": "SELECT College FROM match_season WHERE POSITION = \"Midfielder\" INTERSECT SELECT College FROM match_season WHERE POSITION = \"Defender\"" + }, + { + "db_id": "match_season", + "SpiderQuestion": "Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.", + "SpiderSynQuestion": "Return the universities that have players who play the Midfielder position, as well as players who play the Defender position.", + "query": "SELECT College FROM match_season WHERE POSITION = \"Midfielder\" INTERSECT SELECT College FROM match_season WHERE POSITION = \"Defender\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "How many climbers are there?", + "SpiderSynQuestion": "How many mountaineer are there?", + "query": "SELECT count(*) FROM climber" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Count the number of climbers.", + "SpiderSynQuestion": "Count the number of mountaineer.", + "query": "SELECT count(*) FROM climber" + }, + { + "db_id": "climbing", + "SpiderQuestion": "List the names of climbers in descending order of points.", + "SpiderSynQuestion": "List the names of mountaineer in descending order of points.", + "query": "SELECT Name FROM climber ORDER BY Points DESC" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the names of the climbers, ordered by points descending?", + "SpiderSynQuestion": "What are the names of the mountaineer, ordered by points descending?", + "query": "SELECT Name FROM climber ORDER BY Points DESC" + }, + { + "db_id": "climbing", + "SpiderQuestion": "List the names of climbers whose country is not Switzerland.", + "SpiderSynQuestion": "List the names of mountaineer whose country is not Switzerland.", + "query": "SELECT Name FROM climber WHERE Country != \"Switzerland\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the names of climbers who are not from the country of Switzerland?", + "SpiderSynQuestion": "What are the names of mountaineer who are not from the country of Switzerland?", + "query": "SELECT Name FROM climber WHERE Country != \"Switzerland\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What is the maximum point for climbers whose country is United Kingdom?", + "SpiderSynQuestion": "What is the maximum point for mountaineers whose country is United Kingdom?", + "query": "SELECT max(Points) FROM climber WHERE Country = \"United Kingdom\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Return the maximum number of points for climbers from the United Kingdom.", + "SpiderSynQuestion": "Return the maximum number of points for mountaineers from the United Kingdom.", + "query": "SELECT max(Points) FROM climber WHERE Country = \"United Kingdom\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "How many distinct countries are the climbers from?", + "SpiderSynQuestion": "How many different nations are the mountaineers from?", + "query": "SELECT COUNT(DISTINCT Country) FROM climber" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Count the number of different countries that climbers are from.", + "SpiderSynQuestion": "Count the number of different nations that mountaineers are from.", + "query": "SELECT COUNT(DISTINCT Country) FROM climber" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the names of mountains in ascending alphabetical order?", + "SpiderSynQuestion": "What are the names of mountains in ascending alphabetical order?", + "query": "SELECT Name FROM mountain ORDER BY Name ASC" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Give the names of mountains in alphabetical order.", + "SpiderSynQuestion": "Give the names of mountains in alphabetical order.", + "query": "SELECT Name FROM mountain ORDER BY Name ASC" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the countries of mountains with height bigger than 5000?", + "SpiderSynQuestion": "What are the nations of mountains with height bigger than 5000?", + "query": "SELECT Country FROM mountain WHERE Height > 5000" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Return the countries of the mountains that have a height larger than 5000.", + "SpiderSynQuestion": "Return the nations of the mountains that have a height larger than 5000.", + "query": "SELECT Country FROM mountain WHERE Height > 5000" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What is the name of the highest mountain?", + "SpiderSynQuestion": "What is the name of the highest mountain?", + "query": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Return the name of the mountain with the greatest height.", + "SpiderSynQuestion": "Return the name of the mountain with the greatest height.", + "query": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "List the distinct ranges of the mountains with the top 3 prominence.", + "SpiderSynQuestion": "List the different ranges of the mountains with the top 3 prominence.", + "query": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the different ranges of the 3 mountains with the highest prominence?", + "SpiderSynQuestion": "What are the different ranges of the 3 mountains with the highest prominence?", + "query": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show names of climbers and the names of mountains they climb.", + "SpiderSynQuestion": "Show names of mountaineer and the names of mountains they climb.", + "query": "SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the names of climbers and the corresponding names of mountains that they climb?", + "SpiderSynQuestion": "What are the names of mountaineer and the corresponding names of mountains that they climb?", + "query": "SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show the names of climbers and the heights of mountains they climb.", + "SpiderSynQuestion": "Show the names of mountaineer and the heights of mountains they climb.", + "query": "SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the names of climbers and the corresponding heights of the mountains that they climb?", + "SpiderSynQuestion": "What are the names of mountaineer and the corresponding heights of the mountains that they climb?", + "query": "SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show the height of the mountain climbed by the climber with the maximum points.", + "SpiderSynQuestion": "Show the height of the mountain climbed by the climber with the maximum points.", + "query": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What is the height of the mountain climbined by the climbing who had the most points?", + "SpiderSynQuestion": "What is the height of the mountain climbined by the climbing who had the most points?", + "query": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show the distinct names of mountains climbed by climbers from country \"West Germany\".", + "SpiderSynQuestion": "Show the different names of mountains climbed by mountaineers from country \"West Germany\".", + "query": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = \"West Germany\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the different names of mountains ascended by climbers from the country of West Germany?", + "SpiderSynQuestion": "What are the different names of mountains ascended by mountaineers from the country of West Germany?", + "query": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = \"West Germany\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show the times used by climbers to climb mountains in Country Uganda.", + "SpiderSynQuestion": "Show the times used by mountaineers to climb mountains in Country Uganda.", + "query": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = \"Uganda\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the times used by climbers who climbed mountains in the country of Uganda?", + "SpiderSynQuestion": "What are the times used by mountaineers who climbed mountains in the country of Uganda?", + "query": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = \"Uganda\"" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Please show the countries and the number of climbers from each country.", + "SpiderSynQuestion": "Please show the nations and the number of mountaineers from each nation.", + "query": "SELECT Country , COUNT(*) FROM climber GROUP BY Country" + }, + { + "db_id": "climbing", + "SpiderQuestion": "How many climbers are from each country?", + "SpiderSynQuestion": "What are the number of mountaineers from each nation?", + "query": "SELECT Country , COUNT(*) FROM climber GROUP BY Country" + }, + { + "db_id": "climbing", + "SpiderQuestion": "List the countries that have more than one mountain.", + "SpiderSynQuestion": "List the nations that have more than one mountain.", + "query": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Which countries have more than one mountain?", + "SpiderSynQuestion": "Which nations have more than one mountain?", + "query": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "List the names of mountains that do not have any climber.", + "SpiderSynQuestion": "List the names of mountains that do not have any climber.", + "query": "SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the names of countains that no climber has climbed?", + "SpiderSynQuestion": "What are the names of countains that no climber has climbed?", + "query": "SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.", + "SpiderSynQuestion": "Show the nations that have mountains with height more than 5600 stories and mountains with height less than 5200.", + "query": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the countries that have both mountains that are higher than 5600 and lower than 5200?", + "SpiderSynQuestion": "What are the nations that have both mountains that are higher than 5600 and lower than 5200?", + "query": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show the range that has the most number of mountains.", + "SpiderSynQuestion": "Show the range that has the most number of mountains.", + "query": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Which range contains the most mountains?", + "SpiderSynQuestion": "Which range contains the most mountains?", + "query": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "climbing", + "SpiderQuestion": "Show the names of mountains with height more than 5000 or prominence more than 1000.", + "SpiderSynQuestion": "Show the names of mountains with height more than 5000 or prominence more than 1000.", + "query": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000" + }, + { + "db_id": "climbing", + "SpiderQuestion": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?", + "SpiderSynQuestion": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?", + "query": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "How many body builders are there?", + "SpiderSynQuestion": "How many bodybuilders are there?", + "query": "SELECT count(*) FROM body_builder" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "List the total scores of body builders in ascending order.", + "SpiderSynQuestion": "List the gross scores of bodybuilders in ascending order.", + "query": "SELECT Total FROM body_builder ORDER BY Total ASC" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "List the snatch score and clean jerk score of body builders in ascending order of snatch score.", + "SpiderSynQuestion": "List the snatch score and clean jerk score of bodybuilders in ascending order of snatch score.", + "query": "SELECT Snatch , Clean_Jerk FROM body_builder ORDER BY Snatch ASC" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What is the average snatch score of body builders?", + "SpiderSynQuestion": "What is the average snatch score of bodybuilders?", + "query": "SELECT avg(Snatch) FROM body_builder" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the clean and jerk score of the body builder with the highest total score?", + "SpiderSynQuestion": "What are the clean and jerk score of the bodybuilder with the highest total score?", + "query": "SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the birthdays of people in ascending order of height?", + "SpiderSynQuestion": "What are the date of birth of people in ascending order of height?", + "query": "SELECT Birth_Date FROM People ORDER BY Height ASC" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the names of body builders?", + "SpiderSynQuestion": "What are the names of bodybuilders?", + "query": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the names of body builders whose total score is higher than 300?", + "SpiderSynQuestion": "What are the names of bodybuilders whose total score is higher than 300?", + "query": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What is the name of the body builder with the greatest body weight?", + "SpiderSynQuestion": "What is the name of the bodybuilder with the greatest body weight?", + "query": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the birth date and birth place of the body builder with the highest total points?", + "SpiderSynQuestion": "What are the birthday and birthplace of the body builder with the highest total points?", + "query": "SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the heights of body builders with total score smaller than 315?", + "SpiderSynQuestion": "What are the heights of bodybuilders with total score smaller than 315?", + "query": "SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What is the average total score of body builders with height bigger than 200?", + "SpiderSynQuestion": "What is the average gross score of bodybuilders with height bigger than 200?", + "query": "SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the names of body builders in descending order of total scores?", + "SpiderSynQuestion": "What are the names of bodybuilders in descending order of total scores?", + "query": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "List each birth place along with the number of people from there.", + "SpiderSynQuestion": "List each birthplace along with the number of people from there.", + "query": "SELECT Birth_Place , COUNT(*) FROM people GROUP BY Birth_Place" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What is the most common birth place of people?", + "SpiderSynQuestion": "What is the most common birthplace of people?", + "query": "SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the birth places that are shared by at least two people?", + "SpiderSynQuestion": "What are the birthplaces that are shared by at least two people?", + "query": "SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "List the height and weight of people in descending order of height.", + "SpiderSynQuestion": "List the height and weight of people in descending order of height.", + "query": "SELECT Height , Weight FROM people ORDER BY Height DESC" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "Show all information about each body builder.", + "SpiderSynQuestion": "Show the details about each body builder.", + "query": "SELECT * FROM body_builder" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "List the names and origins of people who are not body builders.", + "SpiderSynQuestion": "List the names and origins of people who are not body builders.", + "query": "SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "How many distinct birth places are there?", + "SpiderSynQuestion": "How many different birthplaces are there?", + "query": "SELECT count(DISTINCT Birth_Place) FROM people" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "How many persons are not body builders?", + "SpiderSynQuestion": "what are the number of people are not body builders?", + "query": "SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.", + "SpiderSynQuestion": "List the weight of the bodybuilders who have snatch score higher than 140 or have the height greater than 200.", + "query": "SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200;" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What are the total scores of the body builders whose birthday contains the string \"January\" ?", + "SpiderSynQuestion": "What are the gross scores of the bodybuilders whose birthday contains the string \"January\" ?", + "query": "SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE \"%January%\";" + }, + { + "db_id": "body_builder", + "SpiderQuestion": "What is the minimum snatch score?", + "SpiderSynQuestion": "What is the minimum snatch score?", + "query": "SELECT min(snatch) FROM body_builder" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "How many elections are there?", + "SpiderSynQuestion": "How many elections are there?", + "query": "SELECT count(*) FROM election" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "List the votes of elections in descending order.", + "SpiderSynQuestion": "List the votes of elections in descending order.", + "query": "SELECT Votes FROM election ORDER BY Votes DESC" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "List the dates and vote percents of elections.", + "SpiderSynQuestion": "List the days and vote percents of elections.", + "query": "SELECT Date , Vote_Percent FROM election" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the minimum and maximum vote percents of elections?", + "SpiderSynQuestion": "What are the minimum and maximum vote percents of elections?", + "query": "SELECT min(Vote_Percent) , max(Vote_Percent) FROM election" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the names and parties of representatives?", + "SpiderSynQuestion": "What are the names and parties of representatives?", + "query": "SELECT Name , Party FROM representative" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the names of representatives whose party is not \"Republican\"?", + "SpiderSynQuestion": "What are the names of representatives whose party is not \"Republican\"?", + "query": "SELECT Name FROM Representative WHERE Party != \"Republican\"" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the life spans of representatives from New York state or Indiana state?", + "SpiderSynQuestion": "What are the lifetime of representatives from New York state or Indiana state?", + "query": "SELECT Lifespan FROM representative WHERE State = \"New York\" OR State = \"Indiana\"" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the names of representatives and the dates of elections they participated in.", + "SpiderSynQuestion": "What are the names of representatives and the days of elections they participated in.", + "query": "SELECT T2.Name , T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the names of representatives with more than 10000 votes in election?", + "SpiderSynQuestion": "What are the names of representatives with more than 10000 votes in election?", + "query": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the names of representatives in descending order of votes?", + "SpiderSynQuestion": "What are the names of representatives in descending order of votes?", + "query": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What is the party of the representative that has the smallest number of votes.", + "SpiderSynQuestion": "What is the party of the representative that has the smallest number of votes.", + "query": "SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC LIMIT 1" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the lifespans of representatives in descending order of vote percent?", + "SpiderSynQuestion": "What are the lifetime of representatives in descending order of vote percent?", + "query": "SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What is the average number of votes of representatives from party \"Republican\"?", + "SpiderSynQuestion": "What is the average number of votes of representatives from party \"Republican\"?", + "query": "SELECT avg(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = \"Republican\"" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What are the different parties of representative? Show the party name and the number of representatives in each party.", + "SpiderSynQuestion": "What are the different parties of representative? Show the party name and the number of representatives in each party.", + "query": "SELECT Party , COUNT(*) FROM representative GROUP BY Party" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What is the party that has the largest number of representatives?", + "SpiderSynQuestion": "What is the party that has the largest number of representatives?", + "query": "SELECT Party , COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What parties have at least three representatives?", + "SpiderSynQuestion": "What parties have at least three representatives?", + "query": "SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "What states have at least two representatives?", + "SpiderSynQuestion": "What states have at least two representatives?", + "query": "SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "List the names of representatives that have not participated in elections listed here.", + "SpiderSynQuestion": "List the names of representatives that have not participated in elections listed here.", + "query": "SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election)" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.", + "SpiderSynQuestion": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.", + "query": "SELECT Party FROM representative WHERE State = \"New York\" INTERSECT SELECT Party FROM representative WHERE State = \"Pennsylvania\"" + }, + { + "db_id": "election_representative", + "SpiderQuestion": "How many distinct parties are there for representatives?", + "SpiderSynQuestion": "How many different parties are there for representatives?", + "query": "SELECT count(DISTINCT Party) FROM representative" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "How many apartment bookings are there in total?", + "SpiderSynQuestion": "How many apartment bookings are there in total?", + "query": "SELECT count(*) FROM Apartment_Bookings" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Count the total number of apartment bookings.", + "SpiderSynQuestion": "Count the total number of apartment bookings.", + "query": "SELECT count(*) FROM Apartment_Bookings" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the start dates and end dates of all the apartment bookings.", + "SpiderSynQuestion": "Show the begin days and end days of all the apartment bookings.", + "query": "SELECT booking_start_date , booking_end_date FROM Apartment_Bookings" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the start date and end date of each apartment booking?", + "SpiderSynQuestion": "What are the begin day and end day of each apartment booking?", + "query": "SELECT booking_start_date , booking_end_date FROM Apartment_Bookings" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show all distinct building descriptions.", + "SpiderSynQuestion": "Show all different building descriptions.", + "query": "SELECT DISTINCT building_description FROM Apartment_Buildings" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Give me a list of all the distinct building descriptions.", + "SpiderSynQuestion": "Give me a list of all the different building descriptions.", + "query": "SELECT DISTINCT building_description FROM Apartment_Buildings" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the short names of the buildings managed by \"Emma\".", + "SpiderSynQuestion": "Show the names for short of the buildings managed by \"Emma\".", + "query": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager\t = \"Emma\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which buildings does \"Emma\" manage? Give me the short names of the buildings.", + "SpiderSynQuestion": "Which buildings does \"Emma\" manage? Give me the short names of the buildings.", + "query": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager\t = \"Emma\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the addresses and phones of all the buildings managed by \"Brenden\".", + "SpiderSynQuestion": "Show the addresses and telephones of all the buildings managed by \"Brenden\".", + "query": "SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the address and phone number of the buildings managed by \"Brenden\"?", + "SpiderSynQuestion": "What are the location and phone number of the buildings managed by \"Brenden\"?", + "query": "SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the building full names that contain the word \"court\"?", + "SpiderSynQuestion": "What are the building first and last names that contain the word \"court\"?", + "query": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE \"%court%\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Find all the building full names containing the word \"court\".", + "SpiderSynQuestion": "Find all the building first and last names containing the word \"court\".", + "query": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE \"%court%\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What is the minimum and maximum number of bathrooms of all the apartments?", + "SpiderSynQuestion": "What is the minimum and maximum number of washrooms of all the apartments?", + "query": "SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Give me the minimum and maximum bathroom count among all the apartments.", + "SpiderSynQuestion": "Give me the minimum and maximum washroom count among all the apartments.", + "query": "SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What is the average number of bedrooms of all apartments?", + "SpiderSynQuestion": "What is the average number of bedchambers of all apartments?", + "query": "SELECT avg(bedroom_count) FROM Apartments" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Find the average number of bedrooms of all the apartments.", + "SpiderSynQuestion": "Find the average number of bedchambers of all the apartments.", + "query": "SELECT avg(bedroom_count) FROM Apartments" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return the apartment number and the number of rooms for each apartment.", + "SpiderSynQuestion": "Return the apartment number and the number of rooms for each apartment.", + "query": "SELECT apt_number , room_count FROM Apartments" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the apartment number and the room count of each apartment?", + "SpiderSynQuestion": "What are the apartment number and the room count of each apartment?", + "query": "SELECT apt_number , room_count FROM Apartments" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What is the average number of rooms of apartments with type code \"Studio\"?", + "SpiderSynQuestion": "What is the average number of rooms of apartments with type code \"Studio\"?", + "query": "SELECT avg(room_count) FROM Apartments WHERE apt_type_code = \"Studio\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Find the average room count of the apartments that have the \"Studio\" type code.", + "SpiderSynQuestion": "Find the average room count of the apartments that have the \"Studio\" type code.", + "query": "SELECT avg(room_count) FROM Apartments WHERE apt_type_code = \"Studio\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return the apartment numbers of the apartments with type code \"Flat\".", + "SpiderSynQuestion": "Return the apartment numbers of the apartments with type code \"Flat\".", + "query": "SELECT apt_number FROM Apartments WHERE apt_type_code = \"Flat\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which apartments have type code \"Flat\"? Give me their apartment numbers.", + "SpiderSynQuestion": "Which apartments have type code \"Flat\"? Give me their apartment numbers.", + "query": "SELECT apt_number FROM Apartments WHERE apt_type_code = \"Flat\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return the first names and last names of all guests", + "SpiderSynQuestion": "Return the full names of all guests", + "query": "SELECT guest_first_name , guest_last_name FROM Guests" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the first names and last names of all the guests?", + "SpiderSynQuestion": "What are the forename and surname of all the guests?", + "query": "SELECT guest_first_name , guest_last_name FROM Guests" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return the date of birth for all the guests with gender code \"Male\".", + "SpiderSynQuestion": "Return the birthday for all the guests with gender code \"Male\".", + "query": "SELECT date_of_birth FROM Guests WHERE gender_code = \"Male\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are dates of birth of all the guests whose gender is \"Male\"?", + "SpiderSynQuestion": "What are day of birth of all the guests whose gender is \"Male\"?", + "query": "SELECT date_of_birth FROM Guests WHERE gender_code = \"Male\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.", + "SpiderSynQuestion": "Show the apartment numbers, begin days, and end days of all the apartment bookings.", + "query": "SELECT T2.apt_number , T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the apartment number, start date, and end date of each apartment booking?", + "SpiderSynQuestion": "What are the apartment number, begin day, and end day of each apartment booking?", + "query": "SELECT T2.apt_number , T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the booking start and end dates of the apartments with type code \"Duplex\"?", + "SpiderSynQuestion": "What are the booking begin and end days of the apartments with type code \"Duplex\"?", + "query": "SELECT T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = \"Duplex\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return the booking start date and end date for the apartments that have type code \"Duplex\".", + "SpiderSynQuestion": "Return the booking begin day and end day for the apartments that have type code \"Duplex\".", + "query": "SELECT T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = \"Duplex\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the booking start and end dates of the apartments with more than 2 bedrooms?", + "SpiderSynQuestion": "What are the booking begin and end days of the apartments with more than 2 bedrooms?", + "query": "SELECT T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Find the booking start date and end date for the apartments that have more than two bedrooms.", + "SpiderSynQuestion": "Find the booking begin day and end day for the apartments that have more than two bedrooms.", + "query": "SELECT T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What is the booking status code of the apartment with apartment number \"Suite 634\"?", + "SpiderSynQuestion": "What is the booking status code of the apartment with apartment number \"Suite 634\"?", + "query": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = \"Suite 634\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Tell me the booking status code for the apartment with number \"Suite 634\".", + "SpiderSynQuestion": "Tell me the booking status code for the apartment with number \"Suite 634\".", + "query": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = \"Suite 634\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the distinct apartment numbers of the apartments that have bookings with status code \"Confirmed\".", + "SpiderSynQuestion": "Show the different apartment numbers of the apartments that have bookings with status code \"Confirmed\".", + "query": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which apartments have bookings with status code \"Confirmed\"? Return their apartment numbers.", + "SpiderSynQuestion": "Which apartments have bookings with status code \"Confirmed\"? Return their apartment numbers.", + "query": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the average room count of the apartments that have booking status code \"Provisional\".", + "SpiderSynQuestion": "Show the average room amount of the apartments that have booking status code \"Provisional\".", + "query": "SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What is the average room count of the apartments whose booking status code is \"Provisional\"?", + "SpiderSynQuestion": "What is the average room amount of the apartments whose booking status code is \"Provisional\"?", + "query": "SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the guest first names, start dates, and end dates of all the apartment bookings.", + "SpiderSynQuestion": "Show the guest forename, begin days, and end days of all the apartment bookings.", + "query": "SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the guest first name, start date, and end date of each apartment booking?", + "SpiderSynQuestion": "What are the guest forename, start date, and end date of each apartment booking?", + "query": "SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the start dates and end dates of all the apartment bookings made by guests with gender code \"Female\".", + "SpiderSynQuestion": "Show the begin days and end days of all the apartment bookings made by guests with gender code \"Female\".", + "query": "SELECT T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = \"Female\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the start date and end date of the apartment bookings made by female guests (gender code \"Female\")?", + "SpiderSynQuestion": "What are the begin day and end day of the apartment bookings made by female guests (gender code \"Female\")?", + "query": "SELECT T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = \"Female\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the first names and last names of all the guests that have apartment bookings with status code \"Confirmed\".", + "SpiderSynQuestion": "Show the forenames and family names of all the guests that have apartment bookings with status code \"Confirmed\".", + "query": "SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = \"Confirmed\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which guests have apartment bookings with status code \"Confirmed\"? Return their first names and last names.", + "SpiderSynQuestion": "Which guests have apartment bookings with status code \"Confirmed\"? Return their forename and surname.", + "query": "SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = \"Confirmed\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the facility codes of apartments with more than 4 bedrooms.", + "SpiderSynQuestion": "Show the facility codes of apartments with more than 4 bedrooms.", + "query": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the facility codes of the apartments with more than four bedrooms?", + "SpiderSynQuestion": "What are the facility codes of the apartments with more than four bedrooms?", + "query": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the total number of rooms of all apartments with facility code \"Gym\".", + "SpiderSynQuestion": "Show the total number of rooms of all apartments with facility code \"Gym\".", + "query": "SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = \"Gym\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Find the total number of rooms in the apartments that have facility code \"Gym\".", + "SpiderSynQuestion": "Find the gross number of rooms in the apartments that have facility code \"Gym\".", + "query": "SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = \"Gym\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the total number of rooms of the apartments in the building with short name \"Columbus Square\".", + "SpiderSynQuestion": "Show all the number of rooms of the apartments in the building with short name \"Columbus Square\".", + "query": "SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = \"Columbus Square\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"?", + "SpiderSynQuestion": "How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"?", + "query": "SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = \"Columbus Square\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the addresses of the buildings that have apartments with more than 2 bathrooms.", + "SpiderSynQuestion": "Show the locations of the buildings that have apartments with more than 2 bathrooms.", + "query": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.", + "SpiderSynQuestion": "Which buildings have apartments that have more than two washrooms? Give me the locations of the buildings.", + "query": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the apartment type codes and apartment numbers in the buildings managed by \"Kyle\".", + "SpiderSynQuestion": "Show the apartment category codes and apartment numbers in the buildings managed by \"Kyle\".", + "query": "SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = \"Kyle\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What apartment type codes and apartment numbers do the buildings managed by \"Kyle\" have?", + "SpiderSynQuestion": "What apartment category codes and apartment numbers do the buildings managed by \"Kyle\" have?", + "query": "SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = \"Kyle\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the booking status code and the corresponding number of bookings.", + "SpiderSynQuestion": "Show the booking status code and the corresponding number of bookings.", + "query": "SELECT \tbooking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.", + "SpiderSynQuestion": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.", + "query": "SELECT \tbooking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return all the apartment numbers sorted by the room count in ascending order.", + "SpiderSynQuestion": "Return all the apartment numbers sorted by the room count in ascending order.", + "query": "SELECT apt_number FROM Apartments ORDER BY room_count ASC" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Sort the apartment numbers in ascending order of room count.", + "SpiderSynQuestion": "Sort the apartment numbers in ascending order of room count.", + "query": "SELECT apt_number FROM Apartments ORDER BY room_count ASC" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return the apartment number with the largest number of bedrooms.", + "SpiderSynQuestion": "Return the apartment number with the largest number of bedrooms.", + "query": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What is the apartment number of the apartment with the most beds?", + "SpiderSynQuestion": "What is the apartment number of the apartment with the most beds?", + "query": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.", + "SpiderSynQuestion": "Show the apartment category codes and the corresponding number of apartments sorted by the number of apartments in ascending order.", + "query": "SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.", + "SpiderSynQuestion": "Return each apartment category code with the number of apartments having that apartment category, in ascending order of the number of apartments.", + "query": "SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the top 3 apartment type codes sorted by the average number of rooms in descending order.", + "SpiderSynQuestion": "Show the top 3 apartment category codes sorted by the average number of rooms in descending order.", + "query": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "What are the top three apartment types in terms of the average room count? Give me the", + "SpiderSynQuestion": "What are the top three apartment categories in terms of the average room count? Give me the", + "query": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.", + "SpiderSynQuestion": "Show the apartment category code that has the largest number of total rooms, together with the number of bathrooms and number of bedchambers.", + "query": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", + "SpiderSynQuestion": "Which apartment category has the largest number of total rooms? Return the apartment category code, its number of washrooms and number of bedrooms.", + "query": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the most common apartment type code.", + "SpiderSynQuestion": "Show the most common apartment category code.", + "query": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which apartment type code appears the most often?", + "SpiderSynQuestion": "Which apartment category code appears the most often?", + "query": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the most common apartment type code among apartments with more than 1 bathroom.", + "SpiderSynQuestion": "Show the most common apartment category code among apartments with more than 1 bathroom.", + "query": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which apartment type code is the most common among apartments with more than one bathroom?", + "SpiderSynQuestion": "Which apartment category code is the most common among apartments with more than one bathroom?", + "query": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", + "SpiderSynQuestion": "Show each apartment category code, and the maximum and minimum number of rooms for each category.", + "query": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Return each apartment type code along with the maximum and minimum number of rooms among each type.", + "SpiderSynQuestion": "Return each apartment category code along with the maximum and minimum number of rooms among each category.", + "query": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show each gender code and the corresponding count of guests sorted by the count in descending order.", + "SpiderSynQuestion": "Show each sex code and the corresponding count of guests sorted by the count in descending order.", + "query": "SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.", + "SpiderSynQuestion": "Sort the sex codes in descending order of their corresponding number of guests. Return both the sex codes and counts.", + "query": "SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "How many apartments do not have any facility?", + "SpiderSynQuestion": "show the number of apartments do not have any facility?", + "query": "SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Find the number of apartments that have no facility.", + "SpiderSynQuestion": "Find the number of apartments that have no facility.", + "query": "SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the apartment numbers of apartments with bookings that have status code both \"Provisional\" and \"Confirmed\"", + "SpiderSynQuestion": "Show the apartment numbers of apartments with bookings that have status code both \"Provisional\" and \"Confirmed\"", + "query": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which apartments have bookings with both status codes \"Provisional\" and \"Confirmed\"? Give me the apartment numbers.", + "SpiderSynQuestion": "Which apartments have bookings with both status codes \"Provisional\" and \"Confirmed\"? Give me the apartment numbers.", + "query": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.", + "SpiderSynQuestion": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.", + "query": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1" + }, + { + "db_id": "apartment_rentals", + "SpiderQuestion": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.", + "SpiderSynQuestion": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.", + "query": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "How many games are held after season 2007?", + "SpiderSynQuestion": "What are the number of the games are held after season 2007?", + "query": "SELECT count(*) FROM game WHERE season > 2007" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "List the dates of games by the home team name in descending order.", + "SpiderSynQuestion": "List the day of games by the home team name in descending order.", + "query": "SELECT Date FROM game ORDER BY home_team DESC" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "List the season, home team, away team of all the games.", + "SpiderSynQuestion": "List the season, home team, away team of all the games.", + "query": "SELECT season , home_team , away_team FROM game" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "What are the maximum, minimum and average home games each stadium held?", + "SpiderSynQuestion": "What are the maximum, minimum and average home games each stadium held?", + "query": "SELECT max(home_games) , min(home_games) , avg(home_games) FROM stadium" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "What is the average attendance of stadiums with capacity percentage higher than 100%?", + "SpiderSynQuestion": "What is the average number of attendees of stadiums with capacity percentage higher than 100%?", + "query": "SELECT average_attendance FROM stadium WHERE capacity_percentage > 100" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?", + "SpiderSynQuestion": "What are the participant name, number of matches, and information source for participants who do not suffer from injury of 'Knee problem'?", + "query": "SELECT player , number_of_matches , SOURCE FROM injury_accident WHERE injury != 'Knee problem'" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "What is the season of the game which causes the player 'Walter Samuel' to get injured?", + "SpiderSynQuestion": "What is the season of the game which causes the player 'Walter Samuel' to get injured?", + "query": "SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "What are the ids, scores, and dates of the games which caused at least two injury accidents?", + "SpiderSynQuestion": "What are the ids, scores, and day of the games which caused at least two injury accidents?", + "query": "SELECT T1.id , T1.score , T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING count(*) >= 2" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "What are the id and name of the stadium where the most injury accidents happened?", + "SpiderSynQuestion": "What are the id and name of the stadium where the most injury accidents happened?", + "query": "SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "Find the id and name of the stadium where the largest number of injury accidents occurred.", + "SpiderSynQuestion": "Find the id and name of the stadium where the largest number of injury accidents occurred.", + "query": "SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?", + "SpiderSynQuestion": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?", + "query": "SELECT T1.season , T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem'" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "How many different kinds of information sources are there for injury accidents?", + "SpiderSynQuestion": "How many different kinds of information sources are there for injury accidents?", + "query": "SELECT count(DISTINCT SOURCE) FROM injury_accident" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "How many games are free of injury accidents?", + "SpiderSynQuestion": "How many games are free of injury accidents?", + "query": "SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "How many distinct kinds of injuries happened after season 2010?", + "SpiderSynQuestion": "How many different kinds of injuries happened after season 2010?", + "query": "SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.", + "SpiderSynQuestion": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.", + "query": "SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Thiago Motta'" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "Show the name, average attendance, total attendance for stadiums where no accidents happened.", + "SpiderSynQuestion": "Show the name, average number of attendees, total number of attendees for stadiums where no accidents happened.", + "query": "SELECT name , average_attendance , total_attendance FROM stadium EXCEPT SELECT T2.name , T2.average_attendance , T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "Which stadium name contains the substring \"Bank\"?", + "SpiderSynQuestion": "Which stadium name contains the substring \"Bank\"?", + "query": "SELECT name FROM stadium WHERE name LIKE \"%Bank%\"" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "How many games has each stadium held?", + "SpiderSynQuestion": "How many games has each stadium held?", + "query": "SELECT T1.id , count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id" + }, + { + "db_id": "game_injury", + "SpiderQuestion": "For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season.", + "SpiderSynQuestion": "For each injury accident, find the day of the game and the name of the injured gamer in the game, and sort the results in descending order of game season.", + "query": "SELECT T1.date , T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id ORDER BY T1.season DESC" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "List all country and league names.", + "SpiderSynQuestion": "List all nation and league names.", + "query": "SELECT T1.name , T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "How many leagues are there in England?", + "SpiderSynQuestion": "How many leagues are there in England?", + "query": "SELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = \"England\"" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "What is the average weight of all players?", + "SpiderSynQuestion": "What is the average weight of all participants?", + "query": "SELECT avg(weight) FROM Player" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "What is the maximum and minimum height of all players?", + "SpiderSynQuestion": "What is the maximum and minimum stature of all participants?", + "query": "SELECT max(weight) , min(weight) FROM Player" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "List all player names who have an overall rating higher than the average.", + "SpiderSynQuestion": "List all participant names who have an overall rating higher than the average.", + "query": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > ( SELECT avg(overall_rating) FROM Player_Attributes )" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "What are the names of players who have the best dribbling?", + "SpiderSynQuestion": "What are the names of participants who have the best dribbling?", + "query": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = ( SELECT max(overall_rating) FROM Player_Attributes)" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "List the names of all players who have a crossing score higher than 90 and prefer their right foot.", + "SpiderSynQuestion": "List the names of all participants who have a crossing score higher than 90 and prefer their right foot.", + "query": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = \"right\"" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "List the names of all left-footed players who have overall rating between 85 and 90.", + "SpiderSynQuestion": "List the names of all left-footed participants who have overall rating between 85 and 90.", + "query": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = \"left\" AND T2.overall_rating >= 85 AND T2.overall_rating <= 90" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "What is the average rating for right-footed players and left-footed players?", + "SpiderSynQuestion": "What is the average score for right-footed players and left-footed players?", + "query": "SELECT preferred_foot , avg(overall_rating) FROM Player_Attributes GROUP BY preferred_foot" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?", + "SpiderSynQuestion": "Of all players with an overall score greater than 80, how many are right-footed and left-footed?", + "query": "SELECT preferred_foot , count(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85.", + "SpiderSynQuestion": "List all of the participant ids with a height of at least 180cm and an overall rating higher than 85.", + "query": "SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "List all of the ids for left-footed players with a height between 180cm and 190cm.", + "SpiderSynQuestion": "List all of the ids for left-footed participants with a height between 180cm and 190cm.", + "query": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = \"left\"" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "Who are the top 3 players in terms of overall rating?", + "SpiderSynQuestion": "Who are the top 3 participants in terms of overall score?", + "query": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3" + }, + { + "db_id": "soccer_1", + "SpiderQuestion": "List the names and birthdays of the top five players in terms of potential.", + "SpiderSynQuestion": "List the names and birth dates of the top five players in terms of potential.", + "query": "SELECT DISTINCT T1.player_name , T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "How many performances are there?", + "SpiderSynQuestion": "How many performances are there?", + "query": "SELECT count(*) FROM performance" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "List the hosts of performances in ascending order of attendance.", + "SpiderSynQuestion": "List the hosts of performances in ascending order of attendance.", + "query": "SELECT HOST FROM performance ORDER BY Attendance ASC" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "What are the dates and locations of performances?", + "SpiderSynQuestion": "What are the days and locations of performances?", + "query": "SELECT Date , LOCATION FROM performance" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\"", + "SpiderSynQuestion": "Show the attendees of the performances at location \"TD Garden\" or \"Bell Centre\"", + "query": "SELECT Attendance FROM performance WHERE LOCATION = \"TD Garden\" OR LOCATION = \"Bell Centre\"" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "What is the average number of attendees for performances?", + "SpiderSynQuestion": "What is the average number of attendees for performances?", + "query": "SELECT avg(Attendance) FROM performance" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "What is the date of the performance with the highest number of attendees?", + "SpiderSynQuestion": "What is the day of the performance with the highest number of attendees?", + "query": "SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show different locations and the number of performances at each location.", + "SpiderSynQuestion": "Show different locations and the number of performances at each location.", + "query": "SELECT LOCATION , COUNT(*) FROM performance GROUP BY LOCATION" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the most common location of performances.", + "SpiderSynQuestion": "Show the most common location of performances.", + "query": "SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the locations that have at least two performances.", + "SpiderSynQuestion": "Show the locations that have at least two performances.", + "query": "SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.", + "SpiderSynQuestion": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.", + "query": "SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the names of members and the location of the performances they attended.", + "SpiderSynQuestion": "Show the names of members and the location of the performances they attended.", + "query": "SELECT T2.Name , T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.", + "SpiderSynQuestion": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.", + "query": "SELECT T2.Name , T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name ASC" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the dates of performances with attending members whose roles are \"Violin\".", + "SpiderSynQuestion": "Show the day of performances with attending members whose roles are \"Violin\".", + "query": "SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = \"Violin\"" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances.", + "SpiderSynQuestion": "Show the names of members and the day of performances they attended in descending order of attendance of the performances.", + "query": "SELECT T2.Name , T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Attendance DESC" + }, + { + "db_id": "performance_attendance", + "SpiderQuestion": "List the names of members who did not attend any performance.", + "SpiderSynQuestion": "List the names of members who did not attend any performance.", + "query": "SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM member_attendance)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the buildings which have rooms with capacity more than 50.", + "SpiderSynQuestion": "Find the buildings which have rooms with the number of seat more than 50.", + "query": "SELECT DISTINCT building FROM classroom WHERE capacity > 50" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the distinct buildings with capacities of greater than 50?", + "SpiderSynQuestion": "What are the different buildings with the number of seats of greater than 50?", + "query": "SELECT DISTINCT building FROM classroom WHERE capacity > 50" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of rooms that are not in the Lamberton building.", + "SpiderSynQuestion": "Count the number of rooms that are not in the Lamberton building.", + "query": "SELECT count(*) FROM classroom WHERE building != 'Lamberton'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many classrooms are not in Lamberton?", + "SpiderSynQuestion": "How many schoolrooms are not in Lamberton?", + "query": "SELECT count(*) FROM classroom WHERE building != 'Lamberton'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the name and building of the departments whose budget is more than the average budget?", + "SpiderSynQuestion": "What is the name and building of the departments whose budget is more than the average budget?", + "query": "SELECT dept_name , building FROM department WHERE budget > (SELECT avg(budget) FROM department)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the name and building of the departments with greater than average budget.", + "SpiderSynQuestion": "Give the name and building of the departments with greater than average budget.", + "query": "SELECT dept_name , building FROM department WHERE budget > (SELECT avg(budget) FROM department)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.", + "SpiderSynQuestion": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.", + "query": "SELECT building , room_number FROM classroom WHERE capacity BETWEEN 50 AND 100" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?", + "SpiderSynQuestion": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?", + "query": "SELECT building , room_number FROM classroom WHERE capacity BETWEEN 50 AND 100" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name and building of the department with the highest budget.", + "SpiderSynQuestion": "Find the name and building of the department with the highest budget.", + "query": "SELECT dept_name , building FROM department ORDER BY budget DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the department name and corresponding building for the department with the greatest budget?", + "SpiderSynQuestion": "What is the department name and corresponding building for the department with the greatest budget?", + "query": "SELECT dept_name , building FROM department ORDER BY budget DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the name of the student who has the highest total credits in the History department.", + "SpiderSynQuestion": "What is the name of the student who has the highest total credits in the History department.", + "query": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the name of the student in the History department with the most credits.", + "SpiderSynQuestion": "Give the name of the student in the History department with the most credits.", + "query": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many rooms does the Lamberton building have?", + "SpiderSynQuestion": "How many rooms does the Lamberton building have?", + "query": "SELECT count(*) FROM classroom WHERE building = 'Lamberton'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of classrooms in Lamberton.", + "SpiderSynQuestion": "Count the number of schoolrooms in Lamberton.", + "query": "SELECT count(*) FROM classroom WHERE building = 'Lamberton'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many students have advisors?", + "SpiderSynQuestion": "How many students have advisers?", + "query": "SELECT count(DISTINCT s_id) FROM advisor" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of students who have advisors.", + "SpiderSynQuestion": "Count the number of students who have advisers.", + "query": "SELECT count(DISTINCT s_id) FROM advisor" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many departments offer courses?", + "SpiderSynQuestion": "How many departments offer curriculum?", + "query": "SELECT count(DISTINCT dept_name) FROM course" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of departments which offer courses.", + "SpiderSynQuestion": "Count the number of departments which offer curriculum.", + "query": "SELECT count(DISTINCT dept_name) FROM course" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many different courses offered by Physics department?", + "SpiderSynQuestion": "How many different curriculum offered by Physics department?", + "query": "SELECT count(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of courses in the Physics department.", + "SpiderSynQuestion": "Count the number of curriculum in the Physics department.", + "query": "SELECT count(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the title of courses that have two prerequisites?", + "SpiderSynQuestion": "Find the title of curriculum that have two prerequisites?", + "query": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) = 2" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the titles for courses with two prerequisites?", + "SpiderSynQuestion": "What are the titles for curriculum with two prerequisites?", + "query": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) = 2" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the title, credit, and department name of courses that have more than one prerequisites?", + "SpiderSynQuestion": "Find the title, credit, and department name of curriculum that have more than one prerequisites?", + "query": "SELECT T1.title , T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the title, credit value, and department name for courses with more than one prerequisite?", + "SpiderSynQuestion": "What is the title, credit value, and department name for curriculum with more than one prerequisite?", + "query": "SELECT T1.title , T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many courses that do not have prerequisite?", + "SpiderSynQuestion": "How many curriculum that do not have prerequisite?", + "query": "SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of courses without prerequisites.", + "SpiderSynQuestion": "Count the number of curriculum without prerequisites.", + "query": "SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of the courses that do not have any prerequisite?", + "SpiderSynQuestion": "Find the name of the curriculum that do not have any prerequisite?", + "query": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the titles of courses without prerequisites?", + "SpiderSynQuestion": "What are the titles of curriculum without prerequisites?", + "query": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many different instructors have taught some course?", + "SpiderSynQuestion": "How many different teachers have taught some course?", + "query": "SELECT COUNT (DISTINCT id) FROM teaches" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of distinct instructors who have taught a course.", + "SpiderSynQuestion": "Count the number of different teachers who have taught a course.", + "query": "SELECT COUNT (DISTINCT id) FROM teaches" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the total budgets of the Marketing or Finance department.", + "SpiderSynQuestion": "Find the total budgets of the Marketing or Finance department.", + "query": "SELECT sum(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the sum of budgets of the Marketing and Finance departments?", + "SpiderSynQuestion": "What is the sum of budgets of the Marketing and Finance departments?", + "query": "SELECT sum(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the department name of the instructor whose name contains 'Soisalon'.", + "SpiderSynQuestion": "Find the department name of the teacher whose name contains 'Soisalon'.", + "query": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the name of the department with an instructure who has a name like 'Soisalon'?", + "SpiderSynQuestion": "What is the name of the department with a teacher who has a name like 'Soisalon'?", + "query": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many rooms whose capacity is less than 50 does the Lamberton building have?", + "SpiderSynQuestion": "How many rooms whose seat is less than 50 does the Lamberton building have?", + "query": "SELECT count(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Count the number of rooms in Lamberton with capacity lower than 50.", + "SpiderSynQuestion": "Count the number of rooms in Lamberton with the number of seats lower than 50.", + "query": "SELECT count(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name and budget of departments whose budgets are more than the average budget.", + "SpiderSynQuestion": "Find the name and budget of departments whose budgets are more than the average budget.", + "query": "SELECT dept_name , budget FROM department WHERE budget > (SELECT avg(budget) FROM department)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names and budgets of departments with budgets greater than the average?", + "SpiderSynQuestion": "What are the names and budgets of departments with budgets greater than the average?", + "query": "SELECT dept_name , budget FROM department WHERE budget > (SELECT avg(budget) FROM department)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "what is the name of the instructor who is in Statistics department and earns the lowest salary?", + "SpiderSynQuestion": "what is the name of the teacher who is in Statistics department and earns the lowest salary?", + "query": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the name of the lowest earning instructor in the Statistics department.", + "SpiderSynQuestion": "Give the name of the lowest earning teacher in the Statistics department.", + "query": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the title of course that is provided by both Statistics and Psychology departments.", + "SpiderSynQuestion": "Find the title of curriculum that is provided by both Statistics and Psychology departments.", + "query": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the title of a course that is listed in both the Statistics and Psychology departments?", + "SpiderSynQuestion": "What is the title of curriculum that is listed in both the Statistics and Psychology departments?", + "query": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the title of course that is provided by Statistics but not Psychology departments.", + "SpiderSynQuestion": "Find the title of curriculum that is provided by Statistics but not Psychology departments.", + "query": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the titles of courses that are in the Statistics department but not the Psychology department?", + "SpiderSynQuestion": "What are the titles of curriculum that are in the Statistics department but not the Psychology department?", + "query": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.", + "SpiderSynQuestion": "Find the id of teachers who taught a class in Fall 2009 but not in Spring 2010.", + "query": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?", + "SpiderSynQuestion": "What are the ids of teachers who taught in the Fall of 2009 but not in the Spring of 2010?", + "query": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of students who took any class in the years of 2009 and 2010.", + "SpiderSynQuestion": "Find the name of students who took any class in the years of 2009 and 2010.", + "query": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of the students who took classes in 2009 or 2010?", + "SpiderSynQuestion": "What are the names of the students who took classes in 2009 or 2010?", + "query": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of the top 3 departments that provide the largest amount of courses?", + "SpiderSynQuestion": "Find the names of the top 3 departments that provide the largest amount of curriculum?", + "query": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of the 3 departments with the most courses?", + "SpiderSynQuestion": "What are the names of the 3 departments with the most curriculum?", + "query": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of the department that offers the highest total credits?", + "SpiderSynQuestion": "Find the name of the department that offers the highest total credits?", + "query": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the name of the department with the most credits?", + "SpiderSynQuestion": "What is the name of the department with the most credits?", + "query": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "List the names of all courses ordered by their titles and credits.", + "SpiderSynQuestion": "List the names of all curriculum ordered by their titles and credits.", + "query": "SELECT title FROM course ORDER BY title , credits" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Given the titles of all courses, in order of titles and credits.", + "SpiderSynQuestion": "Given the titles of all curriculum, in order of titles and credits.", + "query": "SELECT title FROM course ORDER BY title , credits" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Which department has the lowest budget?", + "SpiderSynQuestion": "Which department has the lowest budget?", + "query": "SELECT dept_name FROM department ORDER BY budget LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the name of the department with the lowest budget.", + "SpiderSynQuestion": "Give the name of the department with the lowest budget.", + "query": "SELECT dept_name FROM department ORDER BY budget LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "List the names and buildings of all departments sorted by the budget from large to small.", + "SpiderSynQuestion": "List the names and buildings of all departments sorted by the budget from large to small.", + "query": "SELECT dept_name , building FROM department ORDER BY budget DESC" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names and buildings of the deparments, sorted by budget descending?", + "SpiderSynQuestion": "What are the names and buildings of the deparments, sorted by budget descending?", + "query": "SELECT dept_name , building FROM department ORDER BY budget DESC" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Who is the instructor with the highest salary?", + "SpiderSynQuestion": "Who is the teacher with the highest salary?", + "query": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the name of the highest paid instructor.", + "SpiderSynQuestion": "Give the name of the highest paid teacher.", + "query": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "List the information of all instructors ordered by their salary in ascending order.", + "SpiderSynQuestion": "List the detail of all teachers ordered by their salary in ascending order.", + "query": "SELECT * FROM instructor ORDER BY salary" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give all information regarding instructors, in order of salary from least to greatest.", + "SpiderSynQuestion": "Give all detail regarding teachers, in order of salary from least to greatest.", + "query": "SELECT * FROM instructor ORDER BY salary" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of the students and their department names sorted by their total credits in ascending order.", + "SpiderSynQuestion": "Find the name of the students and their department names sorted by their total credits in ascending order.", + "query": "SELECT name , dept_name FROM student ORDER BY tot_cred" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of students and their respective departments, ordered by number of credits from least to greatest?", + "SpiderSynQuestion": "What are the names of students and their respective departments, ordered by number of credits from least to greatest?", + "query": "SELECT name , dept_name FROM student ORDER BY tot_cred" + }, + { + "db_id": "college_2", + "SpiderQuestion": "list in alphabetic order all course names and their instructors' names in year 2008.", + "SpiderSynQuestion": "list in alphabetic order all curriculum names and their instructors' names in year 2008.", + "query": "SELECT T1.title , T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.", + "SpiderSynQuestion": "Show all titles and their instructors' names for curriculum in 2008, in alphabetical order by title.", + "query": "SELECT T1.title , T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of instructors who are advising more than one student.", + "SpiderSynQuestion": "Find the name of teachers who are advising more than one student.", + "query": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of instructors who advise more than one student?", + "SpiderSynQuestion": "What are the names of teachers who advise more than one student?", + "query": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of the students who have more than one advisor?", + "SpiderSynQuestion": "Find the name of the students who have more than one advisor?", + "query": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of students who have more than one advisor?", + "SpiderSynQuestion": "What are the names of students who have more than one advisor?", + "query": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the number of rooms with more than 50 capacity for each building.", + "SpiderSynQuestion": "Find the number of rooms with more than 50 capacity for each building.", + "query": "SELECT count(*) , building FROM classroom WHERE capacity > 50 GROUP BY building" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many rooms in each building have a capacity of over 50?", + "SpiderSynQuestion": "How many rooms in each building have a capacity of over 50?", + "query": "SELECT count(*) , building FROM classroom WHERE capacity > 50 GROUP BY building" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the maximum and average capacity among rooms in each building.", + "SpiderSynQuestion": "Find the maximum and average number of seats among rooms in each building.", + "query": "SELECT max(capacity) , avg(capacity) , building FROM classroom GROUP BY building" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the greatest and average capacity for rooms in each building?", + "SpiderSynQuestion": "What are the greatest and average number of seats for rooms in each building?", + "query": "SELECT max(capacity) , avg(capacity) , building FROM classroom GROUP BY building" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the title of the course that is offered by more than one department.", + "SpiderSynQuestion": "Find the title of the curriculum that is offered by more than one department.", + "query": "SELECT title FROM course GROUP BY title HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the titles of courses that are offered in more than one department?", + "SpiderSynQuestion": "What are the titles of curriculum that are offered in more than one department?", + "query": "SELECT title FROM course GROUP BY title HAVING count(*) > 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the total credits of courses provided by different department.", + "SpiderSynQuestion": "Find the sum of credits of curriculum provided by different department.", + "query": "SELECT sum(credits) , dept_name FROM course GROUP BY dept_name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many total credits are offered by each department?", + "SpiderSynQuestion": "How many total credits are offered by each department?", + "query": "SELECT sum(credits) , dept_name FROM course GROUP BY dept_name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors.", + "SpiderSynQuestion": "Find the minimum wage for the departments whose average wage is above the average payment of all instructors.", + "query": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the lowest salary in departments with average salary greater than the overall average.", + "SpiderSynQuestion": "What is the lowest wage in departments with average wage greater than the overall average.", + "query": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the number of courses provided in each semester and year.", + "SpiderSynQuestion": "Find the number of courses provided in each academic session and year.", + "query": "SELECT count(*) , semester , YEAR FROM SECTION GROUP BY semester , YEAR" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many courses are provided in each semester and year?", + "SpiderSynQuestion": "How many courses are provided in each academic session and year?", + "query": "SELECT count(*) , semester , YEAR FROM SECTION GROUP BY semester , YEAR" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the year which offers the largest number of courses.", + "SpiderSynQuestion": "Find the year which offers the largest number of courses.", + "query": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Which year had the greatest number of courses?", + "SpiderSynQuestion": "Which year had the greatest number of curriculum?", + "query": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the year and semester when offers the largest number of courses.", + "SpiderSynQuestion": "Find the year and academic session when offers the largest number of courses.", + "query": "SELECT semester , YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the year and semester with the most courses?", + "SpiderSynQuestion": "What is the year and academic session with the most courses?", + "query": "SELECT semester , YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of department has the highest amount of students?", + "SpiderSynQuestion": "Find the name of department has the highest amount of students?", + "query": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the name of the deparment with the highest enrollment?", + "SpiderSynQuestion": "What is the name of the deparment with the highest enrollment?", + "query": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the total number of students in each department.", + "SpiderSynQuestion": "Find the total number of students in each department.", + "query": "SELECT count(*) , dept_name FROM student GROUP BY dept_name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many students are in each department?", + "SpiderSynQuestion": "How many students are in each department?", + "query": "SELECT count(*) , dept_name FROM student GROUP BY dept_name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the semester and year which has the least number of student taking any class.", + "SpiderSynQuestion": "Find the academic session and year which has the least number of student taking any class.", + "query": "SELECT semester , YEAR FROM takes GROUP BY semester , YEAR ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Which semeseter and year had the fewest students?", + "SpiderSynQuestion": "Which academic session and year had the fewest students?", + "query": "SELECT semester , YEAR FROM takes GROUP BY semester , YEAR ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the id of the instructor who advises of all students from History department?", + "SpiderSynQuestion": "What is the id of the teacher who advises of all students from History department?", + "query": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give id of the instructor who advises students in the History department.", + "SpiderSynQuestion": "Give id of the teacher who advises students in the History department.", + "query": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name and salary of the instructors who are advisors of any student from History department?", + "SpiderSynQuestion": "Find the name and wage of the instructors who are advisors of any student from History department?", + "query": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names and salaries of instructors who advises students in the History department?", + "SpiderSynQuestion": "What are the names and wages of teachers who advises students in the History department?", + "query": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the id of the courses that do not have any prerequisite?", + "SpiderSynQuestion": "Find the id of the curriculum that do not have any prerequisite?", + "query": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the ids of courses without prerequisites?", + "SpiderSynQuestion": "What are the ids of curriculum without prerequisites?", + "query": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of the courses that do not have any prerequisite?", + "SpiderSynQuestion": "Find the name of the curriculum that do not have any prerequisite?", + "query": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of courses without prerequisites?", + "SpiderSynQuestion": "What are the names of curriculum without prerequisites?", + "query": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the title of the prerequisite class of International Finance course?", + "SpiderSynQuestion": "What is the title of the prerequisite class of International Finance course?", + "query": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the title of the prerequisite to the course International Finance.", + "SpiderSynQuestion": "Give the title of the prerequisite to the course International Finance.", + "query": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the title of course whose prerequisite is course Differential Geometry.", + "SpiderSynQuestion": "Find the title of course whose prerequisite is course Differential Geometry.", + "query": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the title of the course with Differential Geometry as a prerequisite?", + "SpiderSynQuestion": "What is the title of the curriculum with Differential Geometry as a prerequisite?", + "query": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of students who have taken any course in the fall semester of year 2003.", + "SpiderSynQuestion": "Find the names of students who have taken any course in the fall academic session of year 2003.", + "query": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of students who took a course in the Fall of 2003?", + "SpiderSynQuestion": "What are the names of students who took a course in the Fall of 2003?", + "query": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?", + "SpiderSynQuestion": "What is the title of the curriculum that was offered at building Chandler during the fall academic session in the year of 2010?", + "query": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the title of the course offered in Chandler during the Fall of 2010.", + "SpiderSynQuestion": "Give the title of the curriculum offered in Chandler during the Fall of 2010.", + "query": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of the instructors who taught C Programming course before.", + "SpiderSynQuestion": "Find the name of the teachers who taught C Programming course before.", + "query": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of instructors who have taught C Programming courses?", + "SpiderSynQuestion": "What are the names of teachers who have taught C Programming courses?", + "query": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name and salary of instructors who are advisors of the students from the Math department.", + "SpiderSynQuestion": "Find the name and wage of instructors who are advisors of the students from the Math department.", + "query": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names and salaries of instructors who advise students in the Math department?", + "SpiderSynQuestion": "What are the names and wages of instructors who advise students in the Math department?", + "query": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.", + "SpiderSynQuestion": "Find the name of instructors who are advisers of the students from the Math department, and sort the results by students' total credit.", + "query": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of all instructors who advise students in the math depart sorted by total credits of the student.", + "SpiderSynQuestion": "What are the names of all teachers who advise students in the math depart sorted by total credits of the student.", + "query": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the course title of the prerequisite of course Mobile Computing?", + "SpiderSynQuestion": "What is the curriculum title of the prerequisite of curriculum Mobile Computing?", + "query": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the title of the course that is a prerequisite for Mobile Computing?", + "SpiderSynQuestion": "What is the title of the curriculum that is a prerequisite for Mobile Computing?", + "query": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of instructor who is the advisor of the student who has the highest number of total credits.", + "SpiderSynQuestion": "Find the name of teacher who is the advisor of the student who has the highest number of total credits.", + "query": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the name of the instructor who advises the student with the greatest number of total credits?", + "SpiderSynQuestion": "What is the name of the teacher who advises the student with the greatest number of total credits?", + "query": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of instructors who didn't teach any courses?", + "SpiderSynQuestion": "Find the name of teachers who didn't teach any courses?", + "query": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of instructors who didn't teach?", + "SpiderSynQuestion": "What are the names of teachers who didn't teach?", + "query": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the id of instructors who didn't teach any courses?", + "SpiderSynQuestion": "Find the id of teachers who didn't teach any courses?", + "query": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the ids of instructors who didnt' teach?", + "SpiderSynQuestion": "What are the ids of teachers who didnt' teach?", + "query": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of instructors who didn't each any courses in any Spring semester.", + "SpiderSynQuestion": "Find the names of teachers who didn't each any courses in any Spring semester.", + "query": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester = 'Spring')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of instructors who didn't teach courses in the Spring?", + "SpiderSynQuestion": "What are the names of teachers who didn't teach courses in the Spring?", + "query": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester = 'Spring')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of the department which has the highest average salary of professors.", + "SpiderSynQuestion": "Find the name of the department which has the highest average salary of professors.", + "query": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Which department has the highest average instructor salary?", + "SpiderSynQuestion": "Which department has the highest average instructor salary?", + "query": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the number and averaged salary of all instructors who are in the department with the highest budget.", + "SpiderSynQuestion": "Find the number and averaged wage of all teachers who are in the department with the highest budget.", + "query": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many instructors are in the department with the highest budget, and what is their average salary?", + "SpiderSynQuestion": "How many teachers are in the department with the highest budget, and what is their average wage?", + "query": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?", + "SpiderSynQuestion": "What is the title and credits of the course that is taught in the largest schoolroom (with the highest capacity)?", + "query": "SELECT T3.title , T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT max(capacity) FROM classroom)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Give the title and credits for the course that is taught in the classroom with the greatest capacity.", + "SpiderSynQuestion": "Give the title and credits for the course that is taught in the schoolroom with the greatest capacity.", + "query": "SELECT T3.title , T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT max(capacity) FROM classroom)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of students who didn't take any course from Biology department.", + "SpiderSynQuestion": "Find the name of students who didn't take any course from Biology department.", + "query": "SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of students who haven't taken any Biology courses?", + "SpiderSynQuestion": "What are the names of students who haven't taken any Biology courses?", + "query": "SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the total number of students and total number of instructors for each department.", + "SpiderSynQuestion": "Find the total number of students and total number of instructors for each department.", + "query": "SELECT count(DISTINCT T2.id) , count(DISTINCT T3.id) , T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many students and instructors are in each department?", + "SpiderSynQuestion": "How many students and teachers are in each department?", + "query": "SELECT count(DISTINCT T2.id) , count(DISTINCT T3.id) , T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of students who have taken the prerequisite course of the course with title International Finance.", + "SpiderSynQuestion": "Find the name of students who have taken the prerequisite course of the course with title International Finance.", + "query": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of students who have taken the prerequisite for the course International Finance?", + "SpiderSynQuestion": "What are the names of students who have taken the prerequisite for the course International Finance?", + "query": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.", + "SpiderSynQuestion": "Find the name and wage of instructors whose wage is below the average wage of the instructors in the Physics department.", + "query": "SELECT name , salary FROM instructor WHERE salary < (SELECT avg(salary) FROM instructor WHERE dept_name = 'Physics')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?", + "SpiderSynQuestion": "What are the names and wages for instructors who earn less than the average wage of instructors in the Physics department?", + "query": "SELECT name , salary FROM instructor WHERE salary < (SELECT avg(salary) FROM instructor WHERE dept_name = 'Physics')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the name of students who took some course offered by Statistics department.", + "SpiderSynQuestion": "Find the name of students who took some curriculum offered by Statistics department.", + "query": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of students who have taken Statistics courses?", + "SpiderSynQuestion": "What are the names of students who have taken Statistics courses?", + "query": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.", + "SpiderSynQuestion": "Find the building, room number, academic session and year of all curriculum offered by Psychology department sorted by curriculum titles.", + "query": "SELECT T2.building , T2.room_number , T2.semester , T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?", + "SpiderSynQuestion": "What are the building, room number, academic session and year of courses in the Psychology department, sorted using course title?", + "query": "SELECT T2.building , T2.room_number , T2.semester , T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of all instructors in computer science department", + "SpiderSynQuestion": "Find the names of all teachers in computer science department", + "query": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of all instructors in the Comp. Sci. department?", + "SpiderSynQuestion": "What are the names of all teachers in the Comp. Sci. department?", + "query": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of all instructors in Comp. Sci. department with salary > 80000.", + "SpiderSynQuestion": "Find the names of all teachers in Comp. Sci. department with salary > 80000.", + "query": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?", + "SpiderSynQuestion": "What are the names of the teachers in the Comp. Sci. department who earn more than 80000?", + "query": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of all instructors who have taught some course and the course_id.", + "SpiderSynQuestion": "Find the names of all teachers who have taught some course and the course_id.", + "query": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of all instructors who have taught a course, as well as the corresponding course id?", + "SpiderSynQuestion": "What are the names of all teachers who have taught curriculum, as well as the corresponding curriculum id?", + "query": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of all instructors in the Art department who have taught some course and the course_id.", + "SpiderSynQuestion": "Find the names of all teachers in the Art department who have taught some course and the course_id.", + "query": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of Art instructors who have taught a course, and the corresponding course id?", + "SpiderSynQuestion": "What are the names of Art instructors who have taught a curriculum, and the corresponding curriculum id?", + "query": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of all instructors whose name includes the substring \u201cdar\u201d.", + "SpiderSynQuestion": "Find the names of all teachers whose name includes the substring \u201cdar\u201d.", + "query": "SELECT name FROM instructor WHERE name LIKE '%dar%'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of all instructors with names that include \"dar\"?", + "SpiderSynQuestion": "What are the names of all teachers with names that include \"dar\"?", + "query": "SELECT name FROM instructor WHERE name LIKE '%dar%'" + }, + { + "db_id": "college_2", + "SpiderQuestion": "List in alphabetic order the names of all distinct instructors.", + "SpiderSynQuestion": "List in alphabetic order the names of all different teachers.", + "query": "SELECT DISTINCT name FROM instructor ORDER BY name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "List the distinct names of the instructors, ordered by name.", + "SpiderSynQuestion": "List the different names of the teachers, ordered by name.", + "query": "SELECT DISTINCT name FROM instructor ORDER BY name" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find courses that ran in Fall 2009 or in Spring 2010.", + "SpiderSynQuestion": "Find curriculum that ran in Fall 2009 or in Spring 2010.", + "query": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the ids for courses in the Fall of 2009 or the Spring of 2010?", + "SpiderSynQuestion": "What are the ids for curriculum in the Fall of 2009 or the Spring of 2010?", + "query": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find courses that ran in Fall 2009 and in Spring 2010.", + "SpiderSynQuestion": "Find curriculum that ran in Fall 2009 and in Spring 2010.", + "query": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?", + "SpiderSynQuestion": "What are the ids for curriculum that were offered in both Fall of 2009 and Spring of 2010?", + "query": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find courses that ran in Fall 2009 but not in Spring 2010.", + "SpiderSynQuestion": "Find curriculum that ran in Fall 2009 but not in Spring 2010.", + "query": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?", + "SpiderSynQuestion": "What are the ids of curriculum offered in Fall of 2009 but not in Spring of 2010?", + "query": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the salaries of all distinct instructors that are less than the largest salary.", + "SpiderSynQuestion": "Find the wage of all different instructors that are less than the largest wage.", + "query": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT max(salary) FROM instructor)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the distinct salaries of all instructors who earned less than the maximum salary?", + "SpiderSynQuestion": "What are the different wages of all instructors who earned less than the maximum wage?", + "query": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT max(salary) FROM instructor)" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the total number of instructors who teach a course in the Spring 2010 semester.", + "SpiderSynQuestion": "Find the total number of teachers who teach a course in the Spring 2010 semester.", + "query": "SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "How many instructors teach a course in the Spring of 2010?", + "SpiderSynQuestion": "How many teachers teach a course in the Spring of 2010?", + "query": "SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names and average salaries of all departments whose average salary is greater than 42000.", + "SpiderSynQuestion": "Find the names and average wages of all departments whose average wage is greater than 42000.", + "query": "SELECT dept_name , AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary) > 42000" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names and average salaries for departments with average salary higher than 42000?", + "SpiderSynQuestion": "What are the names and average wages for departments with average wage higher than 42000?", + "query": "SELECT dept_name , AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary) > 42000" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.", + "SpiderSynQuestion": "Find names of teachers with wage greater than that of some (at least one) teacher in the Biology department.", + "query": "SELECT name FROM instructor WHERE salary > (SELECT min(salary) FROM instructor WHERE dept_name = 'Biology')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of instructors who earn more than at least one instructor from the Biology department?", + "SpiderSynQuestion": "What are the names of teachers who earn more than at least one teacher from the Biology department?", + "query": "SELECT name FROM instructor WHERE salary > (SELECT min(salary) FROM instructor WHERE dept_name = 'Biology')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.", + "SpiderSynQuestion": "Find the names of all teachers whose wage is greater than the wage of all teachers in the Biology department.", + "query": "SELECT name FROM instructor WHERE salary > (SELECT max(salary) FROM instructor WHERE dept_name = 'Biology')" + }, + { + "db_id": "college_2", + "SpiderQuestion": "What are the names of all instructors with a higher salary than any of the instructors in the Biology department?", + "SpiderSynQuestion": "What are the names of all teachers with a higher wage than any of the teachers in the Biology department?", + "query": "SELECT name FROM instructor WHERE salary > (SELECT max(salary) FROM instructor WHERE dept_name = 'Biology')" + }, + { + "db_id": "debate", + "SpiderQuestion": "How many debates are there?", + "SpiderSynQuestion": "How many debates are there?", + "query": "SELECT count(*) FROM debate" + }, + { + "db_id": "debate", + "SpiderQuestion": "List the venues of debates in ascending order of the number of audience.", + "SpiderSynQuestion": "List the place of debates in ascending order of the number of audience.", + "query": "SELECT Venue FROM debate ORDER BY Num_of_Audience ASC" + }, + { + "db_id": "debate", + "SpiderQuestion": "What are the date and venue of each debate?", + "SpiderSynQuestion": "What are the day and place of each debate?", + "query": "SELECT Date , Venue FROM debate" + }, + { + "db_id": "debate", + "SpiderQuestion": "List the dates of debates with number of audience bigger than 150", + "SpiderSynQuestion": "List the day of debates with number of audience bigger than 150", + "query": "SELECT Date FROM debate WHERE Num_of_Audience > 150" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the names of people aged either 35 or 36.", + "SpiderSynQuestion": "Show the names of people aged either 35 or 36.", + "query": "SELECT Name FROM people WHERE Age = 35 OR Age = 36" + }, + { + "db_id": "debate", + "SpiderQuestion": "What is the party of the youngest people?", + "SpiderSynQuestion": "What is the party of the youngest people?", + "query": "SELECT Party FROM people ORDER BY Age ASC LIMIT 1" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show different parties of people along with the number of people in each party.", + "SpiderSynQuestion": "Show different parties of people along with the number of people in each party.", + "query": "SELECT Party , COUNT(*) FROM people GROUP BY Party" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the party that has the most people.", + "SpiderSynQuestion": "Show the party that has the most people.", + "query": "SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the distinct venues of debates", + "SpiderSynQuestion": "Show the different place of debates", + "query": "SELECT DISTINCT Venue FROM debate" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the names of people, and dates and venues of debates they are on the affirmative side.", + "SpiderSynQuestion": "Show the names of people, and day and place of debates they are on the affirmative side.", + "query": "SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.", + "SpiderSynQuestion": "Show the names of people, and days and place of debates they are on the negative side, ordered in ascending alphabetical order of name.", + "query": "SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.", + "SpiderSynQuestion": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.", + "query": "SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the names of people and the number of times they have been on the affirmative side of debates.", + "SpiderSynQuestion": "Show the names of people and the number of times they have been on the affirmative side of debates.", + "query": "SELECT T2.Name , COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name" + }, + { + "db_id": "debate", + "SpiderQuestion": "Show the names of people who have been on the negative side of debates at least twice.", + "SpiderSynQuestion": "Show the names of people who have been on the negative side of debates at least twice.", + "query": "SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative = T2.People_ID GROUP BY T2.Name HAVING COUNT(*) >= 2" + }, + { + "db_id": "debate", + "SpiderQuestion": "List the names of people that have not been on the affirmative side of debates.", + "SpiderSynQuestion": "List the names of people that have not been on the affirmative side of debates.", + "query": "SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "List the names of all the customers in alphabetical order.", + "SpiderSynQuestion": "List the names of all the clients in alphabetical order.", + "query": "SELECT customer_details FROM customers ORDER BY customer_details" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Sort the customer names in alphabetical order.", + "SpiderSynQuestion": "Sort the client names in alphabetical order.", + "query": "SELECT customer_details FROM customers ORDER BY customer_details" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find all the policy type codes associated with the customer \"Dayana Robel\"", + "SpiderSynQuestion": "Find all the policy type codes associated with the customer \"Dayana Robel\"", + "query": "SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = \"Dayana Robel\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What are the type codes of the policies used by the customer \"Dayana Robel\"?", + "SpiderSynQuestion": "What are the type codes of the policies used by the customer \"Dayana Robel\"?", + "query": "SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = \"Dayana Robel\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which type of policy is most frequently used? Give me the policy type code.", + "SpiderSynQuestion": "Which type of policy is most frequently used? Give me the policy type code.", + "query": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the type code of the most frequently used policy.", + "SpiderSynQuestion": "Find the type code of the most frequently used policy.", + "query": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find all the policy types that are used by more than 2 customers.", + "SpiderSynQuestion": "Find all the policy types that are used by more than 2 customers.", + "query": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*) > 2" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.", + "SpiderSynQuestion": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.", + "query": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*) > 2" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the total and average amount paid in claim headers.", + "SpiderSynQuestion": "Find the total and average amount paid in claim headers.", + "query": "SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What are the total amount and average amount paid in claim headers?", + "SpiderSynQuestion": "What are the total amount and average amount paid in claim headers?", + "query": "SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the total amount claimed in the most recently created document.", + "SpiderSynQuestion": "Find the total amount claimed in the most recently created document.", + "query": "SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "How much amount in total were claimed in the most recently created document?", + "SpiderSynQuestion": "How much amount in total were claimed in the most recently created document?", + "query": "SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What is the name of the customer who has made the largest amount of claim in a single claim?", + "SpiderSynQuestion": "What is the name of the client who has made the largest amount of claim in a single claim?", + "query": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT max(amount_claimed) FROM claim_headers)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which customer made the largest amount of claim in a single claim? Return the customer details.", + "SpiderSynQuestion": "Which client made the largest amount of claim in a single claim? Return the client information.", + "query": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT max(amount_claimed) FROM claim_headers)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What is the name of the customer who has made the minimum amount of payment in one claim?", + "SpiderSynQuestion": "What is the name of the client who has made the minimum amount of payment in one claim?", + "query": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which customer made the smallest amount of claim in one claim? Return the customer details.", + "SpiderSynQuestion": "Which client made the smallest amount of claim in one claim? Return the client information.", + "query": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the names of customers who have no policies associated.", + "SpiderSynQuestion": "Find the names of client who have no policies associated.", + "query": "SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What are the names of customers who do not have any policies?", + "SpiderSynQuestion": "What are the names of clients who do not have any policies?", + "query": "SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "How many claim processing stages are there in total?", + "SpiderSynQuestion": "How many claim processing stages are there in total?", + "query": "SELECT count(*) FROM claims_processing_stages" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the number of distinct stages in claim processing.", + "SpiderSynQuestion": "Find the number of different stages in claim processing.", + "query": "SELECT count(*) FROM claims_processing_stages" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What is the name of the claim processing stage that most of the claims are on?", + "SpiderSynQuestion": "What is the name of the claim processing stage that most of the claims are on?", + "query": "SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which claim processing stage has the most claims? Show the claim status name.", + "SpiderSynQuestion": "Which claim processing stage has the most claims? Show the claim status name.", + "query": "SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the names of customers whose name contains \"Diana\".", + "SpiderSynQuestion": "Find the names of clients whose name contains \"Diana\".", + "query": "SELECT customer_details FROM customers WHERE customer_details LIKE \"%Diana%\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which customers have the substring \"Diana\" in their names? Return the customer details.", + "SpiderSynQuestion": "Which clients have the substring \"Diana\" in their names? Return the client information.", + "query": "SELECT customer_details FROM customers WHERE customer_details LIKE \"%Diana%\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the names of the customers who have an deputy policy.", + "SpiderSynQuestion": "Find the names of the clients who have an deputy policy.", + "query": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which customers have an insurance policy with the type code \"Deputy\"? Give me the customer details.", + "SpiderSynQuestion": "Which clients have an insurance policy with the type code \"Deputy\"? Give me the client information.", + "query": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the names of customers who either have an deputy policy or uniformed policy.", + "SpiderSynQuestion": "Find the names of clients who either have an deputy policy or uniformed policy.", + "query": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\" OR t1.policy_type_code = \"Uniform\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which customers have an insurance policy with the type code \"Deputy\" or \"Uniform\"? Return the customer details.", + "SpiderSynQuestion": "Which clients have an insurance policy with the type code \"Deputy\" or \"Uniform\"? Return the client information.", + "query": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\" OR t1.policy_type_code = \"Uniform\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the names of all the customers and staff members.", + "SpiderSynQuestion": "Find the names of all the clients and employee members.", + "query": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What are the names of the customers and staff members?", + "SpiderSynQuestion": "What are the names of the clients and employee members?", + "query": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the number of records of each policy type and its type code.", + "SpiderSynQuestion": "Find the number of records of each policy type and its type code.", + "query": "SELECT policy_type_code , count(*) FROM policies GROUP BY policy_type_code" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "For each policy type, return its type code and its count in the record.", + "SpiderSynQuestion": "For each policy type, return its type code and its count in the record.", + "query": "SELECT policy_type_code , count(*) FROM policies GROUP BY policy_type_code" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the name of the customer that has been involved in the most policies.", + "SpiderSynQuestion": "Find the name of the client that has been involved in the most policies.", + "query": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which customer have the most policies? Give me the customer details.", + "SpiderSynQuestion": "Which client have the most policies? Give me the client information.", + "query": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "What is the description of the claim status \"Open\"?", + "SpiderSynQuestion": "What is the describing content of the claim status \"Open\"?", + "query": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = \"Open\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the description of the claim status \"Open\".", + "SpiderSynQuestion": "Find the describing content of the claim status \"Open\".", + "query": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = \"Open\"" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "How many distinct claim outcome codes are there?", + "SpiderSynQuestion": "How many different claim outcome codes are there?", + "query": "SELECT count(DISTINCT claim_outcome_code) FROM claims_processing" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Count the number of distinct claim outcome codes.", + "SpiderSynQuestion": "Count the number of different claim outcome codes.", + "query": "SELECT count(DISTINCT claim_outcome_code) FROM claims_processing" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Which customer is associated with the latest policy?", + "SpiderSynQuestion": "Which client is associated with the latest policy?", + "query": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT max(start_date) FROM policies)" + }, + { + "db_id": "insurance_and_eClaims", + "SpiderQuestion": "Find the customer who started a policy most recently.", + "SpiderSynQuestion": "Find the client who started a policy most recently.", + "query": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT max(start_date) FROM policies)" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the number of accounts.", + "SpiderSynQuestion": "Show the number of accounts.", + "query": "SELECT count(*) FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many accounts are there?", + "SpiderSynQuestion": "How many accounts are there?", + "query": "SELECT count(*) FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many customers have opened an account?", + "SpiderSynQuestion": "How many clients have opened an account?", + "query": "SELECT count(DISTINCT customer_id) FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of customers who have an account.", + "SpiderSynQuestion": "Count the number of clients who have an account.", + "query": "SELECT count(DISTINCT customer_id) FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the id, the date of account opened, the account name, and other account detail for all accounts.", + "SpiderSynQuestion": "Show the id, the day of account opened, the account name, and other account information for all accounts.", + "query": "SELECT account_id , date_account_opened , account_name , other_account_details FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the ids, date opened, name, and other details for all accounts?", + "SpiderSynQuestion": "What are the ids, date opened, name, and other information for all accounts?", + "query": "SELECT account_id , date_account_opened , account_name , other_account_details FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.", + "SpiderSynQuestion": "Show the id, the account name, and other account information for all accounts by the customer with first name 'Meaghan'.", + "query": "SELECT T1.account_id , T1.date_account_opened , T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name \"Meaghan\"?", + "SpiderSynQuestion": "What are the ids, names, day of opening, and other information for accounts corresponding to the customer with the first name \"Meaghan\"?", + "query": "SELECT T1.account_id , T1.date_account_opened , T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.", + "SpiderSynQuestion": "Show the account name and other account information for all accounts by the customer with first name Meaghan and last name Keeling.", + "query": "SELECT T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Meaghan\" AND T2.customer_last_name = \"Keeling\"" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?", + "SpiderSynQuestion": "What are the names and other information for accounts corresponding to the customer named Meaghan Keeling?", + "query": "SELECT T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Meaghan\" AND T2.customer_last_name = \"Keeling\"" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the first name and last name for the customer with account name 900.", + "SpiderSynQuestion": "Show the forename and last name for the customer with account name 900.", + "query": "SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"900\"" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the full names of customers with the account name 900?", + "SpiderSynQuestion": "What are the full names of customers with the account name 900?", + "query": "SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"900\"" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many customers don't have an account?", + "SpiderSynQuestion": "How many clients don't have an account?", + "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of customers who do not have an account.", + "SpiderSynQuestion": "Count the number of clients who do not have an account.", + "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the unique first names, last names, and phone numbers for all customers with any account.", + "SpiderSynQuestion": "Show the unique forename, family names, and phone numbers for all clients with any account.", + "query": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name , T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the distinct first names, last names, and phone numbers for customers with accounts?", + "SpiderSynQuestion": "What are the different full names, and telephone numbers for clients with accounts?", + "query": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name , T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show customer ids who don't have an account.", + "SpiderSynQuestion": "Show client ids who don't have an account.", + "query": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the customer ids for customers who do not have an account?", + "SpiderSynQuestion": "What are the client ids for clients who do not have an account?", + "query": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many accounts does each customer have? List the number and customer id.", + "SpiderSynQuestion": "How many accounts does each client have? List the number and client id.", + "query": "SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of accounts corresponding to each customer id.", + "SpiderSynQuestion": "Count the number of accounts corresponding to each client id.", + "query": "SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What is the customer id, first and last name with most number of accounts.", + "SpiderSynQuestion": "What is the client id, full name with most number of accounts.", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Return the id and full name of the customer with the most accounts.", + "SpiderSynQuestion": "Return the id and full name of the client with the most accounts.", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show id, first name and last name for all customers and the number of accounts.", + "SpiderSynQuestion": "Show id, forename and surname for all clients and the number of accounts.", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name , count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the the full names and ids for all customers, and how many accounts does each have?", + "SpiderSynQuestion": "What are the the full names and ids for all clients, and how many accounts does each have?", + "query": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name , count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show first name and id for all customers with at least 2 accounts.", + "SpiderSynQuestion": "Show forename and id for all clients with at least 2 accounts.", + "query": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the first names and ids for customers who have two or more accounts?", + "SpiderSynQuestion": "What are the forename and ids for clients who have two or more accounts?", + "query": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the number of customers.", + "SpiderSynQuestion": "Show the number of clients.", + "query": "SELECT count(*) FROM Customers" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of customers.", + "SpiderSynQuestion": "Count the number of clients.", + "query": "SELECT count(*) FROM Customers" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the number of customers for each gender.", + "SpiderSynQuestion": "Show the number of clients for each sex.", + "query": "SELECT gender , count(*) FROM Customers GROUP BY gender" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many customers are there of each gender?", + "SpiderSynQuestion": "How many clients are there of each sex?", + "query": "SELECT gender , count(*) FROM Customers GROUP BY gender" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many transactions do we have?", + "SpiderSynQuestion": "How many transactions do we have?", + "query": "SELECT count(*) FROM Financial_transactions" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of transactions.", + "SpiderSynQuestion": "Count the number of transactions.", + "query": "SELECT count(*) FROM Financial_transactions" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many transaction does each account have? Show the number and account id.", + "SpiderSynQuestion": "How many transaction does each account have? Show the number and account id.", + "query": "SELECT count(*) , account_id FROM Financial_transactions" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of financial transactions that correspond to each account id.", + "SpiderSynQuestion": "Count the number of financial transactions that correspond to each account id.", + "query": "SELECT count(*) , account_id FROM Financial_transactions" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many transaction does account with name 337 have?", + "SpiderSynQuestion": "How many transaction does account with name 337 have?", + "query": "SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = \"337\"" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of financial transactions that the account with the name 337 has.", + "SpiderSynQuestion": "Count the number of financial transactions that the account with the name 337 has.", + "query": "SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = \"337\"" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What is the average, minimum, maximum, and total transaction amount?", + "SpiderSynQuestion": "What is the average, minimum, maximum, and total transaction amount?", + "query": "SELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Return the average, minimum, maximum, and total transaction amounts.", + "SpiderSynQuestion": "Return the average, minimum, maximum, and total transaction amounts.", + "query": "SELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show ids for all transactions whose amounts are greater than the average.", + "SpiderSynQuestion": "Show ids for all transactions whose amounts are greater than the average.", + "query": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the ids for transactions that have an amount greater than the average amount of a transaction?", + "SpiderSynQuestion": "What are the ids for transactions that have an amount greater than the average amount of a transaction?", + "query": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the transaction types and the total amount of transactions.", + "SpiderSynQuestion": "Show the transaction types and the total amount of transactions.", + "query": "SELECT transaction_type , sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are total transaction amounts for each transaction type?", + "SpiderSynQuestion": "What are total transaction amounts for each transaction type?", + "query": "SELECT transaction_type , sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the account name, id and the number of transactions for each account.", + "SpiderSynQuestion": "Show the account name, id and the number of transactions for each account.", + "query": "SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Return the names and ids of each account, as well as the number of transactions.", + "SpiderSynQuestion": "Return the names and ids of each account, as well as the number of transactions.", + "query": "SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the account id with most number of transactions.", + "SpiderSynQuestion": "Show the account id with most number of transactions.", + "query": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What is the id of the account with the most transactions?", + "SpiderSynQuestion": "What is the id of the account with the most transactions?", + "query": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the account id and name with at least 4 transactions.", + "SpiderSynQuestion": "Show the account id and name with at least 4 transactions.", + "query": "SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the ids and names of accounts with 4 or more transactions?", + "SpiderSynQuestion": "What are the ids and names of accounts with 4 or more transactions?", + "query": "SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show all product sizes.", + "SpiderSynQuestion": "Show all goods sizes.", + "query": "SELECT DISTINCT product_size FROM Products" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the different product sizes?", + "SpiderSynQuestion": "What are the different goods sizes?", + "query": "SELECT DISTINCT product_size FROM Products" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show all product colors.", + "SpiderSynQuestion": "Show all goods colours.", + "query": "SELECT DISTINCT product_color FROM Products" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the different product colors?", + "SpiderSynQuestion": "What are the different goods colours?", + "query": "SELECT DISTINCT product_color FROM Products" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the invoice number and the number of transactions for each invoice.", + "SpiderSynQuestion": "Show the invoice number and the number of transactions for each invoice.", + "query": "SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many transactions correspond to each invoice number?", + "SpiderSynQuestion": "How many transactions correspond to each invoice number?", + "query": "SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What is the invoice number and invoice date for the invoice with most number of transactions?", + "SpiderSynQuestion": "What is the invoice number and invoice day for the invoice with most number of transactions?", + "query": "SELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?", + "SpiderSynQuestion": "What is the invoice number and invoice day corresponding to the invoice with the greatest number of transactions?", + "query": "SELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many invoices do we have?", + "SpiderSynQuestion": "How many invoices do we have?", + "query": "SELECT count(*) FROM Invoices" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of invoices.", + "SpiderSynQuestion": "Count the number of invoices.", + "query": "SELECT count(*) FROM Invoices" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show invoice dates and order id and details for all invoices.", + "SpiderSynQuestion": "Show invoice days and order id and details for all invoices.", + "query": "SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the invoice dates, order ids, and order details for all invoices?", + "SpiderSynQuestion": "What are the invoice days, order ids, and order detail for all invoices?", + "query": "SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the order ids and the number of invoices for each order.", + "SpiderSynQuestion": "Show the order ids and the number of invoices for each order.", + "query": "SELECT order_id , count(*) FROM Invoices GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many invoices correspond to each order id?", + "SpiderSynQuestion": "How many invoices correspond to each order id?", + "query": "SELECT order_id , count(*) FROM Invoices GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What is the order id and order details for the order more than two invoices.", + "SpiderSynQuestion": "What is the order id and order information for the order more than two invoices.", + "query": "SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count(*) > 2" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Return the order ids and details for orderes with two or more invoices.", + "SpiderSynQuestion": "Return the order ids and detail for orderes with two or more invoices.", + "query": "SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count(*) > 2" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What is the customer last name, id and phone number with most number of orders?", + "SpiderSynQuestion": "What is the client family name, id and telephone number with most number of orders?", + "query": "SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Return the last name, id and phone number of the customer who has made the greatest number of orders.", + "SpiderSynQuestion": "Return the surname, id and telephone number of the client who has made the greatest number of orders.", + "query": "SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show all product names without an order.", + "SpiderSynQuestion": "Show all goods names without an order.", + "query": "SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the names of products that have never been ordered?", + "SpiderSynQuestion": "What are the names of goods that have never been ordered?", + "query": "SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show all product names and the total quantity ordered for each product name.", + "SpiderSynQuestion": "Show all goods names and the total quantity ordered for each goods name.", + "query": "SELECT T2.product_name , sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are the different product names, and what is the sum of quantity ordered for each product?", + "SpiderSynQuestion": "What are the different goods names, and what is the sum of quantity ordered for each goods?", + "query": "SELECT T2.product_name , sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the order ids and the number of items in each order.", + "SpiderSynQuestion": "Show the order ids and the number of items in each order.", + "query": "SELECT order_id , count(*) FROM Order_items GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many order items correspond to each order id?", + "SpiderSynQuestion": "How many order items correspond to each order id?", + "query": "SELECT order_id , count(*) FROM Order_items GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show the product ids and the number of unique orders containing each product.", + "SpiderSynQuestion": "Show the goods ids and the number of unique orders containing each goods.", + "query": "SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many distinct order ids correspond to each product?", + "SpiderSynQuestion": "How many different order ids correspond to each goods?", + "query": "SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show all product names and the number of customers having an order on each product.", + "SpiderSynQuestion": "Show all goods names and the number of clients having an order on each goods.", + "query": "SELECT T2.product_name , count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "What are teh names of the different products, as well as the number of customers who have ordered each product.", + "SpiderSynQuestion": "What are teh names of the different goods, as well as the number of customers who have ordered each goods.", + "query": "SELECT T2.product_name , count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show order ids and the number of products in each order.", + "SpiderSynQuestion": "Show order ids and the number of goods in each order.", + "query": "SELECT order_id , count(DISTINCT product_id) FROM Order_items GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many different products correspond to each order id?", + "SpiderSynQuestion": "How many different goods correspond to each order id?", + "query": "SELECT order_id , count(DISTINCT product_id) FROM Order_items GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Show order ids and the total quantity in each order.", + "SpiderSynQuestion": "Show order ids and the total amount in each order.", + "query": "SELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Give the order ids for all orders, as well as the total product quantity in each.", + "SpiderSynQuestion": "Give the order ids for all orders, as well as the total goods amount in each.", + "query": "SELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "How many products were not included in any order?", + "SpiderSynQuestion": "How many goods were not included in any order?", + "query": "SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )" + }, + { + "db_id": "customers_and_invoices", + "SpiderQuestion": "Count the number of products that were never ordered.", + "SpiderSynQuestion": "Count the number of goods that were never ordered.", + "query": "SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )" + }, + { + "db_id": "wedding", + "SpiderQuestion": "How many churches opened before 1850 are there?", + "SpiderSynQuestion": "How many churches started before 1850 are there?", + "query": "SELECT count(*) FROM Church WHERE Open_Date < 1850" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the name, open date, and organizer for all churches.", + "SpiderSynQuestion": "Show the name, start day, and organizer for all churches.", + "query": "SELECT name , open_date , organized_by FROM Church" + }, + { + "db_id": "wedding", + "SpiderQuestion": "List all church names in descending order of opening date.", + "SpiderSynQuestion": "List all church names in descending order of opening date.", + "query": "SELECT name FROM church ORDER BY open_date DESC" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the opening year in whcih at least two churches opened.", + "SpiderSynQuestion": "Show\u00a0the\u00a0opening year\u00a0in\u00a0whcih\u00a0at\u00a0least\u00a0two\u00a0churches\u00a0opened.", + "query": "SELECT open_date FROM church GROUP BY open_date HAVING count(*) >= 2" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the organizer and name for churches that opened between 1830 and 1840.", + "SpiderSynQuestion": "Show the organizer and name for churches that opened between 1830 and 1840.", + "query": "SELECT organized_by , name FROM church WHERE open_date BETWEEN 1830 AND 1840" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show all opening years and the number of churches that opened in that year.", + "SpiderSynQuestion": "Show all opening years and the number of churches that opened in that year.", + "query": "SELECT open_date , count(*) FROM church GROUP BY open_date" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the name and opening year for three churches that opened most recently.", + "SpiderSynQuestion": "Show the name and opening year for three churches that opened most recently.", + "query": "SELECT name , open_date FROM church ORDER BY open_date DESC LIMIT 3" + }, + { + "db_id": "wedding", + "SpiderQuestion": "How many female people are older than 30 in our record?", + "SpiderSynQuestion": "How many female people are older than 30 in our record?", + "query": "SELECT count(*) FROM people WHERE is_male = 'F' AND age > 30" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the country where people older than 30 and younger than 25 are from.", + "SpiderSynQuestion": "Show the nation where people older than 30 and younger than 25 are from.", + "query": "SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the minimum, maximum, and average age for all people.", + "SpiderSynQuestion": "Show the minimum, maximum, and average age for all people.", + "query": "SELECT min(age) , max(age) , avg(age) FROM people" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the name and country for all people whose age is smaller than the average.", + "SpiderSynQuestion": "Show the name and nation for all people whose age is smaller than the average.", + "query": "SELECT name , country FROM people WHERE age < (SELECT avg(age) FROM people)" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the pair of male and female names in all weddings after year 2014", + "SpiderSynQuestion": "Show the pair of male and female names in all weddings after year 2014", + "query": "SELECT T2.name , T3.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id WHERE T1.year > 2014" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the name and age for all male people who don't have a wedding.", + "SpiderSynQuestion": "Show the name and age for all male people who don't have a wedding.", + "query": "SELECT name , age FROM people WHERE is_male = 'T' AND people_id NOT IN (SELECT male_id FROM wedding)" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show all church names except for those that had a wedding in year 2015.", + "SpiderSynQuestion": "Show all church names except for those that had a wedding in year 2015.", + "query": "SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show all church names that have hosted least two weddings.", + "SpiderSynQuestion": "Show all church names that have hosted least two weddings.", + "query": "SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id HAVING count(*) >= 2" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the names for all females from Canada having a wedding in year 2016.", + "SpiderSynQuestion": "Show the names for all females from Canada having a wedding in year 2016.", + "query": "SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada'" + }, + { + "db_id": "wedding", + "SpiderQuestion": "How many weddings are there in year 2016?", + "SpiderSynQuestion": "How many weddings are there in year 2016?", + "query": "SELECT count(*) FROM wedding WHERE YEAR = 2016" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show the church names for the weddings of all people older than 30.", + "SpiderSynQuestion": "Show the church names for the weddings of all people older than 30.", + "query": "SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30" + }, + { + "db_id": "wedding", + "SpiderQuestion": "Show all countries and the number of people from each country.", + "SpiderSynQuestion": "Show all nations and the number of people from each nation.", + "query": "SELECT country , count(*) FROM people GROUP BY country" + }, + { + "db_id": "wedding", + "SpiderQuestion": "How many churches have a wedding in year 2016?", + "SpiderSynQuestion": "How many churches have a wedding in year 2016?", + "query": "SELECT COUNT (DISTINCT church_id) FROM wedding WHERE YEAR = 2016" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "How many artists do we have?", + "SpiderSynQuestion": "How many artists do we have?", + "query": "SELECT count(*) FROM artist" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Count the number of artists.", + "SpiderSynQuestion": "Count the number of artists.", + "query": "SELECT count(*) FROM artist" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show all artist name, age, and country ordered by the yeared they joined.", + "SpiderSynQuestion": "Show all artist name, age, and nation ordered by the yeared they joined.", + "query": "SELECT name , age , country FROM artist ORDER BY Year_Join" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the names, ages, and countries of artists, sorted by the year they joined?", + "SpiderSynQuestion": "What are the names, ages, and nations of artists, sorted by the year they joined?", + "query": "SELECT name , age , country FROM artist ORDER BY Year_Join" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are all distinct country for artists?", + "SpiderSynQuestion": "What are all different nation for artists?", + "query": "SELECT DISTINCT country FROM artist" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Return the different countries for artists.", + "SpiderSynQuestion": "Return the different nations for artists.", + "query": "SELECT DISTINCT country FROM artist" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show all artist names and the year joined who are not from United States.", + "SpiderSynQuestion": "Show all artist names and the year joined who are not from United States.", + "query": "SELECT name , year_join FROM artist WHERE country != 'United States'" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the names and year of joining for artists that do not have the country \"United States\"?", + "SpiderSynQuestion": "What are the names and year of joining for artists that do not have the country \"United States\"?", + "query": "SELECT name , year_join FROM artist WHERE country != 'United States'" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "How many artists are above age 46 and joined after 1990?", + "SpiderSynQuestion": "How many artists are above age 46 and joined after 1990?", + "query": "SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Count the number of artists who are older than 46 and joined after 1990.", + "SpiderSynQuestion": "Count the number of artists who are older than 46 and joined after 1990.", + "query": "SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What is the average and minimum age of all artists from United States.", + "SpiderSynQuestion": "What is the average and minimum age of all artists from United States.", + "query": "SELECT avg(age) , min(age) FROM artist WHERE country = 'United States'" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Return the average and minimum ages across artists from the United States.", + "SpiderSynQuestion": "Return the average and minimum ages across artists from the United States.", + "query": "SELECT avg(age) , min(age) FROM artist WHERE country = 'United States'" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What is the name of the artist who joined latest?", + "SpiderSynQuestion": "What is the name of the artist who joined latest?", + "query": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Return the name of the artist who has the latest join year.", + "SpiderSynQuestion": "Return the name of the artist who has the latest join year.", + "query": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "How many exhibition are there in year 2005 or after?", + "SpiderSynQuestion": "How many exhibition are there in year 2005 or after?", + "query": "SELECT count(*) FROM exhibition WHERE YEAR >= 2005" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Count the number of exhibitions that happened in or after 2005.", + "SpiderSynQuestion": "Count the number of exhibitions that happened in or after 2005.", + "query": "SELECT count(*) FROM exhibition WHERE YEAR >= 2005" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show theme and year for all exhibitions with ticket prices lower than 15.", + "SpiderSynQuestion": "Show topic and year for all exhibitions with ticket prices lower than 15.", + "query": "SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the theme and year for all exhibitions that have a ticket price under 15?", + "SpiderSynQuestion": "What are the topic and year for all exhibitions that have a ticket price under 15?", + "query": "SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show all artist names and the number of exhibitions for each artist.", + "SpiderSynQuestion": "Show all artist names and the number of exhibitions for each artist.", + "query": "SELECT T2.name , count(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "How many exhibitions has each artist had?", + "SpiderSynQuestion": "How many exhibitions has each artist had?", + "query": "SELECT T2.name , count(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What is the name and country for the artist with most number of exhibitions?", + "SpiderSynQuestion": "What is the name and nation for the artist with most number of exhibitions?", + "query": "SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Return the name and country corresponding to the artist who has had the most exhibitions.", + "SpiderSynQuestion": "Return the name and nation corresponding to the artist who has had the most exhibitions.", + "query": "SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show names for artists without any exhibition.", + "SpiderSynQuestion": "Show names for artists without any exhibition.", + "query": "SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition)" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the names of artists that have not had any exhibitions?", + "SpiderSynQuestion": "What are the names of artists that have not had any exhibitions?", + "query": "SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition)" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What is the theme and artist name for the exhibition with a ticket price higher than the average?", + "SpiderSynQuestion": "What is the topic and artist name for the exhibition with a ticket price higher than the average?", + "query": "SELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT avg(ticket_price) FROM exhibition)" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.", + "SpiderSynQuestion": "Return the names of artists and the topics of their exhibitions that had a ticket price higher than average.", + "query": "SELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT avg(ticket_price) FROM exhibition)" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.", + "SpiderSynQuestion": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.", + "query": "SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?", + "SpiderSynQuestion": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?", + "query": "SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show theme and year for all exhibitions in an descending order of ticket price.", + "SpiderSynQuestion": "Show topic and year for all exhibitions in an descending order of ticket price.", + "query": "SELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the themes and years for exhibitions, sorted by ticket price descending?", + "SpiderSynQuestion": "What are the topics and years for exhibitions, sorted by ticket price descending?", + "query": "SELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What is the theme, date, and attendance for the exhibition in year 2004?", + "SpiderSynQuestion": "What is the topic, day, and number of attendees for the exhibition in year 2004?", + "query": "SELECT T2.theme , T1.date , T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Return the themes, dates, and attendance for exhibitions that happened in 2004.", + "SpiderSynQuestion": "Return the topics, day, and number of attendee for exhibitions that happened in 2004.", + "query": "SELECT T2.theme , T1.date , T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show all artist names who didn't have an exhibition in 2004.", + "SpiderSynQuestion": "Show all artist names who didn't have an exhibition in 2004.", + "query": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the names of artists who did not have an exhibition in 2004?", + "SpiderSynQuestion": "What are the names of artists who did not have an exhibition in 2004?", + "query": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show the theme for exhibitions with both records of an attendance below 100 and above 500.", + "SpiderSynQuestion": "Show the topic for exhibitions with both records of an attendance below 100 and above 500.", + "query": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?", + "SpiderSynQuestion": "Which topics have had corresponding exhibitions that have had attendance both below 100 and above 500?", + "query": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?", + "SpiderSynQuestion": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?", + "query": "SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.", + "SpiderSynQuestion": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.", + "query": "SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "Show all artist names with an average exhibition attendance over 200.", + "SpiderSynQuestion": "Show all artist names with an average exhibition attendance over 200.", + "query": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200" + }, + { + "db_id": "theme_gallery", + "SpiderQuestion": "What are the names of artist whose exhibitions draw over 200 attendees on average?", + "SpiderSynQuestion": "What are the names of artist whose exhibitions draw over 200 attendees on average?", + "query": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the id of the item whose title is \"orange\".", + "SpiderSynQuestion": "Find the id of the goods whose title is \"orange\".", + "query": "SELECT i_id FROM item WHERE title = \"orange\"" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "List all information in the item table.", + "SpiderSynQuestion": "List all information in the goods table.", + "query": "SELECT * FROM item" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the number of reviews.", + "SpiderSynQuestion": "Find the number of reviews.", + "query": "SELECT count(*) FROM review" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "How many users are there?", + "SpiderSynQuestion": "How many users are there?", + "query": "SELECT count(*) FROM useracct" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the average and maximum rating of all reviews.", + "SpiderSynQuestion": "Find the average and maximum score of all reviews.", + "query": "SELECT avg(rating) , max(rating) FROM review" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the highest rank of all reviews.", + "SpiderSynQuestion": "Find the highest rank of all reviews.", + "query": "SELECT min(rank) FROM review" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "How many different users wrote some reviews?", + "SpiderSynQuestion": "How many different users wrote some reviews?", + "query": "SELECT count(DISTINCT u_id) FROM review" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "How many different items were reviewed by some users?", + "SpiderSynQuestion": "How many different goods were reviewed by some users?", + "query": "SELECT count(DISTINCT i_id) FROM review" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the number of items that did not receive any review.", + "SpiderSynQuestion": "Find the number of goods that did not receive any review.", + "query": "SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review)" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the names of users who did not leave any review.", + "SpiderSynQuestion": "Find the names of users who did not leave any review.", + "query": "SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the names of goods that receive a rating of 10.", + "SpiderSynQuestion": "Find the names of goods that receive a rating of 10.", + "query": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the titles of items whose rating is higher than the average review rating of all items.", + "SpiderSynQuestion": "Find the titles of goods whose rating is higher than the average review rating of all goods.", + "query": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT avg(rating) FROM review)" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the titles of items that received any rating below 5.", + "SpiderSynQuestion": "Find the titles of goods that received any rating below 5.", + "query": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the titles of items that received both a rating higher than 8 and a rating below 5.", + "SpiderSynQuestion": "Find the titles of goods that received both a rating higher than 8 and a rating below 5.", + "query": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 8 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the names of items whose rank is higher than 3 and whose average rating is above 5.", + "SpiderSynQuestion": "Find the names of goods whose rank is higher than 3 and whose average rating is above 5.", + "query": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id HAVING avg(T2.rating) > 5" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the name of the item with the lowest average rating.", + "SpiderSynQuestion": "Find the name of the goods with the lowest average rating.", + "query": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) LIMIT 1" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "List the titles of all items in alphabetic order .", + "SpiderSynQuestion": "List the titles of all goods in alphabetic order .", + "query": "SELECT title FROM item ORDER BY title" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the name of the user who gives the most reviews.", + "SpiderSynQuestion": "Find the name of the user who gives the most reviews.", + "query": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the name and id of the item with the highest average rating.", + "SpiderSynQuestion": "Find the name and id of the goods with the highest average rating.", + "query": "SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) DESC LIMIT 1" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the name and id of the good with the highest average rank.", + "SpiderSynQuestion": "Find the name and id of the good with the highest average rank.", + "query": "SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rank) DESC LIMIT 1" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "For each user, return the name and the average rating of reviews given by them.", + "SpiderSynQuestion": "For each user, return the name and the average score of reviews given by them.", + "query": "SELECT T1.name , avg(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "For each user, find their name and the number of reviews written by them.", + "SpiderSynQuestion": "For each user, find their name and the number of reviews written by them.", + "query": "SELECT T1.name , count(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the name of the user who gave the highest rating.", + "SpiderSynQuestion": "Find the name of the user who gave the highest rating.", + "query": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the name of the source user with the highest average trust score.", + "SpiderSynQuestion": "Find the name of the source user with the highest average trust score.", + "query": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY avg(trust) DESC LIMIT 1" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find each target user's name and average trust score.", + "SpiderSynQuestion": "Find each target user's name and average trust score.", + "query": "SELECT T1.name , avg(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the name of the target user with the lowest trust score.", + "SpiderSynQuestion": "Find the name of the target user with the lowest trust score.", + "query": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust LIMIT 1" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the names of the items that did not receive any review.", + "SpiderSynQuestion": "Find the names of the goods that did not receive any review.", + "query": "SELECT title FROM item WHERE i_id NOT IN (SELECT i_id FROM review)" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the names of users who did not leave any review.", + "SpiderSynQuestion": "Find the names of users who did not leave any review.", + "query": "SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the number of users who did not write any review.", + "SpiderSynQuestion": "Find the number of users who did not write any review.", + "query": "SELECT count(*) FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)" + }, + { + "db_id": "epinions_1", + "SpiderQuestion": "Find the number of items without any review.", + "SpiderSynQuestion": "Find the number of goods without any review.", + "query": "SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review)" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "How many players are there?", + "SpiderSynQuestion": "How many participants are there?", + "query": "SELECT count(*) FROM player" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "List the names of players in ascending order of votes.", + "SpiderSynQuestion": "List the names of gamers in ascending order of votes.", + "query": "SELECT Player_name FROM player ORDER BY Votes ASC" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "What are the gender and occupation of players?", + "SpiderSynQuestion": "What are the sex and occupation of participants?", + "query": "SELECT Gender , Occupation FROM player" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "List the name and residence for players whose occupation is not \"Researcher\".", + "SpiderSynQuestion": "List the name and habitation for gamers whose occupation is not \"Researcher\".", + "query": "SELECT Player_name , residence FROM player WHERE Occupation != \"Researcher\"" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show the names of sponsors of players whose residence is either \"Brandon\" or \"Birtle\".", + "SpiderSynQuestion": "Show the names of sponsors of participants whose residence is either \"Brandon\" or \"Birtle\".", + "query": "SELECT Sponsor_name FROM player WHERE Residence = \"Brandon\" OR Residence = \"Birtle\"" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "What is the name of the player with the largest number of votes?", + "SpiderSynQuestion": "What is the name of the gamer with the largest number of votes?", + "query": "SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show different occupations along with the number of players in each occupation.", + "SpiderSynQuestion": "Show different occupations along with the number of participants in each occupation.", + "query": "SELECT Occupation , COUNT(*) FROM player GROUP BY Occupation" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Please show the most common occupation of players.", + "SpiderSynQuestion": "Please show the most common occupation of participants.", + "query": "SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show the residences that have at least two players.", + "SpiderSynQuestion": "Show the habitations that have at least two players.", + "query": "SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show the names of players and names of their coaches.", + "SpiderSynQuestion": "Show the names of participants and names of their coaches.", + "query": "SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show the names of players coached by the rank 1 coach.", + "SpiderSynQuestion": "Show the names of participants coached by the rank 1 coach.", + "query": "SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show the names and genders of players with a coach starting after 2011.", + "SpiderSynQuestion": "Show the names and sex of players with a coach starting after 2011.", + "query": "SELECT T3.Player_name , T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show the names of players and names of their coaches in descending order of the votes of players.", + "SpiderSynQuestion": "Show the names of participants and names of their instructors in descending order of the votes of participants.", + "query": "SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "List the names of players that do not have coaches.", + "SpiderSynQuestion": "List the names of participants that do not have coaches.", + "query": "SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach)" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "Show the residences that have both a player of gender \"M\" and a player of gender \"F\".", + "SpiderSynQuestion": "Show the habitations that have both a player of gender \"M\" and a player of gender \"F\".", + "query": "SELECT Residence FROM player WHERE gender = \"M\" INTERSECT SELECT Residence FROM player WHERE gender = \"F\"" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "How many coaches does each club has? List the club id, name and the number of coaches.", + "SpiderSynQuestion": "How many instructors does each club has? List the club id, name and the number of instructors.", + "query": "SELECT T1.club_id , T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id" + }, + { + "db_id": "riding_club", + "SpiderQuestion": "How many gold medals has the club with the most coaches won?", + "SpiderSynQuestion": "How many gold medals has the club with the most coaches won?", + "query": "SELECT T1.club_id , T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "How many gymnasts are there?", + "SpiderSynQuestion": "How many gymnastics athletes are there?", + "query": "SELECT count(*) FROM gymnast" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Count the number of gymnasts.", + "SpiderSynQuestion": "Count the number of gymnastics athletes.", + "query": "SELECT count(*) FROM gymnast" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "List the total points of gymnasts in descending order.", + "SpiderSynQuestion": "List the gross score of gymnasts in descending order.", + "query": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the total points for all gymnasts, ordered by total points descending?", + "SpiderSynQuestion": "What are the gross score for all gymnasts, ordered by total points descending?", + "query": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "List the total points of gymnasts in descending order of floor exercise points.", + "SpiderSynQuestion": "List the gross score of gymnasts in descending order of floor exercise points.", + "query": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the total points of gymnasts, ordered by their floor exercise points descending?", + "SpiderSynQuestion": "What are the gross score of gymnasts, ordered by their floor exercise points descending?", + "query": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What is the average horizontal bar points for all gymnasts?", + "SpiderSynQuestion": "What is the average horizontal bar score for all gymnasts?", + "query": "SELECT avg(Horizontal_Bar_Points) FROM gymnast" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the average horizontal bar points across all gymnasts.", + "SpiderSynQuestion": "Return the average horizontal bar score across all gymnastics athletes.", + "query": "SELECT avg(Horizontal_Bar_Points) FROM gymnast" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the names of people in ascending alphabetical order?", + "SpiderSynQuestion": "What are the names of people in ascending alphabetical order?", + "query": "SELECT Name FROM People ORDER BY Name ASC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the names of people, ordered alphabetically.", + "SpiderSynQuestion": "Return the names of people, ordered alphabetically.", + "query": "SELECT Name FROM People ORDER BY Name ASC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the names of gymnasts?", + "SpiderSynQuestion": "What are the names of gymnastics athletes?", + "query": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the names of the gymnasts.", + "SpiderSynQuestion": "Return the names of the gymnastics athletes.", + "query": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the names of gymnasts whose hometown is not \"Santo Domingo\"?", + "SpiderSynQuestion": "What are the names of gymnastics athletes whose hometown is not \"Santo Domingo\"?", + "query": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != \"Santo Domingo\"" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the names of gymnasts who did not grow up in Santo Domingo.", + "SpiderSynQuestion": "Return the names of gymnastics athletes who did not grow up in Santo Domingo.", + "query": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != \"Santo Domingo\"" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What is the age of the tallest person?", + "SpiderSynQuestion": "What is the age of the tallest person?", + "query": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the age of the person with the greatest height.", + "SpiderSynQuestion": "Return the age of the person with the greatest height.", + "query": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "List the names of the top 5 oldest people.", + "SpiderSynQuestion": "List the names of the top 5 oldest people.", + "query": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the names of the five oldest people?", + "SpiderSynQuestion": "What are the names of the five oldest people?", + "query": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What is the total point count of the youngest gymnast?", + "SpiderSynQuestion": "What is the gross score count of the youngest gymnast?", + "query": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the total points of the gymnast with the lowest age.", + "SpiderSynQuestion": "Return the gross score of the gymnast with the lowest age.", + "query": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What is the average age of all gymnasts?", + "SpiderSynQuestion": "What is the average age of all gymnastics athletes?", + "query": "SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the average age across all gymnasts.", + "SpiderSynQuestion": "Return the average age across all gymnastics athletes.", + "query": "SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the distinct hometowns of gymnasts with total points more than 57.5?", + "SpiderSynQuestion": "What are the different birthplaces of gymnasts with total points more than 57.5?", + "query": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Give the different hometowns of gymnasts that have a total point score of above 57.5.", + "SpiderSynQuestion": "Give the different birthplaces of gymnasts that have a total point score of above 57.5.", + "query": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the hometowns of gymnasts and the corresponding number of gymnasts?", + "SpiderSynQuestion": "What are the birthplaces of gymnasts and the corresponding number of gymnasts?", + "query": "SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "How many gymnasts are from each hometown?", + "SpiderSynQuestion": "How many gymnasts are from each birthplace?", + "query": "SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What is the most common hometown of gymnasts?", + "SpiderSynQuestion": "What is the most common birthplace of gymnasts?", + "query": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Return the hometown that is most common among gymnasts.", + "SpiderSynQuestion": "Return the birthplace that is most common among gymnasts.", + "query": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the hometowns that are shared by at least two gymnasts?", + "SpiderSynQuestion": "What are the birthplace that are shared by at least two gymnasts?", + "query": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Give the hometowns from which two or more gymnasts are from.", + "SpiderSynQuestion": "Give the birthplace from which two or more gymnasts are from.", + "query": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "List the names of gymnasts in ascending order by their heights.", + "SpiderSynQuestion": "List the names of gymnastics athletes in ascending order by their heights.", + "query": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the names of gymnasts, ordered by their heights ascending?", + "SpiderSynQuestion": "What are the names of gymnastics athletes, ordered by their heights ascending?", + "query": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "List the distinct hometowns that are not associated with any gymnast.", + "SpiderSynQuestion": "List the different birthplace that are not associated with any gymnast.", + "query": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "From which hometowns did no gymnasts come from?", + "SpiderSynQuestion": "From which birthplace did no gymnasts come from?", + "query": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Show the hometowns shared by people older than 23 and younger than 20.", + "SpiderSynQuestion": "Show the birthplace shared by people older than 23 and younger than 20.", + "query": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "From which hometowns did both people older than 23 and younger than 20 come from?", + "SpiderSynQuestion": "From which birthplace did both people older than 23 and younger than 20 come from?", + "query": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "How many distinct hometowns did these people have?", + "SpiderSynQuestion": "How many different birthplace did these people have?", + "query": "SELECT count(DISTINCT Hometown) FROM people" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Count the number of different hometowns of these people.", + "SpiderSynQuestion": "Count the number of different birthplaces of these people.", + "query": "SELECT count(DISTINCT Hometown) FROM people" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "Show the ages of gymnasts in descending order of total points.", + "SpiderSynQuestion": "Show the ages of gymnastics athletes in descending order of total points.", + "query": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC" + }, + { + "db_id": "gymnast", + "SpiderQuestion": "What are the ages of the gymnasts, ordered descending by their total points?", + "SpiderSynQuestion": "What are the ages of the gymnastics athletes, ordered descending by their total points?", + "query": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.", + "SpiderSynQuestion": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.", + "query": "SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the total balance of savings accounts not belonging to someone with the name Brown?", + "SpiderSynQuestion": "What is the total balance of savings accounts not belonging to someone with the name Brown?", + "query": "SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "How many accounts are there in total?", + "SpiderSynQuestion": "How many accounts are there in total?", + "query": "SELECT count(*) FROM accounts" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Count the number of accounts.", + "SpiderSynQuestion": "Count the number of accounts.", + "query": "SELECT count(*) FROM accounts" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the total checking balance in all accounts?", + "SpiderSynQuestion": "What is the total checking balance in all accounts?", + "query": "SELECT sum(balance) FROM checking" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the total balance across checking accounts.", + "SpiderSynQuestion": "Find the total balance across checking accounts.", + "query": "SELECT sum(balance) FROM checking" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the average checking balance.", + "SpiderSynQuestion": "Find the average checking balance.", + "query": "SELECT avg(balance) FROM checking" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the average balance in checking accounts?", + "SpiderSynQuestion": "What is the average balance in checking accounts?", + "query": "SELECT avg(balance) FROM checking" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "How many accounts have a savings balance above the average savings balance?", + "SpiderSynQuestion": "How many accounts have a savings balance above the average savings balance?", + "query": "SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the number of accounts with a savings balance that is higher than the average savings balance.", + "SpiderSynQuestion": "Find the number of accounts with a savings balance that is higher than the average savings balance.", + "query": "SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name and id of accounts whose checking balance is below the maximum checking balance.", + "SpiderSynQuestion": "Find the name and id of accounts whose checking balance is below the maximum checking balance.", + "query": "SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?", + "SpiderSynQuestion": "What are the client id and name corresponding to accounts with a checking balance less than the largest checking balance?", + "query": "SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?", + "SpiderSynQuestion": "What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?", + "query": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.", + "SpiderSynQuestion": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.", + "query": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the checking balance and saving balance in the Brown\u2019s account.", + "SpiderSynQuestion": "Find the checking balance and saving balance in the Brown\u2019s account.", + "query": "SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the checking and savings balances in accounts belonging to Brown?", + "SpiderSynQuestion": "What are the checking and savings balances in accounts belonging to Brown?", + "query": "SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.", + "SpiderSynQuestion": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?", + "SpiderSynQuestion": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.", + "SpiderSynQuestion": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.", + "query": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings))" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?", + "SpiderSynQuestion": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?", + "query": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings))" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "List all customers\u2019 names in the alphabetical order.", + "SpiderSynQuestion": "List all customers\u2019 names in the alphabetical order.", + "query": "SELECT name FROM accounts ORDER BY name" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names of all the customers in alphabetical order?", + "SpiderSynQuestion": "What are the names of all the customers in alphabetical order?", + "query": "SELECT name FROM accounts ORDER BY name" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name of account that has the lowest total checking and saving balance.", + "SpiderSynQuestion": "Find the name of account that has the lowest total checking and saving balance.", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?", + "SpiderSynQuestion": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.", + "SpiderSynQuestion": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.", + "query": "SELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?", + "SpiderSynQuestion": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?", + "query": "SELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name and checking balance of the account with the lowest savings balance.", + "SpiderSynQuestion": "Find the name and checking balance of the account with the lowest savings balance.", + "query": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?", + "SpiderSynQuestion": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?", + "query": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the number of checking accounts for each account name.", + "SpiderSynQuestion": "Find the number of checking accounts for each account name.", + "query": "SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names of customers with accounts, and how many checking accounts do each of them have?", + "SpiderSynQuestion": "What are the names of customers with accounts, and how many checking accounts do each of them have?", + "query": "SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the total saving balance for each account name.", + "SpiderSynQuestion": "Find the total saving balance for each account name.", + "query": "SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names of customers with accounts, and what are the total savings balances for each?", + "SpiderSynQuestion": "What are the names of customers with accounts, and what are the total savings balances for each?", + "query": "SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name of accounts whose checking balance is below the average checking balance.", + "SpiderSynQuestion": "Find the name of accounts whose checking balance is below the average checking balance.", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names of customers with checking balances lower than the average checking balance?", + "SpiderSynQuestion": "What are the names of customers with checking balances lower than the average checking balance?", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking)" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the saving balance of the account with the highest checking balance.", + "SpiderSynQuestion": "Find the saving balance of the account with the highest checking balance.", + "query": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the savings balance of the account belonging to the customer with the highest checking balance?", + "SpiderSynQuestion": "What is the savings balance of the account belonging to the customer with the highest checking balance?", + "query": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.", + "SpiderSynQuestion": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.", + "query": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the sum of checking and savings balances for all customers, ordered by the total balance?", + "SpiderSynQuestion": "What is the sum of checking and savings balances for all customers, ordered by the total balance?", + "query": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name and checking balance of the account with the lowest saving balance.", + "SpiderSynQuestion": "Find the name and checking balance of the account with the lowest saving balance.", + "query": "SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What is the name and checking balance of the account which has the lowest savings balance?", + "SpiderSynQuestion": "What is the name and checking balance of the account which has the lowest savings balance?", + "query": "SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name, checking balance and saving balance of all accounts in the bank.", + "SpiderSynQuestion": "Find the name, checking balance and saving balance of all accounts in the bank.", + "query": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names, checking balances, and savings balances for all customers?", + "SpiderSynQuestion": "What are the names, checking balances, and savings balances for all customers?", + "query": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.", + "SpiderSynQuestion": "Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.", + "query": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?", + "SpiderSynQuestion": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?", + "query": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name of accounts whose checking balance is higher than corresponding saving balance.", + "SpiderSynQuestion": "Find the name of accounts whose checking balance is higher than corresponding saving balance.", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names of customers with a higher checking balance than savings balance?", + "SpiderSynQuestion": "What are the names of customers with a higher checking balance than savings balance?", + "query": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.", + "SpiderSynQuestion": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.", + "query": "SELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?", + "SpiderSynQuestion": "What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?", + "query": "SELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.", + "SpiderSynQuestion": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.", + "query": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3" + }, + { + "db_id": "small_bank_1", + "SpiderQuestion": "What are names and savings balances of the three accounts with the highest savings balances?", + "SpiderSynQuestion": "What are names and savings balances of the three accounts with the highest savings balances?", + "query": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "How many main stream browsers whose market share is at least 5 exist?", + "SpiderSynQuestion": "How many main stream browsers whose market share is at least 5 exist?", + "query": "SELECT count(*) FROM browser WHERE market_share >= 5" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "List the name of browsers in descending order by market share.", + "SpiderSynQuestion": "List the title of browsers in descending order by market share.", + "query": "SELECT name FROM browser ORDER BY market_share DESC" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "List the ids, names and market shares of all browsers.", + "SpiderSynQuestion": "List the ids, titles and market shares of all browsers.", + "query": "SELECT id , name , market_share FROM browser" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "What is the maximum, minimum and average market share of the listed browsers?", + "SpiderSynQuestion": "What is the maximum, minimum and average market share of the listed browsers?", + "query": "SELECT max(market_share) , min(market_share) , avg(market_share) FROM browser" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "What is the id and market share of the browser Safari?", + "SpiderSynQuestion": "What is the id and market share of the browser Safari?", + "query": "SELECT id , market_share FROM browser WHERE name = 'Safari'" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?", + "SpiderSynQuestion": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?", + "query": "SELECT name , operating_system FROM web_client_accelerator WHERE CONNECTION != 'Broadband'" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?", + "SpiderSynQuestion": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?", + "query": "SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "What are the ids and names of the web accelerators that are compatible with two or more browsers?", + "SpiderSynQuestion": "What are the ids and titles of the web accelerators that are compatible with two or more browsers?", + "query": "SELECT T1.id , T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING count(*) >= 2" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "What is the id and name of the browser that is compatible with the most web accelerators?", + "SpiderSynQuestion": "What is the id and title of the browser that is compatible with the most web accelerators?", + "query": "SELECT T1.id , T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?", + "SpiderSynQuestion": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?", + "query": "SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer'" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "How many different kinds of clients are supported by the web clients accelerators?", + "SpiderSynQuestion": "How many different kinds of clients are supported by the web clients accelerators?", + "query": "SELECT count(DISTINCT client) FROM web_client_accelerator" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "How many accelerators are not compatible with the browsers listed ?", + "SpiderSynQuestion": "How many accelerators are not compatible with the browsers listed ?", + "query": "SELECT count(*) FROM web_client_accelerator WHERE id NOT IN ( SELECT accelerator_id FROM accelerator_compatible_browser );" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?", + "SpiderSynQuestion": "What different accelerator names are compatible with the browswers that have market share higher than 15?", + "query": "SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15;" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.", + "SpiderSynQuestion": "List the titles of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.", + "query": "SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox'" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.", + "SpiderSynQuestion": "Show the accelerator names and supporting os that are not compatible with the browser named 'Opera'.", + "query": "SELECT name , operating_system FROM web_client_accelerator EXCEPT SELECT T1.name , T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera'" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "Which accelerator name contains substring \"Opera\"?", + "SpiderSynQuestion": "Which accelerator name contains substring \"Opera\"?", + "query": "SELECT name FROM web_client_accelerator WHERE name LIKE \"%Opera%\"" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "Find the number of web accelerators used for each Operating system.", + "SpiderSynQuestion": "Find the number of web accelerators used for each os .", + "query": "SELECT Operating_system , count(*) FROM web_client_accelerator GROUP BY Operating_system" + }, + { + "db_id": "browser_web", + "SpiderQuestion": "give me names of all compatible browsers and accelerators in the descending order of compatible year", + "SpiderSynQuestion": "give me names of all compatible browsers and accelerators in the descending order of compatible year", + "query": "SELECT T2.name , T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "How many wrestlers are there?", + "SpiderSynQuestion": "Count the number of wrestlers are there?", + "query": "SELECT count(*) FROM wrestler" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Count the number of wrestlers.", + "SpiderSynQuestion": "Count the number of wrestlers.", + "query": "SELECT count(*) FROM wrestler" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "List the names of wrestlers in descending order of days held.", + "SpiderSynQuestion": "List the names of wrestlers in descending order of days held.", + "query": "SELECT Name FROM wrestler ORDER BY Days_held DESC" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the names of the wrestlers, ordered descending by days held?", + "SpiderSynQuestion": "What are the names of the wrestlers, ordered descending by days held?", + "query": "SELECT Name FROM wrestler ORDER BY Days_held DESC" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What is the name of the wrestler with the fewest days held?", + "SpiderSynQuestion": "What is the name of the wrestler with the fewest days held?", + "query": "SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Return the name of the wrestler who had the lowest number of days held.", + "SpiderSynQuestion": "Return the name of the wrestler who had the lowest number of days held.", + "query": "SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the distinct reigns of wrestlers whose location is not \"Tokyo,Japan\" ?", + "SpiderSynQuestion": "What are the different reigns of wrestlers whose location is not \"Tokyo,Japan\" ?", + "query": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != \"Tokyo , Japan\"" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.", + "SpiderSynQuestion": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.", + "query": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != \"Tokyo , Japan\"" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the names and location of the wrestlers?", + "SpiderSynQuestion": "What are the names and city of the wrestlers?", + "query": "SELECT Name , LOCATION FROM wrestler" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Give the names and locations of all wrestlers.", + "SpiderSynQuestion": "Give the names and cities of all wrestlers.", + "query": "SELECT Name , LOCATION FROM wrestler" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the elimination moves of wrestlers whose team is \"Team Orton\"?", + "SpiderSynQuestion": "What are the elimination moves of wrestlers whose team is \"Team Orton\"?", + "query": "SELECT Elimination_Move FROM Elimination WHERE Team = \"Team Orton\"" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Return the elimination movies of wrestlers on Team Orton.", + "SpiderSynQuestion": "Return the elimination movies of wrestlers on Team Orton.", + "query": "SELECT Elimination_Move FROM Elimination WHERE Team = \"Team Orton\"" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the names of wrestlers and the elimination moves?", + "SpiderSynQuestion": "What are the names of wrestlers and the elimination moves?", + "query": "SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Give the names of wrestlers and their elimination moves.", + "SpiderSynQuestion": "Give the names of wrestlers and their elimination moves.", + "query": "SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "List the names of wrestlers and the teams in elimination in descending order of days held.", + "SpiderSynQuestion": "List the names of wrestlers and the teams in elimination in descending order of days held.", + "query": "SELECT T2.Name , T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the names of wrestlers and their teams in elimination, ordered descending by days held?", + "SpiderSynQuestion": "What are the names of wrestlers and their teams in elimination, ordered descending by days held?", + "query": "SELECT T2.Name , T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "List the time of elimination of the wrestlers with largest days held.", + "SpiderSynQuestion": "List the time of elimination of the wrestlers with largest days held.", + "query": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What is the time of elimination for the wrestler with the most days held?", + "SpiderSynQuestion": "What is the time of elimination for the wrestler with the most days held?", + "query": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Show times of elimination of wrestlers with days held more than 50.", + "SpiderSynQuestion": "Show times of elimination of wrestlers with days held more than 50.", + "query": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the times of elimination for wrestlers with over 50 days held?", + "SpiderSynQuestion": "What are the times of elimination for wrestlers with over 50 days held?", + "query": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Show different teams in eliminations and the number of eliminations from each team.", + "SpiderSynQuestion": "Show different teams in eliminations and the number of eliminations from each team.", + "query": "SELECT Team , COUNT(*) FROM elimination GROUP BY Team" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "How many eliminations did each team have?", + "SpiderSynQuestion": "How many eliminations did each team have?", + "query": "SELECT Team , COUNT(*) FROM elimination GROUP BY Team" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Show teams that have suffered more than three eliminations.", + "SpiderSynQuestion": "Show teams that have suffered more than three eliminations.", + "query": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Which teams had more than 3 eliminations?", + "SpiderSynQuestion": "Which teams had more than 3 eliminations?", + "query": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Show the reign and days held of wrestlers.", + "SpiderSynQuestion": "Show the reign and days held of wrestlers.", + "query": "SELECT Reign , Days_held FROM wrestler" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the reigns and days held of all wrestlers?", + "SpiderSynQuestion": "What are the reigns and days held of all wrestlers?", + "query": "SELECT Reign , Days_held FROM wrestler" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the names of wrestlers days held less than 100?", + "SpiderSynQuestion": "What are the names of wrestlers days held less than 100?", + "query": "SELECT Name FROM wrestler WHERE Days_held < 100" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Return the names of wrestlers with fewer than 100 days held.", + "SpiderSynQuestion": "Return the names of wrestlers with fewer than 100 days held.", + "query": "SELECT Name FROM wrestler WHERE Days_held < 100" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Please show the most common reigns of wrestlers.", + "SpiderSynQuestion": "Please show the most common reigns of wrestlers.", + "query": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Which reign is the most common among wrestlers?", + "SpiderSynQuestion": "Which reign is the most common among wrestlers?", + "query": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "List the locations that are shared by more than two wrestlers.", + "SpiderSynQuestion": "List the cities that are shared by more than two wrestlers.", + "query": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Which locations are shared by more than two wrestlers?", + "SpiderSynQuestion": "Which cities are shared by more than two wrestlers?", + "query": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "List the names of wrestlers that have not been eliminated.", + "SpiderSynQuestion": "List the names of wrestlers that have not been eliminated.", + "query": "SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the names of wrestlers who have never been eliminated?", + "SpiderSynQuestion": "What are the names of wrestlers who have never been eliminated?", + "query": "SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Show the teams that have both wrestlers eliminated by \"Orton\" and wrestlers eliminated by \"Benjamin\".", + "SpiderSynQuestion": "Show the teams that have both wrestlers eliminated by \"Orton\" and wrestlers eliminated by \"Benjamin\".", + "query": "SELECT Team FROM Elimination WHERE Eliminated_By = \"Orton\" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = \"Benjamin\"" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?", + "SpiderSynQuestion": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?", + "query": "SELECT Team FROM Elimination WHERE Eliminated_By = \"Orton\" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = \"Benjamin\"" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What is the number of distinct teams that suffer elimination?", + "SpiderSynQuestion": "What is the number of different teams that suffer elimination?", + "query": "SELECT COUNT (DISTINCT team) FROM elimination" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "How many different teams have had eliminated wrestlers?", + "SpiderSynQuestion": "How many different teams have had eliminated wrestlers?", + "query": "SELECT COUNT (DISTINCT team) FROM elimination" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "Show the times of elimination by \"Punk\" or \"Orton\".", + "SpiderSynQuestion": "Show the times of elimination by \"Punk\" or \"Orton\".", + "query": "SELECT TIME FROM elimination WHERE Eliminated_By = \"Punk\" OR Eliminated_By = \"Orton\"" + }, + { + "db_id": "wrestler", + "SpiderQuestion": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?", + "SpiderSynQuestion": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?", + "query": "SELECT TIME FROM elimination WHERE Eliminated_By = \"Punk\" OR Eliminated_By = \"Orton\"" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "How many schools are there?", + "SpiderSynQuestion": "Show the nunmber of schools are there?", + "query": "SELECT count(*) FROM school" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Count the number of schools.", + "SpiderSynQuestion": "Count the number of schools.", + "query": "SELECT count(*) FROM school" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show all school names in alphabetical order.", + "SpiderSynQuestion": "Show all school names in alphabetical order.", + "query": "SELECT school_name FROM school ORDER BY school_name" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "List the name, location, mascot for all schools.", + "SpiderSynQuestion": "List the name, city, mascot for all schools.", + "query": "SELECT school_name , LOCATION , mascot FROM school" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "What are the total and average enrollment of all schools?", + "SpiderSynQuestion": "What are the total and average students are enrolled in all schools?", + "query": "SELECT sum(enrollment) , avg(enrollment) FROM school" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "What are the mascots for schools with enrollments above the average?", + "SpiderSynQuestion": "What are the mascots for schools with enrollments above the average?", + "query": "SELECT mascot FROM school WHERE enrollment > (SELECT avg(enrollment) FROM school)" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "List the name of the school with the smallest enrollment.", + "SpiderSynQuestion": "List the name of the school with the smallest enrollment.", + "query": "SELECT school_name FROM school ORDER BY enrollment LIMIT 1" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show the average, maximum, minimum enrollment of all schools.", + "SpiderSynQuestion": "Show the average, maximum, minimum students are enrolled in all schools.", + "query": "SELECT avg(enrollment) , max(enrollment) , min(enrollment) FROM school" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show each county along with the number of schools and total enrollment in each county.", + "SpiderSynQuestion": "Show each county along with the number of schools and total students are enrolled in each county.", + "query": "SELECT county , count(*) , sum(enrollment) FROM school GROUP BY county" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "How many donors have endowment for school named \"Glenn\"?", + "SpiderSynQuestion": "How many donors have endowment for school named \"Glenn\"?", + "query": "SELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = \"Glenn\"" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "List each donator name and the amount of endowment in descending order of the amount of endowment.", + "SpiderSynQuestion": "List each donor name and the total of endowment in descending order of the amount of endowment.", + "query": "SELECT donator_name , sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "List the names of the schools without any endowment.", + "SpiderSynQuestion": "List the names of the schools without any endowment.", + "query": "SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "List all the names of schools with an endowment amount smaller than or equal to 10.", + "SpiderSynQuestion": "List all the names of schools with an endowment amount smaller than or equal to 10.", + "query": "SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING sum(T1.amount) <= 10" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show the names of donors who donated to both school \"Glenn\" and \"Triton.\"", + "SpiderSynQuestion": "Show the names of donors who donated to both school \"Glenn\" and \"Triton.\"", + "query": "SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton'" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show the names of all the donors except those whose donation amount less than 9.", + "SpiderSynQuestion": "Show the names of all the donors except those whose donation amount less than 9.", + "query": "SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "List the amount and donor name for the largest amount of donation.", + "SpiderSynQuestion": "List the amount and donor name for the largest amount of donation.", + "query": "SELECT amount , donator_name FROM endowment ORDER BY amount DESC LIMIT 1" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "How many budgets are above 3000 in year 2001 or before?", + "SpiderSynQuestion": "How many budgets are above 3000 in year 2001 or before?", + "query": "SELECT count(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000", + "SpiderSynQuestion": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000", + "query": "SELECT count(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show each school name, its budgeted amount, and invested amount in year 2002 or after.", + "SpiderSynQuestion": "Show each school name, its budget, and invested amount in year 2002 or after.", + "query": "SELECT T2.school_name , T1.budgeted , T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show all donor names.", + "SpiderSynQuestion": "Show all donor names.", + "query": "SELECT DISTINCT donator_name FROM endowment" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "How many budget record has a budget amount smaller than the invested amount?", + "SpiderSynQuestion": "How many budget record has a budget amount smaller than the invested amount?", + "query": "SELECT count(*) FROM budget WHERE budgeted < invested" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "What is the total budget amount for school \"Glenn\" in all years?", + "SpiderSynQuestion": "What is the total budget amount for school \"Glenn\" in all years?", + "query": "SELECT sum(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn'" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.", + "SpiderSynQuestion": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.", + "query": "SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted) > 100 OR sum(T3.amount) > 10" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Find the names of schools that have more than one donator with donation amount above 8.5.", + "SpiderSynQuestion": "Find the names of schools that have more than one donator with donation amount above 8.5.", + "query": "SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.amount > 8.5 GROUP BY T1.school_id HAVING count(*) > 1" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "Find the number of schools that have more than one donator whose donation amount is less than 8.5.", + "SpiderSynQuestion": "Find the number of schools that have more than one donator whose donation amount is less than 8.5.", + "query": "SELECT count(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING count(*) > 1)" + }, + { + "db_id": "school_finance", + "SpiderQuestion": "List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.", + "SpiderSynQuestion": "List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.", + "query": "SELECT T1.School_name , T1.Mascot , T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested , T2.total_budget_percent_budgeted" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "How many buildings are there?", + "SpiderSynQuestion": "How many buildings are there?", + "query": "SELECT count(*) FROM building" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the name, street address, and number of floors for all buildings ordered by the number of floors.", + "SpiderSynQuestion": "Show the name, street address, and number of storey for all buildings ordered by the number of storeys.", + "query": "SELECT name , street_address , floors FROM building ORDER BY floors" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "What is the name of the tallest building?", + "SpiderSynQuestion": "What is the name of the tallest building?", + "query": "SELECT name FROM building ORDER BY height_feet DESC LIMIT 1" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "What are the average, maximum, and minimum number of floors for all buildings?", + "SpiderSynQuestion": "What are the average, maximum, and minimum number of storey for all buildings?", + "query": "SELECT avg(floors) , max(floors) , min(floors) FROM building" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the number of buildings with a height above the average or a number of floors above the average.", + "SpiderSynQuestion": "Show the number of buildings with a height above the average or a number of floors above the average.", + "query": "SELECT count(*) FROM building WHERE height_feet > (SELECT avg(height_feet) FROM building) OR floors > (SELECT avg(floors) FROM building)" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "List the names of buildings with at least 200 feet of height and with at least 20 floors.", + "SpiderSynQuestion": "List the names of buildings with at least 200 feet of height and with at least 20 floors.", + "query": "SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the names and locations of institutions that are founded after 1990 and have the type \"Private\".", + "SpiderSynQuestion": "Show the names and locations of institutions that are founded after 1990 and have the type \"Private\".", + "query": "SELECT institution , LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private'" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show institution types, along with the number of institutions and total enrollment for each type.", + "SpiderSynQuestion": "Show institution categories, along with the number of institutions and total enrollment for each category.", + "query": "SELECT TYPE , count(*) , sum(enrollment) FROM institution GROUP BY TYPE" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the institution type with the largest number of institutions.", + "SpiderSynQuestion": "Show the institution category with the largest number of institutions.", + "query": "SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.", + "SpiderSynQuestion": "Show the institution category with an institution founded after 1990 and an institution with at least 1000 enrollment.", + "query": "SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the name of buildings that do not have any institution.", + "SpiderSynQuestion": "Show the name of buildings that do not have any institution.", + "query": "SELECT name FROM building WHERE building_id NOT IN (SELECT building_id FROM institution)" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the names of buildings except for those having an institution founded in 2003.", + "SpiderSynQuestion": "Show the names of buildings except for those having an institution founded in 2003.", + "query": "SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded = 2003" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "For each building, show the name of the building and the number of institutions in it.", + "SpiderSynQuestion": "For each building, show the name of the building and the number of institutions in it.", + "query": "SELECT T1.name , count(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the names and heights of buildings with at least two institutions founded after 1880.", + "SpiderSynQuestion": "Show the names and heights of buildings with at least two institutions founded after 1880.", + "query": "SELECT T1.name , T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded > 1880 GROUP BY T1.building_id HAVING count(*) >= 2" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show all the distinct institution types.", + "SpiderSynQuestion": "Show all the different institution categories.", + "query": "SELECT DISTINCT TYPE FROM institution" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show institution names along with the number of proteins for each institution.", + "SpiderSynQuestion": "Show university names along with the number of proteins for each university.", + "query": "SELECT T1.institution , count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "How many proteins are associated with an institution founded after 1880 or an institution with type \"Private\"?", + "SpiderSynQuestion": "How many proteins are associated with university founded after 1880 or university with type \"Private\"?", + "query": "SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private'" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "Show the protein name and the institution name.", + "SpiderSynQuestion": "Show the protein name and the university name.", + "query": "SELECT T2.protein_name , T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "How many proteins are associated with an institution in a building with at least 20 floors?", + "SpiderSynQuestion": "How many proteins are associated with university in a building with at least 20 floors?", + "query": "SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id JOIN building AS T3 ON T3.building_id = T1.building_id WHERE T3.floors >= 20" + }, + { + "db_id": "protein_institute", + "SpiderQuestion": "How many institutions do not have an associated protein in our record?", + "SpiderSynQuestion": "How many universities do not have an associated protein in our record?", + "query": "SELECT count(*) FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM protein)" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show all the locations where no cinema has capacity over 800.", + "SpiderSynQuestion": "Show all the locations where no cinema has number of seats over 800.", + "query": "SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.", + "SpiderSynQuestion": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.", + "query": "SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011" + }, + { + "db_id": "cinema", + "SpiderQuestion": "How many cinema do we have?", + "SpiderSynQuestion": "How many movie theater do we have?", + "query": "SELECT count(*) FROM cinema" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Count the number of cinemas.", + "SpiderSynQuestion": "Count the number of movie theater.", + "query": "SELECT count(*) FROM cinema" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show name, opening year, and capacity for each cinema.", + "SpiderSynQuestion": "Show name, opening year, and number of seats for each cinema.", + "query": "SELECT name , openning_year , capacity FROM cinema" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show the cinema name and location for cinemas with capacity above average.", + "SpiderSynQuestion": "Show the cinema name and county for cinemas with number of seats above average.", + "query": "SELECT name , LOCATION FROM cinema WHERE capacity > (SELECT avg(capacity) FROM cinema)" + }, + { + "db_id": "cinema", + "SpiderQuestion": "What are all the locations with a cinema?", + "SpiderSynQuestion": "What are all the county with a cinema?", + "query": "SELECT DISTINCT LOCATION FROM cinema" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Find the distinct locations that has a cinema.", + "SpiderSynQuestion": "Find the different county that has a cinema.", + "query": "SELECT DISTINCT LOCATION FROM cinema" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show all the cinema names and opening years in descending order of opening year.", + "SpiderSynQuestion": "Show all the movie theater names and opening years in descending order of opening year.", + "query": "SELECT name , openning_year FROM cinema ORDER BY openning_year DESC" + }, + { + "db_id": "cinema", + "SpiderQuestion": "What are the name and location of the cinema with the largest capacity?", + "SpiderSynQuestion": "What are the name and county of the cinema with the largest number of seats?", + "query": "SELECT name , LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.", + "SpiderSynQuestion": "Show the average, minimum, and maximum number of seats for all the cinemas opened in year 2011 or later.", + "query": "SELECT avg(capacity) , min(capacity) , max(capacity) FROM cinema WHERE openning_year >= 2011" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show each location and the number of cinemas there.", + "SpiderSynQuestion": "Show each county and the number of cinemas there.", + "query": "SELECT LOCATION , count(*) FROM cinema GROUP BY LOCATION" + }, + { + "db_id": "cinema", + "SpiderQuestion": "What is the location with the most cinemas opened in year 2010 or later?", + "SpiderSynQuestion": "What is the county with the most cinemas opened in year 2010 or later?", + "query": "SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show all the locations with at least two cinemas with capacity above 300.", + "SpiderSynQuestion": "Show all the county with at least two cinemas with the number of seats above 300.", + "query": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) >= 2" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Which locations have 2 or more cinemas with capacity over 300?", + "SpiderSynQuestion": "Which county have 2 or more cinemas with the number of seats over 300?", + "query": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) >= 2" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show the title and director for all films.", + "SpiderSynQuestion": "Show the title and director for all films.", + "query": "SELECT title , directed_by FROM film" + }, + { + "db_id": "cinema", + "SpiderQuestion": "What are the title and director of each film?", + "SpiderSynQuestion": "What are the title and director of each film?", + "query": "SELECT title , directed_by FROM film" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show all directors.", + "SpiderSynQuestion": "Show all directors.", + "query": "SELECT DISTINCT directed_by FROM film" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Who are all the directors?", + "SpiderSynQuestion": "Who are all the directors?", + "query": "SELECT DISTINCT directed_by FROM film" + }, + { + "db_id": "cinema", + "SpiderQuestion": "List all directors along with the number of films directed by each director.", + "SpiderSynQuestion": "List all directors along with the number of films directed by each director.", + "query": "SELECT directed_by , count(*) FROM film GROUP BY directed_by" + }, + { + "db_id": "cinema", + "SpiderQuestion": "What is total number of show times per dat for each cinema?", + "SpiderSynQuestion": "What is total number of show times per dat for each cinema?", + "query": "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" + }, + { + "db_id": "cinema", + "SpiderQuestion": "What are the title and maximum price of each film?", + "SpiderSynQuestion": "What are the title and maximum price of each film?", + "query": "SELECT T2.title , max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Give me the title and highest price for each film.", + "SpiderSynQuestion": "Give me the title and highest price for each film.", + "query": "SELECT T2.title , max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show cinema name, film title, date, and price for each record in schedule.", + "SpiderSynQuestion": "Show cinema name, film title, day, and price for each record in schedule.", + "query": "SELECT T3.name , T2.title , T1.date , T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id" + }, + { + "db_id": "cinema", + "SpiderQuestion": "What are the title and director of the films without any schedule?", + "SpiderSynQuestion": "What are the title and director of the films without any schedule?", + "query": "SELECT title , directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule)" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Show director with the largest number of show times in total.", + "SpiderSynQuestion": "Show director with the largest number of show times in total.", + "query": "SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC LIMIT 1" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Find the locations that have more than one movie theater with capacity above 300.", + "SpiderSynQuestion": "Find the county that have more than one movie theater with the number of seats above 300.", + "query": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) > 1" + }, + { + "db_id": "cinema", + "SpiderQuestion": "In which locations are there more than one movie theater with capacity above 300?", + "SpiderSynQuestion": "In which county are there more than one movie theater with the number of seats above 300?", + "query": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) > 1" + }, + { + "db_id": "cinema", + "SpiderQuestion": "How many films have the word 'Dummy' in their titles?", + "SpiderSynQuestion": "How many movies have the word 'Dummy' in their titles?", + "query": "SELECT count(*) FROM film WHERE title LIKE \"%Dummy%\"" + }, + { + "db_id": "cinema", + "SpiderQuestion": "Count the number of films whose title contains the word 'Dummy'.", + "SpiderSynQuestion": "Count the number of movies whose title contains the word 'Dummy'.", + "query": "SELECT count(*) FROM film WHERE title LIKE \"%Dummy%\"" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "Are the customers holding coupons with amount 500 bad or good?", + "SpiderSynQuestion": "Are the clients holding coupons with amount 500 bad or good?", + "query": "SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "How many bookings did each customer make? List the customer id, first name, and the count.", + "SpiderSynQuestion": "How many bookings did each customer make? List the customer id, forename, and the count.", + "query": "SELECT T1.customer_id , T1.first_name , count(*) FROM Customers AS T1 JOIN bookings AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What is the maximum total amount paid by a customer? List the customer id and amount.", + "SpiderSynQuestion": "What is the maximum total amount paid by a client? List the client id and amount.", + "query": "SELECT customer_id , sum(amount_paid) FROM Payments GROUP BY customer_id ORDER BY sum(amount_paid) DESC LIMIT 1" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the id and the amount of refund of the booking that incurred the most times of payments?", + "SpiderSynQuestion": "What are the id and the amount of refund of the booking that incurred the most times of payments?", + "query": "SELECT T1.booking_id , T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T1.booking_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What is the id of the product that is booked for 3 times?", + "SpiderSynQuestion": "What is the id of the goods that is booked for 3 times?", + "query": "SELECT product_id FROM products_booked GROUP BY product_id HAVING count(*) = 3" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What is the product description of the product booked with an amount of 102.76?", + "SpiderSynQuestion": "What is the goods describing content of the goods booked with an amount of 102.76?", + "query": "SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.booked_amount = 102.76" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the start date and end date of the booking that has booked the product named 'Book collection A'?", + "SpiderSynQuestion": "What are the start day and end day of the booking that has booked the goods named 'Book collection A'?", + "query": "SELECT T3.booking_start_date , T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id = T2.product_id JOIN bookings AS T3 ON T2.booking_id = T3.booking_id WHERE T1.product_name = 'Book collection A'" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the names of products whose availability equals to 1?", + "SpiderSynQuestion": "What are the names of goods whose availability equals to 1?", + "query": "SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.available_yn = 1" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "How many different product types are there?", + "SpiderSynQuestion": "How many different goods types are there?", + "query": "SELECT count(DISTINCT product_type_code) FROM products_for_hire" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the first name, last name, and gender of all the good customers? Order by their last name.", + "SpiderSynQuestion": "What are the forename, family name, and sex of all the good customers? Order by their family name.", + "query": "SELECT first_name , last_name , gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What is the average amount due for all the payments?", + "SpiderSynQuestion": "What is the average amount due for all the payments?", + "query": "SELECT avg(amount_due) FROM payments" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the maximum, minimum, and average booked count for the products booked?", + "SpiderSynQuestion": "What are the maximum, minimum, and average booked quantity for the products booked?", + "query": "SELECT max(booked_count) , min(booked_count) , avg(booked_count) FROM products_booked" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are all the distinct payment types?", + "SpiderSynQuestion": "What are all the different payment methods?", + "query": "SELECT DISTINCT payment_type_code FROM payments" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the daily hire costs for the products with substring 'Book' in its name?", + "SpiderSynQuestion": "What are the rent of day for the products with substring 'Book' in its name?", + "query": "SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "How many products are never booked with amount higher than 200?", + "SpiderSynQuestion": "How many goods are never booked with amount higher than 200?", + "query": "SELECT count(*) FROM Products_for_hire WHERE product_id NOT IN ( SELECT product_id FROM products_booked WHERE booked_amount > 200 )" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the coupon amount of the coupons owned by both good and bad customers?", + "SpiderSynQuestion": "What are the number of coupons owned by both good and bad customers?", + "query": "SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'good' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'bad'" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'", + "SpiderSynQuestion": "What are the payment day of the payment with amount paid higher than 300 or with payment method is 'Check'", + "query": "SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check'" + }, + { + "db_id": "products_for_hire", + "SpiderQuestion": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?", + "SpiderSynQuestion": "What are the names and describing details of the goods that are of 'Cutlery' type and have daily hire cost lower than 20?", + "query": "SELECT product_name , product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "How many phones are there?", + "SpiderSynQuestion": "Count the number of cellphones are there?", + "query": "SELECT count(*) FROM phone" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "List the names of phones in ascending order of price.", + "SpiderSynQuestion": "List the names of cellphones in ascending order of price.", + "query": "SELECT Name FROM phone ORDER BY Price ASC" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "What are the memories and carriers of phones?", + "SpiderSynQuestion": "What are the storage space and carriers of phones?", + "query": "SELECT Memory_in_G , Carrier FROM phone" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "List the distinct carriers of phones with memories bigger than 32.", + "SpiderSynQuestion": "List the different carriers of cellphones with memories bigger than 32.", + "query": "SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show the names of phones with carrier either \"Sprint\" or \"TMobile\".", + "SpiderSynQuestion": "Show the names of cellphones with carrier either \"Sprint\" or \"TMobile\".", + "query": "SELECT Name FROM phone WHERE Carrier = \"Sprint\" OR Carrier = \"TMobile\"" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "What is the carrier of the most expensive phone?", + "SpiderSynQuestion": "What is the carrier of the most expensive cellphone?", + "query": "SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show different carriers of phones together with the number of phones with each carrier.", + "SpiderSynQuestion": "Show different carriers of cellphones together with the number of cellphones with each carrier.", + "query": "SELECT Carrier , COUNT(*) FROM phone GROUP BY Carrier" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show the most frequently used carrier of the phones.", + "SpiderSynQuestion": "Show the most frequently used carrier of the cellphones.", + "query": "SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.", + "SpiderSynQuestion": "Show the carriers that have both cellphones with memory smaller than 32 and cellphones with memory bigger than 64.", + "query": "SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show the names of phones and the districts of markets they are on.", + "SpiderSynQuestion": "Show the names of cellphones and the region of markets they are on.", + "query": "SELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.", + "SpiderSynQuestion": "Show the names of phones and the region of markets they are on, in ascending order of the ranking of the market.", + "query": "SELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID ORDER BY T2.Ranking" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show the names of phones that are on market with number of shops greater than 50.", + "SpiderSynQuestion": "Show the names of cellphones that are on market with number of shops greater than 50.", + "query": "SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID WHERE T2.Num_of_shops > 50" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "For each phone, show its names and total number of stocks.", + "SpiderSynQuestion": "For each cellphone, show its names and inventory quantity.", + "query": "SELECT T2.Name , sum(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.", + "SpiderSynQuestion": "Show the names of phones that have inventory quantity bigger than 2000, in descending order of the total number of inventory.", + "query": "SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name HAVING sum(T1.Num_of_stock) >= 2000 ORDER BY sum(T1.Num_of_stock) DESC" + }, + { + "db_id": "phone_market", + "SpiderQuestion": "List the names of phones that are not on any market.", + "SpiderSynQuestion": "List the names of cellphones that are not on any market.", + "query": "SELECT Name FROM phone WHERE Phone_id NOT IN (SELECT Phone_ID FROM phone_market)" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "How many gas companies are there?", + "SpiderSynQuestion": "Show the number of gas companies are there?", + "query": "SELECT count(*) FROM company" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What is the total number of companies?", + "SpiderSynQuestion": "What is the total number of enterprise?", + "query": "SELECT count(*) FROM company" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "List the company name and rank for all companies in the decreasing order of their sales.", + "SpiderSynQuestion": "List the enterprise name and rank for all enterprise in the decreasing order of their sales.", + "query": "SELECT company , rank FROM company ORDER BY Sales_billion DESC" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What is the name and rank of every company ordered by descending number of sales?", + "SpiderSynQuestion": "What is the name and rank of every enterprise ordered by descending number of sales?", + "query": "SELECT company , rank FROM company ORDER BY Sales_billion DESC" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show the company name and the main industry for all companies whose headquarters are not from USA.", + "SpiderSynQuestion": "Show the enterprise name and the main industry for all enterprise whose headquarters are not from USA.", + "query": "SELECT company , main_industry FROM company WHERE headquarters != 'USA'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the companies and main industries of all companies that are not headquartered in the United States?", + "SpiderSynQuestion": "What are the enterprise and main industries of all enterprise that are not headquartered in the United States?", + "query": "SELECT company , main_industry FROM company WHERE headquarters != 'USA'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show all company names and headquarters in the descending order of market value.", + "SpiderSynQuestion": "Show all enterprise names and head office in the descending order of market value.", + "query": "SELECT company , headquarters FROM company ORDER BY market_value DESC" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the names and headquarters of all companies ordered by descending market value?", + "SpiderSynQuestion": "What are the names and head office of all enterprise ordered by descending market value?", + "query": "SELECT company , headquarters FROM company ORDER BY market_value DESC" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show minimum, maximum, and average market value for all companies.", + "SpiderSynQuestion": "Show minimum, maximum, and average market value for all enterprise.", + "query": "SELECT min(market_value) , max(market_value) , avg(market_value) FROM company" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What is the minimum, maximum, and average market value for every company?", + "SpiderSynQuestion": "What is the minimum, maximum, and average market value for every enterprise?", + "query": "SELECT min(market_value) , max(market_value) , avg(market_value) FROM company" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show all main industry for all companies.", + "SpiderSynQuestion": "Show all main industry for all enterprise.", + "query": "SELECT DISTINCT main_industry FROM company" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the different main industries for all companies?", + "SpiderSynQuestion": "What are the different main industries for all enterprise?", + "query": "SELECT DISTINCT main_industry FROM company" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "List all headquarters and the number of companies in each headquarter.", + "SpiderSynQuestion": "List all head office and the number of companies in each head office.", + "query": "SELECT headquarters , count(*) FROM company GROUP BY headquarters" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "For each headquarter, what are the headquarter and how many companies are centered there?", + "SpiderSynQuestion": "For each head office, what are the head office and how many companies are centered there?", + "query": "SELECT headquarters , count(*) FROM company GROUP BY headquarters" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show all main industry and total market value in each industry.", + "SpiderSynQuestion": "Show all main industry and total market value in each industry.", + "query": "SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the main indstries and total market value for each industry?", + "SpiderSynQuestion": "What are the main indstries and total market value for each industry?", + "query": "SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "List the main industry with highest total market value and its number of companies.", + "SpiderSynQuestion": "List the main industry with highest total market value and its number of enterprise.", + "query": "SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "For each main industry, what is the total number of companies for the industry with the highest total market value?", + "SpiderSynQuestion": "For each main industry, what is the total number of enterprise for the industry with the highest total market value?", + "query": "SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show headquarters with at least two companies in the banking industry.", + "SpiderSynQuestion": "Show head office with at least two companies in the banking industry.", + "query": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the headquarters with at least two companies in the banking industry?", + "SpiderSynQuestion": "What are the head office with at least two companies in the banking industry?", + "query": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show gas station id, location, and manager_name for all gas stations ordered by open year.", + "SpiderSynQuestion": "Show gas station id, address, and head name for all gas stations ordered by open year.", + "query": "SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?", + "SpiderSynQuestion": "What are the gas station ids, addresses, and head names for the gas stations ordered by opening year?", + "query": "SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "How many gas station are opened between 2000 and 2005?", + "SpiderSynQuestion": "How many gas station are opened between 2000 and 2005?", + "query": "SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What is the total number of gas stations that opened between 2000 and 2005?", + "SpiderSynQuestion": "What is the total number of gas stations that opened between 2000 and 2005?", + "query": "SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show all locations and the number of gas stations in each location ordered by the count.", + "SpiderSynQuestion": "Show all addresses and the number of gas stations in each address ordered by the count.", + "query": "SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "For each location, how many gas stations are there in order?", + "SpiderSynQuestion": "For each address, how many gas stations are there in order?", + "query": "SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show all headquarters with both a company in banking industry and a company in Oil and gas.", + "SpiderSynQuestion": "Show all head office with both a company in banking industry and a company in Oil and gas.", + "query": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the headquarters that have both a company in the banking and 'oil and gas' industries?", + "SpiderSynQuestion": "What are the head office that have both a company in the banking and 'oil and gas' industries?", + "query": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show all headquarters without a company in banking industry.", + "SpiderSynQuestion": "Show all head office without a company in banking industry.", + "query": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the headquarters without companies that are in the banking industry?", + "SpiderSynQuestion": "What are the head office without companies that are in the banking industry?", + "query": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show the company name with the number of gas station.", + "SpiderSynQuestion": "Show the enterprise name with the number of gas station.", + "query": "SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "For each company id, what are the companies and how many gas stations does each one operate?", + "SpiderSynQuestion": "For each enterprise id, what are the enterprise and how many gas stations does each one operate?", + "query": "SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show company name and main industry without a gas station.", + "SpiderSynQuestion": "Show enterprise name and main industry without a gas station.", + "query": "SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the main industries of the companies without gas stations and what are the companies?", + "SpiderSynQuestion": "What are the main industries of the enterprise without gas stations and what are the enterprise?", + "query": "SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show the manager name for gas stations belonging to the ExxonMobil company.", + "SpiderSynQuestion": "Show the head name for gas stations belonging to the ExxonMobil company.", + "query": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the names of the managers for gas stations that are operated by the ExxonMobil company?", + "SpiderSynQuestion": "What are the names of the heads for gas stations that are operated by the ExxonMobil company?", + "query": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show all locations where a gas station for company with market value greater than 100 is located.", + "SpiderSynQuestion": "Show all addresses where a gas station for company with market value greater than 100 is located.", + "query": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the locations that have gas stations owned by a company with a market value greater than 100?", + "SpiderSynQuestion": "What are the addresses that have gas stations owned by a company with a market value greater than 100?", + "query": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "Show the manager name with most number of gas stations opened after 2000.", + "SpiderSynQuestion": "Show the head name with most number of gas stations opened after 2000.", + "query": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What is the name of the manager with the most gas stations that opened after 2000?", + "SpiderSynQuestion": "What is the name of the head with the most gas stations that opened after 2000?", + "query": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "order all gas station locations by the opening year.", + "SpiderSynQuestion": "order all gas station addresses by the opening year.", + "query": "SELECT LOCATION FROM gas_station ORDER BY open_year" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the locations of all the gas stations ordered by opening year?", + "SpiderSynQuestion": "What are the addresses of all the gas stations ordered by opening year?", + "query": "SELECT LOCATION FROM gas_station ORDER BY open_year" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.", + "SpiderSynQuestion": "find the rank, enterprise names, market values of the enterprises in the banking industry order by their sales and profits in billion.", + "query": "SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?", + "SpiderSynQuestion": "What is the rank,enterprise, and market value of every enterprise in the banking industry ordered by sales and profits?", + "query": "SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.", + "SpiderSynQuestion": "find the address and Representative name of the gas stations owned by the companies with top 3 Asset amounts.", + "query": "SELECT T3.location , T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3" + }, + { + "db_id": "gas_company", + "SpiderQuestion": "What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?", + "SpiderSynQuestion": "What are the addresses and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?", + "query": "SELECT T3.location , T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3" + }, + { + "db_id": "party_people", + "SpiderQuestion": "How many regions do we have?", + "SpiderSynQuestion": "How many districts do we have?", + "query": "SELECT count(*) FROM region" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Count the number of regions.", + "SpiderSynQuestion": "Count the number of districts.", + "query": "SELECT count(*) FROM region" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show all distinct region names ordered by their labels.", + "SpiderSynQuestion": "Show all different district names ordered by their labels.", + "query": "SELECT DISTINCT region_name FROM region ORDER BY Label" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What are the different region names, ordered by labels?", + "SpiderSynQuestion": "What are the different district names, ordered by labels?", + "query": "SELECT DISTINCT region_name FROM region ORDER BY Label" + }, + { + "db_id": "party_people", + "SpiderQuestion": "How many parties do we have?", + "SpiderSynQuestion": "How many parties do we have?", + "query": "SELECT count(DISTINCT party_name) FROM party" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Count the number of different parties.", + "SpiderSynQuestion": "Count the number of different parties.", + "query": "SELECT count(DISTINCT party_name) FROM party" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show the ministers and the time they took and left office, listed by the time they left office.", + "SpiderSynQuestion": "Show the ministers and the time they took and left office, listed by the time they left office.", + "query": "SELECT minister , took_office , left_office FROM party ORDER BY left_office" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?", + "SpiderSynQuestion": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?", + "query": "SELECT minister , took_office , left_office FROM party ORDER BY left_office" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show the minister who took office after 1961 or before 1959.", + "SpiderSynQuestion": "Show the minister who took office after 1961 or before 1959.", + "query": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Who are the ministers who took office after 1961 or before 1959?", + "SpiderSynQuestion": "Who are the ministers who took office after 1961 or before 1959?", + "query": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show all ministers who do not belong to Progress Party.", + "SpiderSynQuestion": "Show all ministers who do not belong to Progress Party.", + "query": "SELECT minister FROM party WHERE party_name != 'Progress Party'" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Which ministers are not a part of the Progress Party?", + "SpiderSynQuestion": "Which ministers are not a part of the Progress Party?", + "query": "SELECT minister FROM party WHERE party_name != 'Progress Party'" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show all ministers and parties they belong to in descending order of the time they took office.", + "SpiderSynQuestion": "Show all ministers and parties they belong to in descending order of the time they took office.", + "query": "SELECT minister , party_name FROM party ORDER BY took_office DESC" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?", + "SpiderSynQuestion": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?", + "query": "SELECT minister , party_name FROM party ORDER BY took_office DESC" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Return the minister who left office at the latest time.", + "SpiderSynQuestion": "Return the minister who left office at the latest time.", + "query": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Which minister left office the latest?", + "SpiderSynQuestion": "Which minister left office the latest?", + "query": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "List member names and their party names.", + "SpiderSynQuestion": "List member names and their party names.", + "query": "SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What are the names of members and their corresponding parties?", + "SpiderSynQuestion": "What are the names of members and their corresponding parties?", + "query": "SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show all party names and the number of members in each party.", + "SpiderSynQuestion": "Show all party names and the number of members in each party.", + "query": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "How many members are in each party?", + "SpiderSynQuestion": "How many members are in each party?", + "query": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What is the name of party with most number of members?", + "SpiderSynQuestion": "What is the name of party with most number of members?", + "query": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Return the name of the party with the most members.", + "SpiderSynQuestion": "Return the name of the party with the most members.", + "query": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show all party names and their region names.", + "SpiderSynQuestion": "Show all party names and their district names.", + "query": "SELECT T1.party_name , T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What are the names of parties and their respective regions?", + "SpiderSynQuestion": "What are the names of parties and their respective districts?", + "query": "SELECT T1.party_name , T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show names of parties that does not have any members.", + "SpiderSynQuestion": "Show names of parties that does not have any members.", + "query": "SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What are the names of parties that have no members?", + "SpiderSynQuestion": "What are the names of parties that have no members?", + "query": "SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show the member names which are in both the party with id 3 and the party with id 1.", + "SpiderSynQuestion": "Show the member names which are in both the party with id 3 and the party with id 1.", + "query": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Which member names are shared among members in the party with the id 3 and the party with the id 1?", + "SpiderSynQuestion": "Which member names are shared among members in the party with the id 3 and the party with the id 1?", + "query": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show member names that are not in the Progress Party.", + "SpiderSynQuestion": "Show member names that are not in the Progress Party.", + "query": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name != \"Progress Party\"" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Which member names corresponding to members who are not in the Progress Party?", + "SpiderSynQuestion": "Which member names corresponding to members who are not in the Progress Party?", + "query": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name != \"Progress Party\"" + }, + { + "db_id": "party_people", + "SpiderQuestion": "How many party events do we have?", + "SpiderSynQuestion": "How many party events do we have?", + "query": "SELECT count(*) FROM party_events" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Count the number of party events.", + "SpiderSynQuestion": "Count the number of party events.", + "query": "SELECT count(*) FROM party_events" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show party names and the number of events for each party.", + "SpiderSynQuestion": "Show party names and the number of events for each party.", + "query": "SELECT T2.party_name , count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "How many events are there for each party?", + "SpiderSynQuestion": "How many events are there for each party?", + "query": "SELECT T2.party_name , count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Show all member names who are not in charge of any event.", + "SpiderSynQuestion": "Show all member names who are not in charge of any event.", + "query": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What are the names of members who are not in charge of any events?", + "SpiderSynQuestion": "What are the names of members who are not in charge of any events?", + "query": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What are the names of parties with at least 2 events?", + "SpiderSynQuestion": "What are the names of parties with at least 2 events?", + "query": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count(*) >= 2" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Return the names of parties that have two or more events.", + "SpiderSynQuestion": "Return the names of parties that have two or more events.", + "query": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count(*) >= 2" + }, + { + "db_id": "party_people", + "SpiderQuestion": "What is the name of member in charge of greatest number of events?", + "SpiderSynQuestion": "What is the name of member in charge of greatest number of events?", + "query": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Return the name of the member who is in charge of the most events.", + "SpiderSynQuestion": "Return the name of the member who is in charge of the most events.", + "query": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "party_people", + "SpiderQuestion": "find the event names that have more than 2 records.", + "SpiderSynQuestion": "find the event names that have more than 2 records.", + "query": "SELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Which event names were used more than twice for party events?", + "SpiderSynQuestion": "Which event names were used more than twice for party events?", + "query": "SELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2" + }, + { + "db_id": "party_people", + "SpiderQuestion": "How many Annual Meeting events happened in the United Kingdom region?", + "SpiderSynQuestion": "How many Annual Meeting events happened in the United Kingdom district?", + "query": "SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = \"United Kingdom\" AND t3.Event_Name = \"Annaual Meeting\"" + }, + { + "db_id": "party_people", + "SpiderQuestion": "Count the number of Annual Meeting events that took place in the region of the United Kingdom.", + "SpiderSynQuestion": "Count the number of Annual Meeting events that took place in the district of the United Kingdom.", + "query": "SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = \"United Kingdom\" AND t3.Event_Name = \"Annaual Meeting\"" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "How many pilots are there?", + "SpiderSynQuestion": "How many aviators are there?", + "query": "SELECT count(*) FROM pilot" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "List the names of pilots in ascending order of rank.", + "SpiderSynQuestion": "List the names of aviators in ascending order of rank.", + "query": "SELECT Pilot_name FROM pilot ORDER BY Rank ASC" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "What are the positions and teams of pilots?", + "SpiderSynQuestion": "What are the locations and teams of pilots?", + "query": "SELECT POSITION , Team FROM pilot" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "List the distinct positions of pilots older than 30.", + "SpiderSynQuestion": "List the different locations of pilots older than 30.", + "query": "SELECT DISTINCT POSITION FROM pilot WHERE Age > 30" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show the names of pilots from team \"Bradley\" or \"Fordham\".", + "SpiderSynQuestion": "Show the names of aviators from team \"Bradley\" or \"Fordham\".", + "query": "SELECT Pilot_name FROM pilot WHERE Team = \"Bradley\" OR Team = \"Fordham\"" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "What is the joined year of the pilot of the highest rank?", + "SpiderSynQuestion": "What is the joined year of the aviator of the highest rank?", + "query": "SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.", + "SpiderSynQuestion": "What are the different countries of pilots? Show each country and the number of pilots of each country.", + "query": "SELECT Nationality , COUNT(*) FROM pilot GROUP BY Nationality" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show the most common nationality of pilots.", + "SpiderSynQuestion": "Show the most common country of pilots.", + "query": "SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.", + "SpiderSynQuestion": "Show the pilot locations that have both pilots joining after year 2005 and pilots joining before 2000.", + "query": "SELECT POSITION FROM pilot WHERE Join_Year\t < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year\t > 2005" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show the names of pilots and models of aircrafts they have flied with.", + "SpiderSynQuestion": "Show the names of aviators and types of aircrafts they have flied with.", + "query": "SELECT T3.Pilot_name , T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.", + "SpiderSynQuestion": "Show the names of aviators and fleet series of the aircrafts they have flied with in ascending order of the rank of the aviator.", + "query": "SELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show the fleet series of the aircrafts flied by pilots younger than 34", + "SpiderSynQuestion": "Show the fleet series of the aircrafts flied by pilots younger than 34", + "query": "SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show the names of pilots and the number of records they have.", + "SpiderSynQuestion": "Show the names of aviators and the number of records they have.", + "query": "SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "Show names of pilots that have more than one record.", + "SpiderSynQuestion": "Show names of aviators that have more than one record.", + "query": "SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1" + }, + { + "db_id": "pilot_record", + "SpiderQuestion": "List the names of pilots that do not have any record.", + "SpiderSynQuestion": "List the names of aviator that do not have any record.", + "query": "SELECT Pilot_name FROM pilot WHERE Pilot_ID NOT IN (SELECT Pilot_ID FROM pilot_record)" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What document status codes do we have?", + "SpiderSynQuestion": "What file status codes do we have?", + "query": "SELECT document_status_code FROM Ref_Document_Status;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the description of document status code 'working'?", + "SpiderSynQuestion": "What is the describing content of file status code 'working'?", + "query": "SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = \"working\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What document type codes do we have?", + "SpiderSynQuestion": "What file type codes do we have?", + "query": "SELECT document_type_code FROM Ref_Document_Types;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the description of document type 'Paper'?", + "SpiderSynQuestion": "What is the describing content of file type 'Paper'?", + "query": "SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = \"Paper\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What are the shipping agent names?", + "SpiderSynQuestion": "What are the shipping agent names?", + "query": "SELECT shipping_agent_name FROM Ref_Shipping_Agents;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the shipping agent code of shipping agent UPS?", + "SpiderSynQuestion": "What is the shipping agent code of shipping agent UPS?", + "query": "SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = \"UPS\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What are all role codes?", + "SpiderSynQuestion": "What are all role codes?", + "query": "SELECT role_code FROM ROLES;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the description of role code ED?", + "SpiderSynQuestion": "What is the describing content of role code ED?", + "query": "SELECT role_description FROM ROLES WHERE role_code = \"ED\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "How many employees do we have?", + "SpiderSynQuestion": "How many staffs do we have?", + "query": "SELECT count(*) FROM Employees;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the role of the employee named Koby?", + "SpiderSynQuestion": "What is the role of the employee named Koby?", + "query": "SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = \"Koby\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List all document ids and receipt dates of documents.", + "SpiderSynQuestion": "List all file ids and receipt dates of files.", + "query": "SELECT document_id , receipt_date FROM Documents;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "How many employees does each role have? List role description, id and number of employees.", + "SpiderSynQuestion": "How many employees does each role have? List role describing content, id and number of employees.", + "query": "SELECT T1.role_description , T2.role_code , count(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List roles that have more than one employee. List the role description and number of employees.", + "SpiderSynQuestion": "List roles that have more than one employee. List the role describing content and number of employees.", + "query": "SELECT Roles.role_description , count(distinct Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING count(distinct Employees.employee_id) > 1;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the document status description of the document with id 1?", + "SpiderSynQuestion": "What is the file status describing content of the file with id 1?", + "query": "SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "How many documents have the status code done?", + "SpiderSynQuestion": "How many files have the status code done?", + "query": "SELECT count(*) FROM Documents WHERE document_status_code = \"done\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List the document type code for the document with the id 2.", + "SpiderSynQuestion": "List the file type code for the file with the id 2.", + "query": "SELECT document_type_code FROM Documents WHERE document_id = 2;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List the document ids for any documents with the status code done and the type code paper.", + "SpiderSynQuestion": "List the file ids for any files with the status code done and the type code paper.", + "query": "SELECT document_id FROM Documents WHERE document_status_code = \"done\" AND document_type_code = \"Paper\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the name of the shipping agent of the document with id 2?", + "SpiderSynQuestion": "What is the name of the shipping agent of the document with id 2?", + "query": "SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "How many documents were shipped by USPS?", + "SpiderSynQuestion": "How many files were shipped by USPS?", + "query": "SELECT count(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = \"USPS\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.", + "SpiderSynQuestion": "Which shipping agent shipped the most files? List the shipping agent name and the number of files.", + "query": "SELECT Ref_Shipping_Agents.shipping_agent_name , count(distinct Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY count(distinct Documents.document_id) DESC LIMIT 1;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the receipt date of the document with id 3?", + "SpiderSynQuestion": "What is the receipt day of the file with id 3?", + "query": "SELECT receipt_date FROM Documents WHERE document_id = 3;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What address was the document with id 4 mailed to?", + "SpiderSynQuestion": "What locations was the file with id 4 mailed to?", + "query": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is the mail date of the document with id 7?", + "SpiderSynQuestion": "What is the mail day of the file with id 7?", + "query": "SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.", + "SpiderSynQuestion": "List the file ids of files with the status done and type Paper, which not shipped by the shipping agent named USPS.", + "query": "SELECT document_id FROM Documents WHERE document_status_code = \"done\" AND document_type_code = \"Paper\" EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = \"USPS\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.", + "SpiderSynQuestion": "List file id of files status is done and file type is Paper and the file is shipped by shipping agent named USPS.", + "query": "SELECT document_id FROM Documents WHERE document_status_code = \"done\" AND document_type_code = \"Paper\" INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = \"USPS\";" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "What is draft detail of the document with id 7?", + "SpiderSynQuestion": "What is draft detail of the file with id 7?", + "query": "SELECT draft_details FROM Document_Drafts WHERE document_id = 7;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "How many draft copies does the document with id 2 have?", + "SpiderSynQuestion": "How many draft copies does the file with id 2 have?", + "query": "SELECT count(*) FROM Draft_Copies WHERE document_id = 2;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "Which document has the most draft copies? List its document id and number of draft copies.", + "SpiderSynQuestion": "Which file has the most draft copies? List its file id and number of draft copies.", + "query": "SELECT document_id , count(distinct copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(distinct copy_number) DESC LIMIT 1;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "Which documents have more than 1 draft copies? List document id and number of draft copies.", + "SpiderSynQuestion": "Which files have more than 1 draft copies? List file id and number of draft copies.", + "query": "SELECT document_id , count(*) FROM Draft_Copies GROUP BY document_id HAVING count(*) > 1;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List all employees in the circulation history of the document with id 1. List the employee's name.", + "SpiderSynQuestion": "List all staffs in the circulation history of the document with id 1. List the staff's name.", + "query": "SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "List the employees who have not showed up in any circulation history of documents. List the employee's name.", + "SpiderSynQuestion": "List the staffs who have not showed up in any circulation history of documents. List the staff's name.", + "query": "SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.", + "SpiderSynQuestion": "Which staff has showed up in most circulation history documents. List the staff's name and the number of drafts and copies.", + "query": "SELECT Employees.employee_name , count(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id , Circulation_History.draft_number , Circulation_History.copy_number ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "cre_Doc_Control_Systems", + "SpiderQuestion": "For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees.", + "SpiderSynQuestion": "For each file, list the number of employees who have showed up in the circulation history of that file. List the file ids and number of employees.", + "query": "SELECT document_id , count(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;" + }, + { + "db_id": "company_1", + "SpiderQuestion": "List all department names ordered by their starting date.", + "SpiderSynQuestion": "List all division names ordered by their starting date.", + "query": "SELECT dname FROM department ORDER BY mgr_start_date" + }, + { + "db_id": "company_1", + "SpiderQuestion": "find all dependent names who have a spouse relation with some employee.", + "SpiderSynQuestion": "find all dependent names who have a spouse relation with some employee.", + "query": "SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse'" + }, + { + "db_id": "company_1", + "SpiderQuestion": "how many female dependents are there?", + "SpiderSynQuestion": "how many female dependents are there?", + "query": "SELECT count(*) FROM dependent WHERE sex = 'F'" + }, + { + "db_id": "company_1", + "SpiderQuestion": "Find the names of departments that are located in Houston.", + "SpiderSynQuestion": "Find the names of divisions that are located in Houston.", + "query": "SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston'" + }, + { + "db_id": "company_1", + "SpiderQuestion": "Return the first names and last names of employees who earn more than 30000 in salary.", + "SpiderSynQuestion": "Return the full name of employees who earn more than 30000 in salary.", + "query": "SELECT fname , lname FROM employee WHERE salary > 30000" + }, + { + "db_id": "company_1", + "SpiderQuestion": "Find the number of employees of each gender whose salary is lower than 50000.", + "SpiderSynQuestion": "Find the number of staffs of each gender whose salary is lower than 50000.", + "query": "SELECT count(*) , sex FROM employee WHERE salary < 50000 GROUP BY sex" + }, + { + "db_id": "company_1", + "SpiderQuestion": "list the first and last names, and the addresses of all employees in the ascending order of their birth date.", + "SpiderSynQuestion": "list the full name, and the addresses of all employees in the ascending order of their birth date.", + "query": "SELECT fname , lname , address FROM employee ORDER BY Bdate" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "what are the event details of the services that have the type code 'Marriage'?", + "SpiderSynQuestion": "what are the event information of the services that have the type code 'Marriage'?", + "query": "SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage'" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "What are the ids and details of events that have more than one participants?", + "SpiderSynQuestion": "What are the ids and information of events that have more than one participants?", + "query": "SELECT T1.event_id , T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING count(*) > 1" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "How many events have each participants attended? List the participant id, type and the number.", + "SpiderSynQuestion": "How many events have each participators attended? List the participator id, type and the number.", + "query": "SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "What are all the the participant ids, type code and details?", + "SpiderSynQuestion": "What are all the the participator ids, type code and information?", + "query": "SELECT Participant_ID , Participant_Type_Code , Participant_Details FROM Participants" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "How many participants belong to the type 'Organizer'?", + "SpiderSynQuestion": "How many participators belong to the type 'Organizer'?", + "query": "SELECT count(*) FROM participants WHERE participant_type_code = 'Organizer'" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "List the type of the services in alphabetical order.", + "SpiderSynQuestion": "List the type of the services in alphabetical order.", + "query": "SELECT service_type_code FROM services ORDER BY service_type_code" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "List the service id and details for the events.", + "SpiderSynQuestion": "List the service id and information for the events.", + "query": "SELECT service_id , event_details FROM EVENTS" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "How many events had participants whose details had the substring 'Dr.'", + "SpiderSynQuestion": "How many events had participants whose information had the substring 'Dr.'", + "query": "SELECT count(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "What is the most common participant type?", + "SpiderSynQuestion": "What is the most common participator type?", + "query": "SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "Which service id and type has the least number of participants?", + "SpiderSynQuestion": "Which service id and type has the least number of participators?", + "query": "SELECT T3.service_id , T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID = T3.Event_ID JOIN services AS T4 ON T3.service_id = T4.service_id GROUP BY T3.service_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "What is the id of the event with the most participants?", + "SpiderSynQuestion": "What is the id of the event with the most participators?", + "query": "SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?", + "SpiderSynQuestion": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?", + "query": "SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn'" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "Which services type had both successful and failure event details?", + "SpiderSynQuestion": "Which services type had both successful and failure event details?", + "query": "SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail'" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "How many events did not have any participants?", + "SpiderSynQuestion": "How many events did not have any participants?", + "query": "SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)" + }, + { + "db_id": "local_govt_in_alabama", + "SpiderQuestion": "What are all the distinct participant ids who attended any events?", + "SpiderSynQuestion": "What are all the different participator ids who attended any events?", + "query": "SELECT count(DISTINCT participant_id) FROM participants_in_Events" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the name of the race held most recently?", + "SpiderSynQuestion": "What is the name of the race held most recently?", + "query": "SELECT name FROM races ORDER BY date DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the name of the race that occurred most recently?", + "SpiderSynQuestion": "What is the name of the race that occurred most recently?", + "query": "SELECT name FROM races ORDER BY date DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the name and date of the most recent race?", + "SpiderSynQuestion": "What is the name and day of the most recent race?", + "query": "SELECT name , date FROM races ORDER BY date DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the name and date of the race that occurred most recently?", + "SpiderSynQuestion": "What is the name and day of the race that occurred most recently?", + "query": "SELECT name , date FROM races ORDER BY date DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the names of all races held in 2017.", + "SpiderSynQuestion": "Find the names of all races held in 2017.", + "query": "SELECT name FROM races WHERE YEAR = 2017" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of all the races that occurred in the year 2017?", + "SpiderSynQuestion": "What are the names of all the races that occurred in the year 2017?", + "query": "SELECT name FROM races WHERE YEAR = 2017" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the distinct names of all races held between 2014 and 2017?", + "SpiderSynQuestion": "Find the different names of all races held between 2014 and 2017?", + "query": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the unique names of all race held between 2014 and 2017?", + "SpiderSynQuestion": "What are the unique names of all race held between 2014 and 2017?", + "query": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?", + "SpiderSynQuestion": "List the first name and last name of all distinct drivers who once had laptime less than 93000 milliseconds?", + "query": "SELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?", + "SpiderSynQuestion": "What are the first name and last name of all unique drivers who had a lap time of less than 93000 milliseconds?", + "query": "SELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?", + "SpiderSynQuestion": "Find all the different id and nationality of drivers who have had laptime more than 100000 milliseconds?", + "query": "SELECT DISTINCT T1.driverid , T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?", + "SpiderSynQuestion": "What are the different driver ids and nation of all drivers who had a laptime of more than 100000 milliseconds?", + "query": "SELECT DISTINCT T1.driverid , T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the forename and surname of the driver who has the smallest laptime?", + "SpiderSynQuestion": "What are the first name and family name of the driver who has the smallest laptime?", + "query": "SELECT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the forename and surname of the driver with the shortest laptime?", + "SpiderSynQuestion": "What is the first name and family name of the driver with the shortest laptime?", + "query": "SELECT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id and family name of the driver who has the longest laptime?", + "SpiderSynQuestion": "What is the id and family name of the driver who has the longest laptime?", + "query": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id and last name of the driver with the longest laptime?", + "SpiderSynQuestion": "What is the id and last name of the driver with the longest laptime?", + "query": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?", + "SpiderSynQuestion": "What is the id, full name of the driver who had the first position in terms of laptime at least twice?", + "query": "SELECT T1.driverid , T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING count(*) >= 2" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?", + "SpiderSynQuestion": "What is the id, full name of the driver who was in the first position for laptime at least twice?", + "query": "SELECT T1.driverid , T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING count(*) >= 2" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "How many drivers participated in the race Australian Grand Prix held in 2009?", + "SpiderSynQuestion": "How many drivers participated in the race Australian Grand Prix held in 2009?", + "query": "SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = \"Australian Grand Prix\" AND YEAR = 2009" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "How many drivers were in the Australian Grand Prix held in 2009?", + "SpiderSynQuestion": "How many drivers were in the Australian Grand Prix held in 2009?", + "query": "SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = \"Australian Grand Prix\" AND YEAR = 2009" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "How many drivers did not participate in the races held in 2009?", + "SpiderSynQuestion": "How many drivers did not participate in the races held in 2009?", + "query": "SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "How many drivers did not race in 2009?", + "SpiderSynQuestion": "How many drivers did not race in 2009?", + "query": "SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Give me a list of names and years of races that had any driver whose forename is Lewis?", + "SpiderSynQuestion": "Give me a list of names and years of races that had any driver whose forename is Lewis?", + "query": "SELECT T2.name , T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = \"Lewis\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names and years of all races that had a driver with the last name Lewis?", + "SpiderSynQuestion": "What are the names and years of all races that had a driver with the last name Lewis?", + "query": "SELECT T2.name , T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = \"Lewis\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the forename and surname of drivers whose nationality is German?", + "SpiderSynQuestion": "Find the first name and family name of drivers whose nationality is German?", + "query": "SELECT forename , surname FROM drivers WHERE nationality = \"German\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the first and last name of all the German drivers?", + "SpiderSynQuestion": "What is the first and last name of all the German drivers?", + "query": "SELECT forename , surname FROM drivers WHERE nationality = \"German\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?", + "SpiderSynQuestion": "Find the id and first names of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?", + "query": "SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" INTERSECT SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?", + "SpiderSynQuestion": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?", + "query": "SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" INTERSECT SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?", + "SpiderSynQuestion": "What are the full name of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?", + "query": "SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" EXCEPT SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?", + "SpiderSynQuestion": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?", + "query": "SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" EXCEPT SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find all the forenames of distinct drivers who was in position 1 as standing and won?", + "SpiderSynQuestion": "Find all the forenames of different drivers who was in position 1 as standing and won?", + "query": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are all the different first names of the drivers who are in position as standing and won?", + "SpiderSynQuestion": "What are all the different first names of the drivers who are in position as standing and won?", + "query": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?", + "SpiderSynQuestion": "Find all the first name of different drivers who won in position 1 as driver standing and had more than 20 points?", + "query": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?", + "SpiderSynQuestion": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?", + "query": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the numbers of constructors for different nationalities?", + "SpiderSynQuestion": "What are the numbers of constructors for different nations?", + "query": "SELECT count(*) , nationality FROM constructors GROUP BY nationality" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "For each nationality, how many different constructors are there?", + "SpiderSynQuestion": "For each nation, how many different constructors are there?", + "query": "SELECT count(*) , nationality FROM constructors GROUP BY nationality" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the numbers of races for each constructor id?", + "SpiderSynQuestion": "What are the numbers of races for each constructor id?", + "query": "SELECT count(*) , constructorid FROM constructorStandings GROUP BY constructorid" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "For each constructor id, how many races are there?", + "SpiderSynQuestion": "For each constructor id, how many races are there?", + "query": "SELECT count(*) , constructorid FROM constructorStandings GROUP BY constructorid" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?", + "SpiderSynQuestion": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?", + "query": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2017" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of the races held after 2017 in Spain?", + "SpiderSynQuestion": "What are the names of the races held after 2017 in Spain?", + "query": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2017" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the unique names of races that held after 2000 and the circuits were in Spain?", + "SpiderSynQuestion": "What are the unique names of races that held after 2000 and the circuits were in Spain?", + "query": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2000" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of all races held after 2000 in Spain?", + "SpiderSynQuestion": "What are the names of all races held after 2000 in Spain?", + "query": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2000" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.", + "SpiderSynQuestion": "Find the different driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.", + "query": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration < (SELECT max(duration) FROM pitstops WHERE raceid = 841)" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?", + "SpiderSynQuestion": "What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?", + "query": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration < (SELECT max(duration) FROM pitstops WHERE raceid = 841)" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?", + "SpiderSynQuestion": "Find the different driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?", + "query": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration > (SELECT min(duration) FROM pitstops WHERE raceid = 841)" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?", + "SpiderSynQuestion": "What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?", + "query": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration > (SELECT min(duration) FROM pitstops WHERE raceid = 841)" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "List the forenames of all distinct drivers in alphabetical order?", + "SpiderSynQuestion": "List the first names of all different drivers in alphabetical order?", + "query": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the first names of all the different drivers in alphabetical order?", + "SpiderSynQuestion": "What are the first names of all the different drivers in alphabetical order?", + "query": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "List the names of all distinct races in reversed lexicographic order?", + "SpiderSynQuestion": "List the names of all different races in reversed lexicographic order?", + "query": "SELECT DISTINCT name FROM races ORDER BY name DESC" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the different names of all the races in reverse alphabetical order?", + "SpiderSynQuestion": "What are the different names of all the races in reverse alphabetical order?", + "query": "SELECT DISTINCT name FROM races ORDER BY name DESC" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of races held between 2009 and 2011?", + "SpiderSynQuestion": "What are the names of races held between 2009 and 2011?", + "query": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of all races held between 2009 and 2011?", + "SpiderSynQuestion": "What are the names of all races held between 2009 and 2011?", + "query": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of races held after 12:00:00 or before 09:00:00?", + "SpiderSynQuestion": "What are the names of races held after 12:00:00 or before 09:00:00?", + "query": "SELECT name FROM races WHERE TIME > \"12:00:00\" OR TIME < \"09:00:00\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?", + "SpiderSynQuestion": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?", + "query": "SELECT name FROM races WHERE TIME > \"12:00:00\" OR TIME < \"09:00:00\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?", + "SpiderSynQuestion": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?", + "query": "SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 8 UNION SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?", + "SpiderSynQuestion": "What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?", + "query": "SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 8 UNION SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?", + "SpiderSynQuestion": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?", + "query": "SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) = 11 INTERSECT SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?", + "SpiderSynQuestion": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?", + "query": "SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) = 11 INTERSECT SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id and last name of the driver who participated in the most races after 2010?", + "SpiderSynQuestion": "What is the id and last name of the driver who participated in the most races after 2010?", + "query": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id and last name of the driver who participated in the most races after 2010?", + "SpiderSynQuestion": "What is the id and last name of the driver who participated in the most races after 2010?", + "query": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of circuits that belong to UK or Malaysia?", + "SpiderSynQuestion": "What are the names of circuits that belong to UK or Malaysia?", + "query": "SELECT name FROM circuits WHERE country = \"UK\" OR country = \"Malaysia\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of all the circuits that are in the UK or Malaysia?", + "SpiderSynQuestion": "What are the names of all the circuits that are in the UK or Malaysia?", + "query": "SELECT name FROM circuits WHERE country = \"UK\" OR country = \"Malaysia\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the id and location of circuits that belong to France or Belgium?", + "SpiderSynQuestion": "Find the id and city of circuits that belong to France or Belgium?", + "query": "SELECT circuitid , LOCATION FROM circuits WHERE country = \"France\" OR country = \"Belgium\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the ids and locations of all circuits in France or Belgium?", + "SpiderSynQuestion": "What are the ids and cities of all circuits in France or Belgium?", + "query": "SELECT circuitid , LOCATION FROM circuits WHERE country = \"France\" OR country = \"Belgium\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the names of Japanese constructors that have once earned more than 5 points?", + "SpiderSynQuestion": "Find the names of Japanese constructors that have once earned more than 5 points?", + "query": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = \"Japanese\" AND T2.points > 5" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the names of all the Japanese constructors that have earned more than 5 points?", + "SpiderSynQuestion": "What are the names of all the Japanese constructors that have earned more than 5 points?", + "query": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = \"Japanese\" AND T2.points > 5" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", + "SpiderSynQuestion": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", + "query": "SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?", + "SpiderSynQuestion": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?", + "query": "SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", + "SpiderSynQuestion": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", + "query": "SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?", + "SpiderSynQuestion": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?", + "query": "SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?", + "SpiderSynQuestion": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?", + "query": "SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?", + "SpiderSynQuestion": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?", + "query": "SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?", + "SpiderSynQuestion": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?", + "query": "SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?", + "SpiderSynQuestion": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?", + "query": "SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the id, forename and number of races of all drivers who have at least participated in two races?", + "SpiderSynQuestion": "Find the id, first name and number of races of all drivers who have at least participated in two races?", + "query": "SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?", + "SpiderSynQuestion": "What is the id, first name, and number of races for all drivers that have participated in at least 2 races?", + "query": "SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the driver id and number of races of all drivers who have at most participated in 30 races?", + "SpiderSynQuestion": "Find the driver id and number of races of all drivers who have at most participated in 30 races?", + "query": "SELECT T1.driverid , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) <= 30" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "For each id of a driver who participated in at most 30 races, how many races did they participate in?", + "SpiderSynQuestion": "For each id of a driver who participated in at most 30 races, how many races did they participate in?", + "query": "SELECT T1.driverid , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) <= 30" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "Find the id and surname of the driver who participated the most number of races?", + "SpiderSynQuestion": "Find the id and family name of the driver who participated the most number of races?", + "query": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "formula_1", + "SpiderQuestion": "What are the ids and last names of all drivers who participated in the most races?", + "SpiderSynQuestion": "What are the ids and last names of all drivers who participated in the most races?", + "query": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "How many technicians are there?", + "SpiderSynQuestion": "How many technicians are there?", + "query": "SELECT count(*) FROM technician" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What is the number of technicians?", + "SpiderSynQuestion": "What is the number of technicians?", + "query": "SELECT count(*) FROM technician" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "List the names of technicians in ascending order of age.", + "SpiderSynQuestion": "List the names of technicians in ascending order of age.", + "query": "SELECT Name FROM technician ORDER BY Age ASC" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the names of the technicians by ascending order of age?", + "SpiderSynQuestion": "What are the names of the technicians by ascending order of age?", + "query": "SELECT Name FROM technician ORDER BY Age ASC" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the team and starting year of technicians?", + "SpiderSynQuestion": "What are the group and starting year of technicians?", + "query": "SELECT Team , Starting_Year FROM technician" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What is the team and starting year for each technician?", + "SpiderSynQuestion": "What is the group and starting year for each technician?", + "query": "SELECT Team , Starting_Year FROM technician" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "List the name of technicians whose team is not \"NYY\".", + "SpiderSynQuestion": "List the name of technicians whose team is not \"NYY\".", + "query": "SELECT Name FROM technician WHERE Team != \"NYY\"" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What is the name of the technician whose team is not 'NYY'?", + "SpiderSynQuestion": "What is the name of the technician whose team is not 'NYY'?", + "query": "SELECT Name FROM technician WHERE Team != \"NYY\"" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show the name of technicians aged either 36 or 37", + "SpiderSynQuestion": "Show the name of technicians aged either 36 or 37", + "query": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the names of the technicians aged either 36 or 37?", + "SpiderSynQuestion": "What are the names of the technicians aged either 36 or 37?", + "query": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What is the starting year of the oldest technicians?", + "SpiderSynQuestion": "What is the starting year of the oldest technicians?", + "query": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What is the starting year for the oldest technician?", + "SpiderSynQuestion": "What is the starting year for the oldest technician?", + "query": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show different teams of technicians and the number of technicians in each team.", + "SpiderSynQuestion": "Show different group of technicians and the number of technicians in each group.", + "query": "SELECT Team , COUNT(*) FROM technician GROUP BY Team" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "For each team, how many technicians are there?", + "SpiderSynQuestion": "For each group, how many technicians are there?", + "query": "SELECT Team , COUNT(*) FROM technician GROUP BY Team" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Please show the team that has the most number of technicians.", + "SpiderSynQuestion": "Please show the group that has the most number of technicians.", + "query": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the teams with the most technicians?", + "SpiderSynQuestion": "What are the group with the most technicians?", + "query": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show the team that have at least two technicians.", + "SpiderSynQuestion": "Show the group that have at least two technicians.", + "query": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What is the team with at least 2 technicians?", + "SpiderSynQuestion": "What is the group with at least 2 technicians?", + "query": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show names of technicians and series of machines they are assigned to repair.", + "SpiderSynQuestion": "Show names of technicians and series of machines they are assigned to repair.", + "query": "SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the names of technicians and the machine series that they repair?", + "SpiderSynQuestion": "What are the names of technicians and the machine series that they repair?", + "query": "SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show names of technicians in ascending order of quality rank of the machine they are assigned.", + "SpiderSynQuestion": "Show names of technicians in ascending order of quality rank of the machine they are assigned.", + "query": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?", + "SpiderSynQuestion": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?", + "query": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show names of technicians who are assigned to repair machines with value point more than 70.", + "SpiderSynQuestion": "Show names of technicians who are assigned to repair machines with value point more than 70.", + "query": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the names of the technicians that are assigned to repair machines with more point values than 70?", + "SpiderSynQuestion": "What are the names of the technicians that are assigned to repair machines with more point values than 70?", + "query": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show names of technicians and the number of machines they are assigned to repair.", + "SpiderSynQuestion": "Show names of technicians and the number of machines they are assigned to repair.", + "query": "SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the names of the technicians and how many machines are they assigned to repair?", + "SpiderSynQuestion": "What are the names of the technicians and how many machines are they assigned to repair?", + "query": "SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "List the names of technicians who have not been assigned to repair machines.", + "SpiderSynQuestion": "List the names of technicians who have not been assigned to repair machines.", + "query": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the names of the technicians that have not been assigned to repair machines?", + "SpiderSynQuestion": "What are the names of the technicians that have not been assigned to repair machines?", + "query": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "Show the starting years shared by technicians from team \"CLE\" and \"CWS\".", + "SpiderSynQuestion": "Show the starting years shared by technicians from team \"CLE\" and \"CWS\".", + "query": "SELECT Starting_Year FROM technician WHERE Team = \"CLE\" INTERSECT SELECT Starting_Year FROM technician WHERE Team = \"CWS\"" + }, + { + "db_id": "machine_repair", + "SpiderQuestion": "What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"?", + "SpiderSynQuestion": "What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"?", + "query": "SELECT Starting_Year FROM technician WHERE Team = \"CLE\" INTERSECT SELECT Starting_Year FROM technician WHERE Team = \"CWS\"" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "How many entrepreneurs are there?", + "SpiderSynQuestion": "How many enterprisers are there?", + "query": "SELECT count(*) FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Count the number of entrepreneurs.", + "SpiderSynQuestion": "Count the number of enterprisers.", + "query": "SELECT count(*) FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "List the companies of entrepreneurs in descending order of money requested.", + "SpiderSynQuestion": "List the enterprises of entrepreneurs in descending order of money requested.", + "query": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the companies of entrepreneurs, ordered descending by amount of money requested?", + "SpiderSynQuestion": "What are the enterprises of entrepreneurs, ordered descending by amount of money requested?", + "query": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "List the companies and the investors of entrepreneurs.", + "SpiderSynQuestion": "List the enterprises and the investors of entrepreneurs.", + "query": "SELECT Company , Investor FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the companies and investors that correspond to each entrepreneur?", + "SpiderSynQuestion": "What are the enterprises and investors that correspond to each entrepreneur?", + "query": "SELECT Company , Investor FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What is the average money requested by all entrepreneurs?", + "SpiderSynQuestion": "What is the average money required by all enterprisers?", + "query": "SELECT avg(Money_Requested) FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the average money requested across all entrepreneurs.", + "SpiderSynQuestion": "Return the average money required across all enterprisers.", + "query": "SELECT avg(Money_Requested) FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the names of people in ascending order of weight?", + "SpiderSynQuestion": "What are the names of people in ascending order of weight?", + "query": "SELECT Name FROM People ORDER BY Weight ASC" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the names of people, ordered by weight ascending.", + "SpiderSynQuestion": "Return the names of people, ordered by weight ascending.", + "query": "SELECT Name FROM People ORDER BY Weight ASC" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the names of entrepreneurs?", + "SpiderSynQuestion": "What are the names of enterprisers?", + "query": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the names of entrepreneurs.", + "SpiderSynQuestion": "Return the names of enterprisers.", + "query": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the names of entrepreneurs whose investor is not \"Rachel Elnaugh\"?", + "SpiderSynQuestion": "What are the names of enterprisers whose investor is not \"Rachel Elnaugh\"?", + "query": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != \"Rachel Elnaugh\"" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.", + "SpiderSynQuestion": "Return the names of enterprisers do no not have the investor Rachel Elnaugh.", + "query": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != \"Rachel Elnaugh\"" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What is the weight of the shortest person?", + "SpiderSynQuestion": "What is the weight of the shortest person?", + "query": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the weight of the shortest person.", + "SpiderSynQuestion": "Return the weight of the shortest person.", + "query": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What is the name of the entrepreneur with the greatest weight?", + "SpiderSynQuestion": "What is the name of the enterpriser with the greatest weight?", + "query": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the name of the heaviest entrepreneur.", + "SpiderSynQuestion": "Return the name of the heaviest enterpriser.", + "query": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What is the total money requested by entrepreneurs with height more than 1.85?", + "SpiderSynQuestion": "What is the total money requested by enterprisers with height more than 1.85?", + "query": "SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Give the total money requested by entrepreneurs who are taller than 1.85.", + "SpiderSynQuestion": "Give the total money requested by enterprisers who are taller than 1.85.", + "query": "SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the dates of birth of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"?", + "SpiderSynQuestion": "What are the birthday of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"?", + "query": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = \"Simon Woodroffe\" OR T1.Investor = \"Peter Jones\"" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.", + "SpiderSynQuestion": "Return the birthday for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.", + "query": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = \"Simon Woodroffe\" OR T1.Investor = \"Peter Jones\"" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the weights of entrepreneurs in descending order of money requested?", + "SpiderSynQuestion": "What are the weights of enterprisers in descending order of money requested?", + "query": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the weights of entrepreneurs, ordered descending by amount of money requested.", + "SpiderSynQuestion": "Return the weights of enterprisers, ordered descending by amount of money requested.", + "query": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?", + "SpiderSynQuestion": "What are the investors of enterprisers and the corresponding number of enterprisers invested by each investor?", + "query": "SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "How many entrepreneurs correspond to each investor?", + "SpiderSynQuestion": "How many enterprisers correspond to each investor?", + "query": "SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What is the investor that has invested in the most number of entrepreneurs?", + "SpiderSynQuestion": "What is the investor that has invested in the most number of enterprisers?", + "query": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the investor who have invested in the greatest number of entrepreneurs.", + "SpiderSynQuestion": "Return the investor who have invested in the greatest number of enterprisers.", + "query": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the investors that have invested in at least two entrepreneurs?", + "SpiderSynQuestion": "What are the investors that have invested in at least two enterprisers?", + "query": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Return the investors who have invested in two or more entrepreneurs.", + "SpiderSynQuestion": "Return the investors who have invested in two or more enterprisers.", + "query": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "List the names of entrepreneurs and their companies in descending order of money requested?", + "SpiderSynQuestion": "List the names of enterprisers and their enterprise in descending order of money requested?", + "query": "SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?", + "SpiderSynQuestion": "What are the names of enterprisers and their corresponding investors, ordered descending by the amount of money requested?", + "query": "SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "List the names of people that are not entrepreneurs.", + "SpiderSynQuestion": "List the names of people that are not enterprisers.", + "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the names of people who are not entrepreneurs?", + "SpiderSynQuestion": "What are the names of people who are not enterprisers?", + "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.", + "SpiderSynQuestion": "Show the investors shared by enterprisers that requested more than 140000 and enterprisers that requested less than 120000.", + "query": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?", + "SpiderSynQuestion": "What are the investors who have invested in both enterprisers who requested more than 140000 and enterprisers who requested less than 120000?", + "query": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "How many distinct companies are there?", + "SpiderSynQuestion": "How many different enterprises are there?", + "query": "SELECT count(DISTINCT Company) FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Count the number of different companies.", + "SpiderSynQuestion": "Count the number of different enterprises.", + "query": "SELECT count(DISTINCT Company) FROM entrepreneur" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Show the company of the tallest entrepreneur.", + "SpiderSynQuestion": "Show the enterprise of the tallest entrepreneur.", + "query": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1" + }, + { + "db_id": "entrepreneur", + "SpiderQuestion": "Which company was started by the entrepreneur with the greatest height?", + "SpiderSynQuestion": "Which enterprise was started by the entrepreneur with the greatest height?", + "query": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "How many perpetrators are there?", + "SpiderSynQuestion": "How many perpetrators are there?", + "query": "SELECT count(*) FROM perpetrator" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "List the date of perpetrators in descending order of the number of people killed.", + "SpiderSynQuestion": "List the day of perpetrators in descending order of the number of people killed.", + "query": "SELECT Date FROM perpetrator ORDER BY Killed DESC" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "List the number of people injured by perpetrators in ascending order.", + "SpiderSynQuestion": "List the number of people wounded by perpetrators in ascending order.", + "query": "SELECT Injured FROM perpetrator ORDER BY Injured ASC" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What is the average number of people injured by all perpetrators?", + "SpiderSynQuestion": "What is the average number of people wounded by all perpetrators?", + "query": "SELECT avg(Injured) FROM perpetrator" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What is the location of the perpetrator with the largest kills.", + "SpiderSynQuestion": "What is the city of the perpetrator with the largest kills.", + "query": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What are the names of people in ascending order of height?", + "SpiderSynQuestion": "What are the names of people in ascending order of height?", + "query": "SELECT Name FROM People ORDER BY Height ASC" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What are the names of perpetrators?", + "SpiderSynQuestion": "What are the names of perpetrators?", + "query": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What are the names of perpetrators whose country is not \"China\"?", + "SpiderSynQuestion": "What are the names of perpetrators whose country is not \"China\"?", + "query": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country != \"China\"" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What is the name of the perpetrator with the biggest weight.", + "SpiderSynQuestion": "What is the name of the perpetrator with the biggest weight.", + "query": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What is the total kills of the perpetrators with height more than 1.84.", + "SpiderSynQuestion": "What is the total kills of the perpetrators with height more than 1.84.", + "query": "SELECT sum(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What are the names of perpetrators in country \"China\" or \"Japan\"?", + "SpiderSynQuestion": "What are the names of perpetrators in country \"China\" or \"Japan\"?", + "query": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = \"China\" OR T2.Country = \"Japan\"" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What are the heights of perpetrators in descending order of the number of people they injured?", + "SpiderSynQuestion": "What are the stature of perpetrators in descending order of the number of people they injured?", + "query": "SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.", + "SpiderSynQuestion": "What are the nations of perpetrators? Show each nation and the corresponding number of perpetrators there.", + "query": "SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What is the country that has the most perpetrators?", + "SpiderSynQuestion": "What is the nation that has the most perpetrators?", + "query": "SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "What are the countries that have at least two perpetrators?", + "SpiderSynQuestion": "What are the nations that have at least two perpetrators?", + "query": "SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "List the names of perpetrators in descending order of the year.", + "SpiderSynQuestion": "List the names of perpetrators in descending order of the year.", + "query": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "List the names of people that are not perpetrators.", + "SpiderSynQuestion": "List the names of people that are not perpetrators.", + "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM perpetrator)" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.", + "SpiderSynQuestion": "Show the nations that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.", + "query": "SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "How many distinct locations of perpetrators are there?", + "SpiderSynQuestion": "How many different cities of perpetrators are there?", + "query": "SELECT count(DISTINCT LOCATION) FROM perpetrator" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "Show the date of the tallest perpetrator.", + "SpiderSynQuestion": "Show the day of the tallest perpetrator.", + "query": "SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1" + }, + { + "db_id": "perpetrator", + "SpiderQuestion": "In which year did the most recent crime happen?", + "SpiderSynQuestion": "In which year did the most recent crime happen?", + "query": "SELECT max(YEAR) FROM perpetrator;" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Report the name of all campuses in Los Angeles county.", + "SpiderSynQuestion": "Report the name of all universities in Los Angeles county.", + "query": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campuses are located in the county of Los Angeles?", + "SpiderSynQuestion": "What universities are located in the county of Los Angeles?", + "query": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What are the names of all campuses located at Chico?", + "SpiderSynQuestion": "What are the names of all universities located at Chico?", + "query": "SELECT campus FROM campuses WHERE LOCATION = \"Chico\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campuses are located in Chico?", + "SpiderSynQuestion": "What universities are located in Chico?", + "query": "SELECT campus FROM campuses WHERE LOCATION = \"Chico\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find all the campuses opened in 1958.", + "SpiderSynQuestion": "Find all the universities opened in 1958.", + "query": "SELECT campus FROM campuses WHERE YEAR = 1958" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What are the campuses that opened in 1958?", + "SpiderSynQuestion": "What are the universities that opened in 1958?", + "query": "SELECT campus FROM campuses WHERE YEAR = 1958" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find the name of the campuses opened before 1800.", + "SpiderSynQuestion": "Find the name of the universities opened before 1800.", + "query": "SELECT campus FROM campuses WHERE YEAR < 1800" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campuses opened before 1800?", + "SpiderSynQuestion": "What universities opened before 1800?", + "query": "SELECT campus FROM campuses WHERE YEAR < 1800" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Which campus was opened between 1935 and 1939?", + "SpiderSynQuestion": "Which university was opened between 1935 and 1939?", + "query": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campuses opened between 1935 and 1939?", + "SpiderSynQuestion": "What universities opened between 1935 and 1939?", + "query": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.", + "SpiderSynQuestion": "Find the name of the universities that is in Northridge, Los Angeles or in San Francisco, San Francisco.", + "query": "SELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\" UNION SELECT campus FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?", + "SpiderSynQuestion": "What universities are located in Northridge, Los Angeles or in San Francisco, San Francisco?", + "query": "SELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\" UNION SELECT campus FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the campus fee of \"San Jose State University\" in year 1996?", + "SpiderSynQuestion": "What is the campus fee of \"San Jose State University\" in year 1996?", + "query": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND T2.year = 1996" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the campus fee for San Jose State University in 1996?", + "SpiderSynQuestion": "What is the campus fee for San Jose State University in 1996?", + "query": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND T2.year = 1996" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the campus fee of \"San Francisco State University\" in year 1996?", + "SpiderSynQuestion": "What is the campus fee of \"San Francisco State University\" in year 1996?", + "query": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND T2.year = 1996" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the campus fee for San Francisco State University in 1996?", + "SpiderSynQuestion": "What is the campus fee for San Francisco State University in 1996?", + "query": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND T2.year = 1996" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find the count of universities whose campus fee is greater than the average campus fee.", + "SpiderSynQuestion": "Find the count of universities whose campus fee is greater than the average campus fee.", + "query": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many universities have a campus fee higher than average?", + "SpiderSynQuestion": "How many universities have a campus fee higher than average?", + "query": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find the count of universities whose campus fee is greater than the average campus fee.", + "SpiderSynQuestion": "Find the count of universities whose campus fee is greater than the average campus fee.", + "query": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many universities have a campus fee greater than the average?", + "SpiderSynQuestion": "How many universities have a campus fee greater than the average?", + "query": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Which university is in Los Angeles county and opened after 1950?", + "SpiderSynQuestion": "Which university is in Los Angeles county and opened after 1950?", + "query": "SELECT campus FROM campuses WHERE county = \"Los Angeles\" AND YEAR > 1950" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campuses are located in Los Angeles county and opened after 1950?", + "SpiderSynQuestion": "What universities are located in Los Angeles county and opened after 1950?", + "query": "SELECT campus FROM campuses WHERE county = \"Los Angeles\" AND YEAR > 1950" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Which year has the most degrees conferred?", + "SpiderSynQuestion": "Which year has the most degrees conferred?", + "query": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "In what year was the most degrees conferred?", + "SpiderSynQuestion": "In what year was the most degrees conferred?", + "query": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Which campus has the most degrees conferred in all times?", + "SpiderSynQuestion": "Which university has the most degrees conferred in all times?", + "query": "SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campus has the most degrees conferrred over its entire existence?", + "SpiderSynQuestion": "What university has the most degrees conferrred over its entire existence?", + "query": "SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Which campus has the most faculties in year 2003?", + "SpiderSynQuestion": "Which university has the most faculties in year 2003?", + "query": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campus has the most faculties in 2003?", + "SpiderSynQuestion": "What university has the most faculties in 2003?", + "query": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find the average fee on a CSU campus in 1996", + "SpiderSynQuestion": "Find the average fee on a CSU campus in 1996", + "query": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the average fee for a CSU campus in the year of 1996?", + "SpiderSynQuestion": "What is the average fee for a CSU campus in the year of 1996?", + "query": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the average fee on a CSU campus in 2005?", + "SpiderSynQuestion": "What is the average fee on on a CSU campus in 2005?", + "query": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the average fee for a CSU campus in the year of 2005?", + "SpiderSynQuestion": "What is the average fee for a CSU campus in the year of 2005?", + "query": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "report the total number of degrees granted between 1998 and 2002.", + "SpiderSynQuestion": "report the total number of degrees granted between 1998 and 2002.", + "query": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "how many degrees were conferred between 1998 and 2002?", + "SpiderSynQuestion": "how many degrees were conferred between 1998 and 2002?", + "query": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "For each Orange county campus, report the number of degrees granted after 2000.", + "SpiderSynQuestion": "For each Orange county university, report the number of degrees granted after 2000.", + "query": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = \"Orange\" AND T2.year >= 2000 GROUP BY T1.campus" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the total number of degrees granted after 2000 for each Orange county campus?", + "SpiderSynQuestion": "What is the total number of degrees granted after 2000 for each Orange county campus?", + "query": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = \"Orange\" AND T2.year >= 2000 GROUP BY T1.campus" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", + "SpiderSynQuestion": "Find the names of the university which has more faculties in 2002 than every university in Orange county.", + "query": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?", + "SpiderSynQuestion": "What are the names of the university that have more faculties in 2002 than the maximum number in Orange county?", + "query": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?", + "SpiderSynQuestion": "What university had more than 400 total enrollment but more than 200 full time enrollment in year 1956?", + "query": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?", + "SpiderSynQuestion": "What university started in year 1956, has more than 200 full time students, and more than 400 students enrolled?", + "query": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many campuses are there in Los Angeles county?", + "SpiderSynQuestion": "How many universities are there in Los Angeles county?", + "query": "SELECT count(*) FROM campuses WHERE county = \"Los Angeles\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many campuses exist are in the county of LA?", + "SpiderSynQuestion": "How many universities exist are in the county of LA?", + "query": "SELECT count(*) FROM campuses WHERE county = \"Los Angeles\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "List the campuses in Los Angeles county.", + "SpiderSynQuestion": "List the universities in Los Angeles county.", + "query": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What campuses are in Los Angeles county?", + "SpiderSynQuestion": "What universities are in Los Angeles county?", + "query": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many degrees were conferred in \"San Jose State University\" in 2000?", + "SpiderSynQuestion": "How many degrees were conferred in \"San Jose State University\" in 2000?", + "query": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND t2.year = 2000" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many degrees were conferred at San Jose State University in 2000?", + "SpiderSynQuestion": "How many degrees were conferred at San Jose State University in 2000?", + "query": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND t2.year = 2000" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What are the degrees conferred in \"San Francisco State University\" in 2001.", + "SpiderSynQuestion": "What are the degrees conferred in \"San Francisco State University\" in 2001.", + "query": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND t2.year = 2001" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What degrees were conferred in San Francisco State University in the year 2001?", + "SpiderSynQuestion": "What degrees were conferred in San Francisco State University in the year 2001?", + "query": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND t2.year = 2001" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty is there in total in the year of 2002?", + "SpiderSynQuestion": "How many teacher is there in total in the year of 2002?", + "query": "SELECT sum(faculty) FROM faculty WHERE YEAR = 2002" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty, in total, are there in the year 2002?", + "SpiderSynQuestion": "How many teacher, in total, are there in the year 2002?", + "query": "SELECT sum(faculty) FROM faculty WHERE YEAR = 2002" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the number of faculty lines in campus \"Long Beach State University\" in 2002?", + "SpiderSynQuestion": "What is the number of teacher lines in campus \"Long Beach State University\" in 2002?", + "query": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = \"Long Beach State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the number of faculty at Long Beach State University in 2002?", + "SpiderSynQuestion": "What is the number of teacher at Long Beach State University in 2002?", + "query": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = \"Long Beach State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty lines are there in \"San Francisco State University\" in year 2004?", + "SpiderSynQuestion": "How many teacher lines are there in \"San Francisco State University\" in year 2004?", + "query": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = \"San Francisco State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty lines are there at San Francisco State University in 2004?", + "SpiderSynQuestion": "How many teacher lines are there at San Francisco State University in 2004?", + "query": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = \"San Francisco State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "List the campus that have between 600 and 1000 faculty lines in year 2004.", + "SpiderSynQuestion": "List the university that have between 600 and 1000 faculty lines in year 2004.", + "query": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What are the campuses that had between 600 and 1000 faculty members in 2004?", + "SpiderSynQuestion": "What are the universities that had between 600 and 1000 faculty members in 2004?", + "query": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty lines are there in the university that conferred the most number of degrees in year 2002?", + "SpiderSynQuestion": "How many teacher lines are there in the university that conferred the most number of degrees in year 2002?", + "query": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty members did the university that conferred the most degrees in 2002 have?", + "SpiderSynQuestion": "How many teacher members did the university that conferred the most degrees in 2002 have?", + "query": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty lines are there in the university that conferred the least number of degrees in year 2001?", + "SpiderSynQuestion": "How many teacher lines are there in the university that conferred the least number of degrees in year 2001?", + "query": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many faculty members are at the university that gave the least number of degrees in 2001?", + "SpiderSynQuestion": "How many teacher members are at the university that gave the least number of degrees in 2001?", + "query": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many undergraduates are there in \"San Jose State University\" in year 2004?", + "SpiderSynQuestion": "How many undergraduates are there in \"San Jose State University\" in year 2004?", + "query": "SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Jose State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many undergraduates are there at San Jose State", + "SpiderSynQuestion": "How many undergraduates are there at San Jose State", + "query": "SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Jose State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the number of graduates in \"San Francisco State University\" in year 2004?", + "SpiderSynQuestion": "What is the number of graduates in \"San Francisco State University\" in year 2004?", + "query": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many people graduated from San Francisco State University in 2004?", + "SpiderSynQuestion": "How many people graduated from San Francisco State University in 2004?", + "query": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the campus fee of \"San Francisco State University\" in year 2000?", + "SpiderSynQuestion": "What is the campus fee of \"San Francisco State University\" in year 2000?", + "query": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Francisco State University\" AND t1.year = 2000" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "In the year 2000, what is the campus fee for San Francisco State University?", + "SpiderSynQuestion": "In the year 2000, what is the campus fee for San Francisco State University?", + "query": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Francisco State University\" AND t1.year = 2000" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "Find the campus fee of \"San Jose State University\" in year 2000.", + "SpiderSynQuestion": "Find the campus fee of \"San Jose State University\" in year 2000.", + "query": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Jose State University\" AND t1.year = 2000" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the campus fee in the year 2000 for San Jose State University?", + "SpiderSynQuestion": "What is the campus fee in the year 2000 for San Jose State University?", + "query": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Jose State University\" AND t1.year = 2000" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "How many CSU campuses are there?", + "SpiderSynQuestion": "How many CSU universities are there?", + "query": "SELECT count(*) FROM campuses" + }, + { + "db_id": "csu_1", + "SpiderQuestion": "What is the total number of campuses?", + "SpiderSynQuestion": "What is the total number of universities?", + "query": "SELECT count(*) FROM campuses" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "How many candidates are there?", + "SpiderSynQuestion": "How many candidates are there?", + "query": "SELECT count(*) FROM candidate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Count the number of candidates.", + "SpiderSynQuestion": "Count the number of candidates.", + "query": "SELECT count(*) FROM candidate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Which poll resource provided the most number of candidate information?", + "SpiderSynQuestion": "Which poll resource provided the most number of candidate information?", + "query": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Return the poll resource associated with the most candidates.", + "SpiderSynQuestion": "Return the poll resource associated with the most candidates.", + "query": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "what are the top 3 highest support rates?", + "SpiderSynQuestion": "what are the top 3 highest support rates?", + "query": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Return the top 3 greatest support rates.", + "SpiderSynQuestion": "Return the top 3 greatest support rates.", + "query": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Find the id of the candidate who got the lowest oppose rate.", + "SpiderSynQuestion": "Find the id of the candidate who got the lowest oppose rate.", + "query": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What is the id of the candidate with the lowest oppose rate?", + "SpiderSynQuestion": "What is the id of the candidate with the lowest oppose rate?", + "query": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.", + "SpiderSynQuestion": "Please list the rate of support, consideration, and oppose rates for each candidate in ascending order by unsure rate.", + "query": "SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?", + "SpiderSynQuestion": "What are the rates of support, consideration, and oppose rates of each candidate, ordered ascending by their unsure rate?", + "query": "SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "which poll source does the highest oppose rate come from?", + "SpiderSynQuestion": "which poll source does the highest oppose rate come from?", + "query": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Return the poll source corresponding to the candidate who has the oppose rate.", + "SpiderSynQuestion": "Return the poll source corresponding to the candidate who has the oppose rate.", + "query": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "List all people names in the order of their date of birth from old to young.", + "SpiderSynQuestion": "List all people names in the order of their date of birth from old to young.", + "query": "SELECT name FROM people ORDER BY date_of_birth" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the names of all people, ordered by their date of birth?", + "SpiderSynQuestion": "What are the names of all people, ordered by their day of birth?", + "query": "SELECT name FROM people ORDER BY date_of_birth" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Find the average height and weight for all males (sex is M).", + "SpiderSynQuestion": "Find the average stature and weight for all males (sex is M).", + "query": "SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the average height and weight across males (sex is M)?", + "SpiderSynQuestion": "What are the average stature and weight across males (sex is M)?", + "query": "SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "find the names of people who are taller than 200 or lower than 190.", + "SpiderSynQuestion": "find the names of people who are taller than 200 or lower than 190.", + "query": "SELECT name FROM people WHERE height > 200 OR height < 190" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the names of people who have a height greater than 200 or less than 190?", + "SpiderSynQuestion": "What are the names of people who have a height greater than 200 or less than 190?", + "query": "SELECT name FROM people WHERE height > 200 OR height < 190" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Find the average and minimum weight for each gender.", + "SpiderSynQuestion": "Find the average and minimum weight for each gender.", + "query": "SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the average and minimum weights for people of each sex?", + "SpiderSynQuestion": "What are the average and minimum weights for people of each gender?", + "query": "SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Find the name and gender of the candidate who got the highest support rate.", + "SpiderSynQuestion": "Find the name and gender of the candidate who got the highest support rate.", + "query": "SELECT t1.name , t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What is the name and sex of the candidate with the highest support rate?", + "SpiderSynQuestion": "What is the name and gender of the candidate with the highest support rate?", + "query": "SELECT t1.name , t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Find the name of the candidates whose oppose percentage is the lowest for each sex.", + "SpiderSynQuestion": "Find the name of the candidates whose oppose percentage is the lowest for each gender.", + "query": "SELECT t1.name , t1.sex , min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?", + "SpiderSynQuestion": "For each gender, what is the name and gender of the candidate with the oppose rate for their gender?", + "query": "SELECT t1.name , t1.sex , min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "which gender got the highest average uncertain ratio.", + "SpiderSynQuestion": "which gender got the highest average uncertain ratio.", + "query": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What is the sex of the candidate who had the highest unsure rate?", + "SpiderSynQuestion": "What is the gender of the candidate who had the highest unsure rate?", + "query": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "what are the names of people who did not participate in the candidate election.", + "SpiderSynQuestion": "what are the names of people who did not participate in the candidate election.", + "query": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Give the names of people who did not participate in the candidate election.", + "SpiderSynQuestion": "Give the names of people who did not participate in the candidate election.", + "query": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Find the names of the candidates whose support percentage is lower than their oppose rate.", + "SpiderSynQuestion": "Find the names of the candidates whose support percentage is lower than their oppose rate.", + "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the names of candidates who have a lower support rate than oppose rate?", + "SpiderSynQuestion": "What are the names of candidates who have a lower support rate than oppose rate?", + "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "how many people are there whose weight is higher than 85 for each gender?", + "SpiderSynQuestion": "how many people are there whose weight is higher than 85 for each gender?", + "query": "SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Count the number of people of each sex who have a weight higher than 85.", + "SpiderSynQuestion": "Count the number of people of each gender who have a weight higher than 85.", + "query": "SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.", + "SpiderSynQuestion": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.", + "query": "SELECT max(support_rate) , min(consider_rate) , min(oppose_rate) FROM candidate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?", + "SpiderSynQuestion": "Return the maximum support percentage, minimum consider percentage, and minimum oppose percentage across all candidates?", + "query": "SELECT max(support_rate) , min(consider_rate) , min(oppose_rate) FROM candidate" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "list all female (sex is F) candidate names in the alphabetical order.", + "SpiderSynQuestion": "list all female (sex is F) candidate names in the alphabetical order.", + "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the names of all female candidates in alphabetical order (sex is F)?", + "SpiderSynQuestion": "What are the names of all female candidates in alphabetical order (sex is F)?", + "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "find the name of people whose height is lower than the average.", + "SpiderSynQuestion": "find the name of people whose stature is lower than the average.", + "query": "SELECT name FROM people WHERE height < (SELECT avg(height) FROM people)" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What are the names of people who are shorter than average?", + "SpiderSynQuestion": "What are the names of people who are shorter than average?", + "query": "SELECT name FROM people WHERE height < (SELECT avg(height) FROM people)" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "List all info about all people.", + "SpiderSynQuestion": "List all info about all people.", + "query": "SELECT * FROM people" + }, + { + "db_id": "candidate_poll", + "SpiderQuestion": "What is all the information about all people?", + "SpiderSynQuestion": "What is all the information about all people?", + "query": "SELECT * FROM people" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the titles of all movies directed by steven spielberg.", + "SpiderSynQuestion": "Find the titles of all films directed by steven spielberg.", + "query": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all movies directed by Steven Spielberg?", + "SpiderSynQuestion": "What are the names of all films directed by Steven Spielberg?", + "query": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the name of the movie produced after 2000 and directed by James Cameron?", + "SpiderSynQuestion": "What is the name of the film produced after 2000 and directed by James Cameron?", + "query": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles of all movies that James Cameron directed after 2000?", + "SpiderSynQuestion": "What are the titles of all films that James Cameron directed after 2000?", + "query": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "How many movies were made before 2000?", + "SpiderSynQuestion": "How many films were made before 2000?", + "query": "SELECT count(*) FROM Movie WHERE YEAR < 2000" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "How many movies were made before 2000?", + "SpiderSynQuestion": "How many films were made before 2000?", + "query": "SELECT count(*) FROM Movie WHERE YEAR < 2000" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Who is the director of movie Avatar?", + "SpiderSynQuestion": "Who directed movie Avatar?", + "query": "SELECT director FROM Movie WHERE title = 'Avatar'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Who directed Avatar?", + "SpiderSynQuestion": "Who directed Avatar?", + "query": "SELECT director FROM Movie WHERE title = 'Avatar'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "How many reviewers listed?", + "SpiderSynQuestion": "How many reviewers listed?", + "query": "SELECT count(*) FROM Reviewer" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "How many reviewers are there?", + "SpiderSynQuestion": "How many reviewers are there?", + "query": "SELECT count(*) FROM Reviewer" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the id of the reviewer whose name has substring \u201cMike\u201d?", + "SpiderSynQuestion": "What is the id of the reviewer whose name has substring \u201cMike\u201d?", + "query": "SELECT rID FROM Reviewer WHERE name LIKE \"%Mike%\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the id of the reviewer whose name includes the word \"Mike\"?", + "SpiderSynQuestion": "What is the id of the reviewer whose name includes the word \"Mike\"?", + "query": "SELECT rID FROM Reviewer WHERE name LIKE \"%Mike%\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the reviewer id of Daniel Lewis?", + "SpiderSynQuestion": "What is the reviewer id of Daniel Lewis?", + "query": "SELECT rID FROM Reviewer WHERE name = \"Daniel Lewis\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the id of the reviewer named Daniel Lewis?", + "SpiderSynQuestion": "What is the id of the reviewer named Daniel Lewis?", + "query": "SELECT rID FROM Reviewer WHERE name = \"Daniel Lewis\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the total number of ratings that has more than 3 stars?", + "SpiderSynQuestion": "What is the total number of scores that has more than 3 stars?", + "query": "SELECT count(*) FROM Rating WHERE stars > 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "How many movie ratings have more than 3 stars?", + "SpiderSynQuestion": "How many film scores have more than 3 stars?", + "query": "SELECT count(*) FROM Rating WHERE stars > 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the lowest and highest rating star?", + "SpiderSynQuestion": "What is the lowest and highest rating star?", + "query": "SELECT max(stars) , min(stars) FROM Rating" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the maximum and mininum number of stars a rating can receive?", + "SpiderSynQuestion": "What is the maximum and mininum number of stars a rating can receive?", + "query": "SELECT max(stars) , min(stars) FROM Rating" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.", + "SpiderSynQuestion": "Find all years that have a film that received a rating of 4 or 5, and sort them in increasing order of year.", + "query": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?", + "SpiderSynQuestion": "In what years did a film receive a 4 or 5 star rating, and list the years from oldest to most recently?", + "query": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.", + "SpiderSynQuestion": "What are the names of directors who directed movies with 5 star rating? Also return the title of these films.", + "query": "SELECT T1.director , T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?", + "SpiderSynQuestion": "What are the names of the directors who created a film with a 5 star rating, and what was the name of those films?", + "query": "SELECT T1.director , T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the average rating star for each reviewer?", + "SpiderSynQuestion": "What is the average rating star for each reviewer?", + "query": "SELECT T2.name , avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the average number of stars that each reviewer awards for a movie?", + "SpiderSynQuestion": "What is the average number of stars that each reviewer awards for a movie?", + "query": "SELECT T2.name , avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the titles of all movies that have no ratings.", + "SpiderSynQuestion": "Find the titles of all films that have no scores.", + "query": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles of all movies that have not been rated?", + "SpiderSynQuestion": "What are the titles of all films that have not been rated?", + "query": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the names of all reviewers who have ratings with a NULL value for the date.", + "SpiderSynQuestion": "Find the names of all reviewers who have scores with a NULL value for the date.", + "query": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = \"null\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the different names of all reviewers whose ratings do not have a date field?", + "SpiderSynQuestion": "What are the different names of all reviewers whose scores do not have a date field?", + "query": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = \"null\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the average rating stars and title for the oldest movie?", + "SpiderSynQuestion": "What is the average rating stars and title for the oldest movie?", + "query": "SELECT avg(T1.stars) , T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT min(YEAR) FROM Movie)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For the oldest movie listed, what is its average rating and title?", + "SpiderSynQuestion": "For the oldest film listed, what is its average score and title?", + "query": "SELECT avg(T1.stars) , T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT min(YEAR) FROM Movie)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the name of the most recent movie?", + "SpiderSynQuestion": "What is the name of the most recent film?", + "query": "SELECT title FROM Movie WHERE YEAR = (SELECT max(YEAR) FROM Movie)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the title of the newest movie?", + "SpiderSynQuestion": "What is the title of the newest film?", + "query": "SELECT title FROM Movie WHERE YEAR = (SELECT max(YEAR) FROM Movie)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the maximum stars and year for the most recent movie?", + "SpiderSynQuestion": "What is the maximum stars and year for the most recent film?", + "query": "SELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is highest rating for the most recent movie and when was it released?", + "SpiderSynQuestion": "What is highest score for the most recent movie and when was it released?", + "query": "SELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie)" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the names of movies whose created year is after all movies directed by Steven Spielberg?", + "SpiderSynQuestion": "What is the names of films whose created year is after all films directed by Steven Spielberg?", + "query": "SELECT title FROM Movie WHERE YEAR > (SELECT max(YEAR) FROM Movie WHERE director = \"Steven Spielberg\")" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all movies that were created after the most recent Steven Spielberg film?", + "SpiderSynQuestion": "What are the names of all films that were created after the most recent Steven Spielberg film?", + "query": "SELECT title FROM Movie WHERE YEAR > (SELECT max(YEAR) FROM Movie WHERE director = \"Steven Spielberg\")" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?", + "SpiderSynQuestion": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?", + "query": "SELECT T2.title , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = \"James Cameron\")" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?", + "SpiderSynQuestion": "What are the titles and directors of all films that have a score higher than the average James Cameron film score?", + "query": "SELECT T2.title , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = \"James Cameron\")" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.", + "SpiderSynQuestion": "Return reviewer name, film name, stars, and ratingDate. And sort the data first by reviewer name, then by film name, and lastly by number of stars.", + "query": "SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?", + "SpiderSynQuestion": "What is the reviewer name, film name, film rating, and rating day for every film ordered by reviewer name, film name, then finally rating?", + "query": "SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the names of all reviewers who have contributed three or more ratings.", + "SpiderSynQuestion": "Find the names of all reviewers who have contributed three or more scores.", + "query": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all reviewers that have rated 3 or more movies?", + "SpiderSynQuestion": "What are the names of all reviewers that have rated 3 or more movies?", + "query": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the names of all reviewers who rated Gone with the Wind.", + "SpiderSynQuestion": "Find the names of all reviewers who rated Gone with the Wind.", + "query": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all the different reviewers who rates Gone with the Wind?", + "SpiderSynQuestion": "What are the names of all the different reviewers who rates Gone with the Wind?", + "query": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the names of all directors whose movies are rated by Sarah Martinez.", + "SpiderSynQuestion": "Find the names of all directors whose movies are rated by Sarah Martinez.", + "query": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?", + "SpiderSynQuestion": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?", + "query": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.", + "SpiderSynQuestion": "For any score where the name of reviewer is the same as the director of the film, return the reviewer name, film name, and number of stars.", + "query": "SELECT DISTINCT T3.name , T2.title , T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?", + "SpiderSynQuestion": "What are the different reviewer names, film names and stars for every rating where the reviewer had the same name as the director?", + "query": "SELECT DISTINCT T3.name , T2.title , T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Return all reviewer names and movie names together in a single list.", + "SpiderSynQuestion": "Return all reviewer names and film names together in a single list.", + "query": "SELECT name FROM Reviewer UNION SELECT title FROM Movie" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all the reviewers and movie names?", + "SpiderSynQuestion": "What are the names of all the reviewers and film names?", + "query": "SELECT name FROM Reviewer UNION SELECT title FROM Movie" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the titles of all movies not reviewed by Chris Jackson.", + "SpiderSynQuestion": "Find the titles of all films not reviewed by Chris Jackson.", + "query": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles of all movies that were not reviewed by Chris Jackson?", + "SpiderSynQuestion": "What are the titles of all films that were not reviewed by Chris Jackson?", + "query": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson'" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.", + "SpiderSynQuestion": "For all directors who directed more than one film, return the titles of all films directed by them, along with the director name. Sort by director name, then film name.", + "query": "SELECT T1.title , T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title ORDER BY T1.director , T1.title" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For all directors who have directed more than one movie, what movies have they directed and what are their names?", + "SpiderSynQuestion": "For all directors who have directed more than one film, what films have they directed and what are their names?", + "query": "SELECT T1.title , T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title ORDER BY T1.director , T1.title" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.", + "SpiderSynQuestion": "For directors who had more than one film, return the titles and produced years of all films directed by them.", + "query": "SELECT T1.title , T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?", + "SpiderSynQuestion": "For each director who directed more than one film, what are the titles and dates of release for all those films?", + "query": "SELECT T1.title , T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of the directors who made exactly one movie?", + "SpiderSynQuestion": "What are the names of the directors who made exactly one film?", + "query": "SELECT director FROM Movie GROUP BY director HAVING count(*) = 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all directors who made one movie?", + "SpiderSynQuestion": "What are the names of all directors who made one film?", + "query": "SELECT director FROM Movie GROUP BY director HAVING count(*) = 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of the directors who made exactly one movie excluding director NULL?", + "SpiderSynQuestion": "What are the names of the directors who made exactly one film excluding director NULL?", + "query": "SELECT director FROM Movie WHERE director != \"null\" GROUP BY director HAVING count(*) = 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all directors who have made one movie except for the director named NULL?", + "SpiderSynQuestion": "What are the names of all directors who have made one film except for the director named NULL?", + "query": "SELECT director FROM Movie WHERE director != \"null\" GROUP BY director HAVING count(*) = 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "How many movie reviews does each director get?", + "SpiderSynQuestion": "How many film reviews does each director get?", + "query": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For each director, how many reviews have they received?", + "SpiderSynQuestion": "For each director, how many reviews have they received?", + "query": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the movies with the highest average rating. Return the movie titles and average rating.", + "SpiderSynQuestion": "Find the films with the highest average score. Return the film names and average score.", + "query": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the movie titles with the highest average rating and what are those ratings?", + "SpiderSynQuestion": "What are the film names with the highest average score and what are those scores?", + "query": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the movie titles and average rating of the movies with the lowest average rating?", + "SpiderSynQuestion": "What are the film titles and average score of the film with the lowest average score?", + "query": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles and average ratings for all movies that have the lowest average rating?", + "SpiderSynQuestion": "What are the titles and average scores for all films that have the lowest average score?", + "query": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names and years of the movies that has the top 3 highest rating star?", + "SpiderSynQuestion": "What are the names and years of the films that has the top 3 highest rating star?", + "query": "SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names and years released for the movies with the top 3 highest ratings?", + "SpiderSynQuestion": "What are the names and years released for the movies with the top 3 highest scores?", + "query": "SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL.", + "SpiderSynQuestion": "For each director, return the director's name together with the title of the movie they directed that received the highest score among all of their movies, and the value of that score. Ignore movies whose director is NULL.", + "query": "SELECT T2.title , T1.stars , T2.director , max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director != \"null\" GROUP BY director" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For each director, what are the titles and ratings for all the movies they reviewed?", + "SpiderSynQuestion": "For each director, what are the titles and scores for all the movies they reviewed?", + "query": "SELECT T2.title , T1.stars , T2.director , max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director != \"null\" GROUP BY director" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the title and star rating of the movie that got the least rating star for each reviewer.", + "SpiderSynQuestion": "Find the title and star rating of the movie that got the least rating star for each reviewer.", + "query": "SELECT T2.title , T1.rID , T1.stars , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For each reviewer id, what is the title and rating for the movie with the smallest rating?", + "SpiderSynQuestion": "For each reviewer id, what is the title and score for the movie with the smallest score?", + "query": "SELECT T2.title , T1.rID , T1.stars , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the title and score of the movie with the lowest rating among all movies directed by each director.", + "SpiderSynQuestion": "Find the title and score of the film with the lowest rating among all films directed by each director.", + "query": "SELECT T2.title , T1.stars , T2.director , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For each director, what is the title and score of their most poorly rated movie?", + "SpiderSynQuestion": "For each director, what is the title and score of their most poorly rated movie?", + "query": "SELECT T2.title , T1.stars , T2.director , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the name of the movie that is rated by most of times?", + "SpiderSynQuestion": "What is the name of the film that is rated by most of times?", + "query": "SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the name of the movie that has been reviewed the most?", + "SpiderSynQuestion": "What is the name of the film that has been reviewed the most?", + "query": "SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles of all movies that have rating star is between 3 and 5?", + "SpiderSynQuestion": "What are the titles of all movies that have rating star is between 3 and 5?", + "query": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the titles of all movies that have between 3 and 5 stars?", + "SpiderSynQuestion": "What are the titles of all movies that have between 3 and 5 stars?", + "query": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the names of reviewers who had given higher than 3 star ratings.", + "SpiderSynQuestion": "Find the names of reviewers who had given higher than 3 star ratings.", + "query": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of the reviewers who have rated a movie more than 3 stars before?", + "SpiderSynQuestion": "What are the names of the reviewers who have rated a movie more than 3 stars before?", + "query": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the average rating star for each movie that are not reviewed by Brittany Harris.", + "SpiderSynQuestion": "Find the average score star for each movie that are not reviewed by Brittany Harris.", + "query": "SELECT mID , avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\") GROUP BY mID" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What is the average rating for each movie that has never been reviewed by Brittany Harris?", + "SpiderSynQuestion": "What is the average score for each movie that has never been reviewed by Brittany Harris?", + "query": "SELECT mID , avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\") GROUP BY mID" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the ids of the movies that are not reviewed by Brittany Harris.", + "SpiderSynQuestion": "What are the ids of the films that are not reviewed by Brittany Harris.", + "query": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?", + "SpiderSynQuestion": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?", + "query": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\"" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the average rating star for each movie that received at least 2 ratings.", + "SpiderSynQuestion": "Find the average rating star for each film that received at least 2 ratings.", + "query": "SELECT mID , avg(stars) FROM Rating GROUP BY mID HAVING count(*) >= 2" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "For each movie that received more than 3 reviews, what is the average rating?", + "SpiderSynQuestion": "For each film that received more than 3 reviews, what is the average score?", + "query": "SELECT mID , avg(stars) FROM Rating GROUP BY mID HAVING count(*) >= 2" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "find the ids of reviewers who did not give 4 star.", + "SpiderSynQuestion": "find the ids of reviewers who did not give 4 star.", + "query": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the ids of all reviewers who did not give 4 stars?", + "SpiderSynQuestion": "What are the ids of all reviewers who did not give 4 stars?", + "query": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "Find the ids of reviewers who didn't only give 4 star.", + "SpiderSynQuestion": "Find the ids of reviewers who didn't only give 4 star.", + "query": "SELECT rID FROM Rating WHERE stars != 4" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the ids of all reviewers who have not given 4 stars at least once?", + "SpiderSynQuestion": "What are the ids of all reviewers who have not given 4 stars at least once?", + "query": "SELECT rID FROM Rating WHERE stars != 4" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?", + "SpiderSynQuestion": "What are names of the films that are either made after 2000 or reviewed by Brittany Harris?", + "query": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?", + "SpiderSynQuestion": "What are the names of all films that were made after 2000 or reviewed by Brittany Harris?", + "query": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are names of the movies that are either made before 1980 or directed by James Cameron?", + "SpiderSynQuestion": "What are names of the films that are either made before 1980 or directed by James Cameron?", + "query": "SELECT title FROM Movie WHERE director = \"James Cameron\" OR YEAR < 1980" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all movies made before 1980 or had James Cameron as the director?", + "SpiderSynQuestion": "What are the names of all films made before 1980 or had James Cameron as the director?", + "query": "SELECT title FROM Movie WHERE director = \"James Cameron\" OR YEAR < 1980" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of reviewers who had rated 3 star and 4 star?", + "SpiderSynQuestion": "What are the names of reviewers who had rated 3 star and 4 star?", + "query": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all reviewers that have given 3 or 4 stars for reviews?", + "SpiderSynQuestion": "What are the names of all reviewers that have given 3 or 4 stars for reviews?", + "query": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of movies that get 3 star and 4 star?", + "SpiderSynQuestion": "What are the names of films that get 3 star and 4 star?", + "query": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4" + }, + { + "db_id": "movie_1", + "SpiderQuestion": "What are the names of all movies that received 3 or 4 stars?", + "SpiderSynQuestion": "What are the names of all films that received 3 or 4 stars?", + "query": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "How many counties are there?", + "SpiderSynQuestion": "How many counties are there?", + "query": "SELECT count(*) FROM county_public_safety" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Count the number of countries.", + "SpiderSynQuestion": "Count the number of countries.", + "query": "SELECT count(*) FROM county_public_safety" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "List the names of counties in descending order of population.", + "SpiderSynQuestion": "List the names of counties in descending order of population.", + "query": "SELECT Name FROM county_public_safety ORDER BY Population DESC" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the names of the counties of public safety, ordered by population descending?", + "SpiderSynQuestion": "What are the names of the counties of public safety, ordered by population descending?", + "query": "SELECT Name FROM county_public_safety ORDER BY Population DESC" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "List the distinct police forces of counties whose location is not on east side.", + "SpiderSynQuestion": "List the different police forces of counties whose location is not on east side.", + "query": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION != \"East\"" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the different police forces of counties that are not located in the East?", + "SpiderSynQuestion": "What are the different police forces of counties that are not located in the East?", + "query": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION != \"East\"" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the minimum and maximum crime rate of counties?", + "SpiderSynQuestion": "What are the minimum and maximum crime rate of counties?", + "query": "SELECT min(Crime_rate) , max(Crime_rate) FROM county_public_safety" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Return the minimum and maximum crime rates across all counties.", + "SpiderSynQuestion": "Return the minimum and maximum crime rates across all counties.", + "query": "SELECT min(Crime_rate) , max(Crime_rate) FROM county_public_safety" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show the crime rates of counties in ascending order of number of police officers.", + "SpiderSynQuestion": "Show the crime rates of counties in ascending order of number of police officers.", + "query": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the crime rates of counties sorted by number of offices ascending?", + "SpiderSynQuestion": "What are the crime rates of counties sorted by number of offices ascending?", + "query": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the names of cities in ascending alphabetical order?", + "SpiderSynQuestion": "What are the names of towns in ascending alphabetical order?", + "query": "SELECT Name FROM city ORDER BY Name ASC" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Return the names of cities, ordered alphabetically.", + "SpiderSynQuestion": "Return the names of towns, ordered alphabetically.", + "query": "SELECT Name FROM city ORDER BY Name ASC" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the percentage of hispanics in cities with the black percentage higher than 10?", + "SpiderSynQuestion": "What are the percentage of hispanics in towns with the black percentage higher than 10?", + "query": "SELECT Hispanic FROM city WHERE Black > 10" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Return the hispanic percentage for cities in which the black percentage is greater than 10.", + "SpiderSynQuestion": "Return the hispanic percentage for towns in which the black percentage is greater than 10.", + "query": "SELECT Hispanic FROM city WHERE Black > 10" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "List the name of the county with the largest population.", + "SpiderSynQuestion": "List the name of the county with the largest population.", + "query": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What is the name of the county with the greatest population?", + "SpiderSynQuestion": "What is the name of the county with the greatest population?", + "query": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "List the names of the city with the top 5 white percentages.", + "SpiderSynQuestion": "List the names of the town with the top 5 white percentages.", + "query": "SELECT Name FROM city ORDER BY White DESC LIMIT 5" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the names of the five cities with the greatest proportion of white people?", + "SpiderSynQuestion": "What are the names of the five towns with the greatest proportion of white people?", + "query": "SELECT Name FROM city ORDER BY White DESC LIMIT 5" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show names of cities and names of counties they are in.", + "SpiderSynQuestion": "Show names of towns and names of counties they are in.", + "query": "SELECT T1.Name , T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the names of cities, as well as the names of the counties they correspond to?", + "SpiderSynQuestion": "What are the names of towns, as well as the names of the counties they correspond to?", + "query": "SELECT T1.Name , T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show white percentages of cities and the crime rates of counties they are in.", + "SpiderSynQuestion": "Show percentages of caucasian in the cities and the crime rates of counties they are in.", + "query": "SELECT T1.White , T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?", + "SpiderSynQuestion": "What are the percentages of caucasian in the cities, and the corresponding crime rates of the counties they correspond to?", + "query": "SELECT T1.White , T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show the name of cities in the county that has the largest number of police officers.", + "SpiderSynQuestion": "Show the name of towns in the county that has the largest number of police officers.", + "query": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the names of cities that are in the county with the most police officers?", + "SpiderSynQuestion": "What are the names of towns that are in the county with the most police officers?", + "query": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show the number of cities in counties that have a population more than 20000.", + "SpiderSynQuestion": "Show the number of towns in counties that have a population more than 20000.", + "query": "SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "How many cities are in counties that have populations of over 20000?", + "SpiderSynQuestion": "How many towns are in counties that have populations of over 20000?", + "query": "SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show the crime rate of counties with a city having white percentage more than 90.", + "SpiderSynQuestion": "Show the crime rate of counties with a city having white percentage more than 90.", + "query": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the crime rates of counties that contain cities that have white percentages of over 90?", + "SpiderSynQuestion": "What are the crime rates of counties that contain cities that have white percentages of over 90?", + "query": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Please show the police forces and the number of counties with each police force.", + "SpiderSynQuestion": "Please show the police forces and the number of counties with each police force.", + "query": "SELECT Police_force , COUNT(*) FROM county_public_safety GROUP BY Police_force" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "How many counties correspond to each police force?", + "SpiderSynQuestion": "How many counties correspond to each police force?", + "query": "SELECT Police_force , COUNT(*) FROM county_public_safety GROUP BY Police_force" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What is the location shared by most counties?", + "SpiderSynQuestion": "What is the position shared by most counties?", + "query": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Which location has the most corresponding counties?", + "SpiderSynQuestion": "Which position has the most corresponding counties?", + "query": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "List the names of counties that do not have any cities.", + "SpiderSynQuestion": "List the names of counties that do not have any towns.", + "query": "SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the names of counties that do not contain any cities?", + "SpiderSynQuestion": "What are the names of counties that do not contain any towns?", + "query": "SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show the police force shared by counties with location on the east and west.", + "SpiderSynQuestion": "Show the police force shared by counties with position on the east and west.", + "query": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Which police forces operate in both counties that are located in the East and in the West?", + "SpiderSynQuestion": "Which police forces operate in both counties that are located in the East and in the West?", + "query": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show the names of cities in counties that have a crime rate less than 100.", + "SpiderSynQuestion": "Show the names of towns in counties that have a crime rate less than 100.", + "query": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the names of cities that are in counties that have a crime rate below 100?", + "SpiderSynQuestion": "What are the names of towns that are in counties that have a crime rate below 100?", + "query": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "Show the case burden of counties in descending order of population.", + "SpiderSynQuestion": "Show the case burden of counties in descending order of population.", + "query": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC" + }, + { + "db_id": "county_public_safety", + "SpiderQuestion": "What are the case burdens of counties, ordered descending by population?", + "SpiderSynQuestion": "What are the case burdens of counties, ordered descending by the number of people?", + "query": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the names of all modern rooms with a base price below $160 and two beds.", + "SpiderSynQuestion": "Find the names of all modern rooms with a base price below $160 and two beds.", + "query": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the names of modern rooms that have a base price lower than $160 and two beds.", + "SpiderSynQuestion": "What are the names of modern rooms that have a base price lower than $160 and two beds.", + "query": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.", + "SpiderSynQuestion": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.", + "query": "SELECT roomName , RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.", + "SpiderSynQuestion": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.", + "query": "SELECT roomName , RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.", + "SpiderSynQuestion": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.", + "query": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Which room has the largest number of reservations?", + "SpiderSynQuestion": "Which room has the most people booked?", + "query": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many kids stay in the rooms reserved by ROY SWEAZY?", + "SpiderSynQuestion": "How many children stay in the rooms reserved by ROY SWEAZY?", + "query": "SELECT kids FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.", + "SpiderSynQuestion": "Find the number of children staying in the rooms reserved by a person called ROY SWEAZ.", + "query": "SELECT kids FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many times does ROY SWEAZY has reserved a room.", + "SpiderSynQuestion": "How many times does ROY SWEAZY has booked a room.", + "query": "SELECT count(*) FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of times ROY SWEAZY has reserved a room.", + "SpiderSynQuestion": "Find the number of times ROY SWEAZY has booked a room.", + "query": "SELECT count(*) FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Which room has the highest rate? List the room's full name, rate, check in and check out date.", + "SpiderSynQuestion": "Which room has the highest rate? List the room's full name, rate, check in and check out date.", + "query": "SELECT T2.roomName , T1.Rate , T1.CheckIn , T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Return the name, rate, check in and check out date for the room with the highest rate.", + "SpiderSynQuestion": "Return the name, rate, check in and check out date for the room with the highest rate.", + "query": "SELECT T2.roomName , T1.Rate , T1.CheckIn , T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?", + "SpiderSynQuestion": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?", + "query": "SELECT Adults FROM Reservations WHERE CheckIn = \"2010-10-23\" AND FirstName = \"CONRAD\" AND LastName = \"SELBIG\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.", + "SpiderSynQuestion": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.", + "query": "SELECT Adults FROM Reservations WHERE CheckIn = \"2010-10-23\" AND FirstName = \"CONRAD\" AND LastName = \"SELBIG\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?", + "SpiderSynQuestion": "How many children stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?", + "query": "SELECT Kids FROM Reservations WHERE CheckIn = \"2010-09-21\" AND FirstName = \"DAMIEN\" AND LastName = \"TRACHSEL\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.", + "SpiderSynQuestion": "Return the number of children for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.", + "query": "SELECT Kids FROM Reservations WHERE CheckIn = \"2010-09-21\" AND FirstName = \"DAMIEN\" AND LastName = \"TRACHSEL\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many king beds are there?", + "SpiderSynQuestion": "How many king beds are there?", + "query": "SELECT sum(beds) FROM Rooms WHERE bedtype = 'King';" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the total number of king beds available.", + "SpiderSynQuestion": "Find the total number of king beds available.", + "query": "SELECT sum(beds) FROM Rooms WHERE bedtype = 'King';" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "List the names and decor of rooms that have a king bed. Sort the list by their price.", + "SpiderSynQuestion": "List the names and decoration of rooms that have a king bed. Sort the list by their price.", + "query": "SELECT roomName , decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the names and decor of rooms with a king bed? Sort them by their price", + "SpiderSynQuestion": "What are the names and decoration of rooms with a king bed? Sort them by their price", + "query": "SELECT roomName , decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Which room has cheapest base price? List the room's name and the base price.", + "SpiderSynQuestion": "Which room has cheapest base price? List the room's name and the base price.", + "query": "SELECT roomName , basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the room name and base price of the room with the lowest base price?", + "SpiderSynQuestion": "What are the room name and base price of the room with the lowest base price?", + "query": "SELECT roomName , basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the decor of room Recluse and defiance?", + "SpiderSynQuestion": "What is the decoration of room Recluse and defiance?", + "query": "SELECT decor FROM Rooms WHERE roomName = \"Recluse and defiance\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Return the decor of the room named \"Recluse and defiance\".", + "SpiderSynQuestion": "Return the decoration of the room named \"Recluse and defiance\".", + "query": "SELECT decor FROM Rooms WHERE roomName = \"Recluse and defiance\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the average base price of different bed type? List bed type and average base price.", + "SpiderSynQuestion": "What is the average base price of different bed type? List bed type and average base price.", + "query": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "For each bed type, find the average base price of different bed type.", + "SpiderSynQuestion": "For each bed type, find the average base price of different bed type.", + "query": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the total number of people who could stay in the modern rooms in this inn?", + "SpiderSynQuestion": "What is the total number of people who could stay in the modern rooms in this inn?", + "query": "SELECT sum(maxOccupancy) FROM Rooms WHERE decor = 'modern';" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many people in total can stay in the modern rooms of this inn?", + "SpiderSynQuestion": "How many people in total can stay in the modern rooms of this inn?", + "query": "SELECT sum(maxOccupancy) FROM Rooms WHERE decor = 'modern';" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What kind of decor has the least number of reservations?", + "SpiderSynQuestion": "What kind of decoration has the least number of reservations?", + "query": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the least popular kind of decor?", + "SpiderSynQuestion": "What is the least popular kind of decoration?", + "query": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.", + "SpiderSynQuestion": "List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.", + "query": "SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many times the number of adults and kids staying in a room reached the maximum capacity of the room?", + "SpiderSynQuestion": "How many times the number of adults and kids staying in a room reached the maximum the number of seats of the room?", + "query": "SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the first and last names of people who payed more than the rooms' base prices.", + "SpiderSynQuestion": "Find the full name of people who payed more than the rooms' base prices.", + "query": "SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the first and last names of people who payed more than the rooms' base prices?", + "SpiderSynQuestion": "What are the full name of people who payed more than the rooms' base prices?", + "query": "SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many rooms are there?", + "SpiderSynQuestion": "How many rooms are there?", + "query": "SELECT count(*) FROM Rooms;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the total number of rooms available in this inn?", + "SpiderSynQuestion": "What is the total number of rooms available in this inn?", + "query": "SELECT count(*) FROM Rooms;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of rooms with a king bed.", + "SpiderSynQuestion": "Find the number of rooms with a king bed.", + "query": "SELECT count(*) FROM Rooms WHERE bedType = \"King\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many rooms have a king bed?", + "SpiderSynQuestion": "How many rooms have a king bed?", + "query": "SELECT count(*) FROM Rooms WHERE bedType = \"King\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of rooms for each bed type.", + "SpiderSynQuestion": "Find the number of rooms for each bed type.", + "query": "SELECT bedType , count(*) FROM Rooms GROUP BY bedType;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the number of rooms for each bed type?", + "SpiderSynQuestion": "What are the number of rooms for each bed type?", + "query": "SELECT bedType , count(*) FROM Rooms GROUP BY bedType;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the name of the room with the maximum occupancy.", + "SpiderSynQuestion": "Find the name of the room with the maximum occupancy.", + "query": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the name of the room that can accommodate the most people?", + "SpiderSynQuestion": "What is the name of the room that can accommodate the most people?", + "query": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the id and name of the most expensive base price room.", + "SpiderSynQuestion": "Find the id and name of the most expensive base price room.", + "query": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Which room has the highest base price?", + "SpiderSynQuestion": "Which room has the highest base price?", + "query": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "List the type of bed and name of all traditional rooms.", + "SpiderSynQuestion": "List the type of bed and name of all traditional rooms.", + "query": "SELECT roomName , bedType FROM Rooms WHERE decor = \"traditional\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the bed type and name of all the rooms with traditional decor?", + "SpiderSynQuestion": "What are the bed type and name of all the rooms with traditional decor?", + "query": "SELECT roomName , bedType FROM Rooms WHERE decor = \"traditional\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of rooms with king bed for each decor type.", + "SpiderSynQuestion": "Find the number of rooms with king bed for each decoration type.", + "query": "SELECT decor , count(*) FROM Rooms WHERE bedType = \"King\" GROUP BY decor;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many rooms have king beds? Report the number for each decor type.", + "SpiderSynQuestion": "How many rooms have king beds? Report the number for each decoration type.", + "query": "SELECT decor , count(*) FROM Rooms WHERE bedType = \"King\" GROUP BY decor;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the average and minimum price of the rooms in different decor.", + "SpiderSynQuestion": "Find the average and minimum price of the rooms in different decoration.", + "query": "SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the average minimum and price of the rooms for each different decor.", + "SpiderSynQuestion": "What is the average minimum and price of the rooms for each different decoration.", + "query": "SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "List the name of all rooms sorted by their prices.", + "SpiderSynQuestion": "List the name of all rooms sorted by their prices.", + "query": "SELECT roomName FROM Rooms ORDER BY basePrice;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Sort all the rooms according to the price. Just report the room names.", + "SpiderSynQuestion": "Sort all the rooms according to the price. Just report the room names.", + "query": "SELECT roomName FROM Rooms ORDER BY basePrice;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of rooms with price higher than 120 for different decor.", + "SpiderSynQuestion": "Find the number of rooms with price higher than 120 for different decoration.", + "query": "SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many rooms cost more than 120, for each different decor?", + "SpiderSynQuestion": "How many rooms cost more than 120, for each different decoration?", + "query": "SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "For each bed type, find the average room price.", + "SpiderSynQuestion": "For each bed type, find the average room price.", + "query": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What is the average base price of rooms, for each bed type?", + "SpiderSynQuestion": "What is the average base price of rooms, for each bed type?", + "query": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "List the name of rooms with king or queen bed.", + "SpiderSynQuestion": "List the name of rooms with king or queen bed.", + "query": "SELECT roomName FROM Rooms WHERE bedType = \"King\" OR bedType = \"Queen\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the names of rooms that have either king or queen bed?", + "SpiderSynQuestion": "What are the names of rooms that have either king or queen bed?", + "query": "SELECT roomName FROM Rooms WHERE bedType = \"King\" OR bedType = \"Queen\";" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many different types of beds are there?", + "SpiderSynQuestion": "How many different types of beds are there?", + "query": "SELECT count(DISTINCT bedType) FROM Rooms;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of distinct bed types available in this inn.", + "SpiderSynQuestion": "Find the number of different bed types available in this inn.", + "query": "SELECT count(DISTINCT bedType) FROM Rooms;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the name and id of the top 3 expensive rooms.", + "SpiderSynQuestion": "Find the name and id of the top 3 expensive rooms.", + "query": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the name and id of the three highest priced rooms?", + "SpiderSynQuestion": "What are the name and id of the three highest priced rooms?", + "query": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the name of rooms whose price is higher than the average price.", + "SpiderSynQuestion": "Find the name of rooms whose price is higher than the average price.", + "query": "SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the name of rooms that cost more than the average.", + "SpiderSynQuestion": "What are the name of rooms that cost more than the average.", + "query": "SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the number of rooms that do not have any reservation.", + "SpiderSynQuestion": "Find the number of rooms that do not have any reservation.", + "query": "SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "How many rooms have not had any reservation yet?", + "SpiderSynQuestion": "How many rooms have not had any reservation yet?", + "query": "SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Return the name and number of reservations made for each of the rooms.", + "SpiderSynQuestion": "Return the name and number of reservations made for each of the rooms.", + "query": "SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "For each room, find its name and the number of times reservations were made for it.", + "SpiderSynQuestion": "For each room, find its name and the number of times reservations were made for it.", + "query": "SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the names of rooms that have been reserved for more than 60 times.", + "SpiderSynQuestion": "Find the names of rooms that have been reserved for more than 60 times.", + "query": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the names of rooms whose reservation frequency exceeds 60 times?", + "SpiderSynQuestion": "What are the names of rooms whose reservation frequency exceeds 60 times?", + "query": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the name of rooms whose base price is between 120 and 150.", + "SpiderSynQuestion": "Find the name of rooms whose base price is between 120 and 150.", + "query": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Which rooms cost between 120 and 150? Give me the room names.", + "SpiderSynQuestion": "Which rooms cost between 120 and 150? Give me the room names.", + "query": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "Find the name of rooms booked by some customers whose first name contains ROY.", + "SpiderSynQuestion": "Find the name of rooms booked by some customers whose forename contains ROY.", + "query": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'" + }, + { + "db_id": "inn_1", + "SpiderQuestion": "What are the name of rooms booked by customers whose first name has \"ROY\" in part?", + "SpiderSynQuestion": "What are the name of rooms booked by customers whose forename has \"ROY\" in part?", + "query": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "what are the details of the cmi masters that have the cross reference code 'Tax'?", + "SpiderSynQuestion": "what are the information of the cmi masters that have the cross reference code 'Tax'?", + "query": "SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax'" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code.", + "SpiderSynQuestion": "What is the cmi cross-reference id that is related to at least one council tax entry? List the cross reference id and source system code.", + "query": "SELECT T1.cmi_cross_ref_id , T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*) >= 1" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n", + "SpiderSynQuestion": "How many business rates are related to each cmi cross reference? List cross-reference id, master customer id and the n", + "query": "SELECT T2.cmi_cross_ref_id , T2.master_customer_id , count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.", + "SpiderSynQuestion": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.", + "query": "SELECT T1.source_system_code , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?", + "SpiderSynQuestion": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?", + "query": "SELECT T1.source_system_code , T1.master_customer_id , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?", + "SpiderSynQuestion": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?", + "query": "SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details != 'Schmidt , Kertzmann and Lubowitz'" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?", + "SpiderSynQuestion": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?", + "query": "SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax'" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "How many different source system code for the cmi cross references are there?", + "SpiderSynQuestion": "How many different source system code for the cmi cross-references are there?", + "query": "SELECT count(DISTINCT source_system_code) FROM CMI_cross_references" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "List all information about customer master index, and sort them by details in descending order.", + "SpiderSynQuestion": "List all information about customer master index, and sort them by details in descending order.", + "query": "SELECT * FROM customer_master_index ORDER BY cmi_details DESC" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "List the council tax ids and their related cmi cross references of all the parking fines.", + "SpiderSynQuestion": "List the council tax ids and their related cmi cross-references of all the parking fines.", + "query": "SELECT council_tax_id , cmi_cross_ref_id FROM parking_fines" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "How many council taxes are collected for renting arrears ?", + "SpiderSynQuestion": "How many council taxes are collected for renting arrears ?", + "query": "SELECT count(*) FROM rent_arrears" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?", + "SpiderSynQuestion": "What are the different cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?", + "query": "SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman'" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "Which cmi cross reference id is not related to any parking taxes?", + "SpiderSynQuestion": "Which cmi cross-reference id is not related to any parking taxes?", + "query": "SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines" + }, + { + "db_id": "local_govt_mdm", + "SpiderQuestion": "Which distinct source system code includes the substring 'en'?", + "SpiderSynQuestion": "Which different source system code includes the substring 'en'?", + "query": "SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'" + }, + { + "db_id": "party_host", + "SpiderQuestion": "How many parties are there?", + "SpiderSynQuestion": "How many parties are there?", + "query": "SELECT count(*) FROM party" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Count the number of parties.", + "SpiderSynQuestion": "Count the number of parties.", + "query": "SELECT count(*) FROM party" + }, + { + "db_id": "party_host", + "SpiderQuestion": "List the themes of parties in ascending order of number of hosts.", + "SpiderSynQuestion": "List the topics of parties in ascending order of number of hosts.", + "query": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC" + }, + { + "db_id": "party_host", + "SpiderQuestion": "What are the themes of parties ordered by the number of hosts in ascending manner?", + "SpiderSynQuestion": "What are the topics of parties ordered by the number of hosts in ascending manner?", + "query": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC" + }, + { + "db_id": "party_host", + "SpiderQuestion": "What are the themes and locations of parties?", + "SpiderSynQuestion": "What are the topics and addresses of parties?", + "query": "SELECT Party_Theme , LOCATION FROM party" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Give me the theme and location of each party.", + "SpiderSynQuestion": "Give me the topic and address of each party.", + "query": "SELECT Party_Theme , LOCATION FROM party" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the first year and last year of parties with theme \"Spring\" or \"Teqnology\".", + "SpiderSynQuestion": "Show the first and last year of parties with theme \"Spring\" or \"Teqnology\".", + "query": "SELECT First_year , Last_year FROM party WHERE Party_Theme = \"Spring\" OR Party_Theme = \"Teqnology\"" + }, + { + "db_id": "party_host", + "SpiderQuestion": "What are the first year and last year of the parties whose theme is \"Spring\" or \"Teqnology\"?", + "SpiderSynQuestion": "What are the first year and last year of the parties whose theme is \"Spring\" or \"Teqnology\"?", + "query": "SELECT First_year , Last_year FROM party WHERE Party_Theme = \"Spring\" OR Party_Theme = \"Teqnology\"" + }, + { + "db_id": "party_host", + "SpiderQuestion": "What is the average number of hosts for parties?", + "SpiderSynQuestion": "What is the average number of hosts for parties?", + "query": "SELECT avg(Number_of_hosts) FROM party" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Compute the average number of hosts for parties.", + "SpiderSynQuestion": "Compute the average number of hosts for parties.", + "query": "SELECT avg(Number_of_hosts) FROM party" + }, + { + "db_id": "party_host", + "SpiderQuestion": "What is the location of the party with the most hosts?", + "SpiderSynQuestion": "What is the address of the party with the most hosts?", + "query": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Which party had the most hosts? Give me the party location.", + "SpiderSynQuestion": "Which party had the most hosts? Give me the party address.", + "query": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show different nationalities along with the number of hosts of each nationality.", + "SpiderSynQuestion": "Show different nation along with the number of hosts of each nation.", + "query": "SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality" + }, + { + "db_id": "party_host", + "SpiderQuestion": "How many hosts does each nationality have? List the nationality and the count.", + "SpiderSynQuestion": "How many hosts does each nation have? List the nation and the count.", + "query": "SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the most common nationality of hosts.", + "SpiderSynQuestion": "Show the most common nation of hosts.", + "query": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Which nationality has the most hosts?", + "SpiderSynQuestion": "Which nation has the most hosts?", + "query": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the nations that have both hosts older than 45 and hosts younger than 35.", + "SpiderSynQuestion": "Show the nations that have both hosts older than 45 and hosts younger than 35.", + "query": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Which nations have both hosts of age above 45 and hosts of age below 35?", + "SpiderSynQuestion": "Which nations have both hosts of age above 45 and hosts of age below 35?", + "query": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the themes of parties and the names of the party hosts.", + "SpiderSynQuestion": "Show the topics of parties and the names of the party hosts.", + "query": "SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID" + }, + { + "db_id": "party_host", + "SpiderQuestion": "For each party, return its theme and the name of its host.", + "SpiderSynQuestion": "For each party, return its topic and the name of its host.", + "query": "SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the locations of parties and the names of the party hosts in ascending order of the age of the host.", + "SpiderSynQuestion": "Show the addresses of parties and the names of the party hosts in ascending order of the age of the host.", + "query": "SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age" + }, + { + "db_id": "party_host", + "SpiderQuestion": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.", + "SpiderSynQuestion": "For each party, find its address and the name of its host. Sort the result in ascending order of the age of the host.", + "query": "SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the locations of parties with hosts older than 50.", + "SpiderSynQuestion": "Show the addresses of parties with hosts older than 50.", + "query": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Which parties have hosts of age above 50? Give me the party locations.", + "SpiderSynQuestion": "Which parties have hosts of age above 50? Give me the party addresses.", + "query": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the host names for parties with number of hosts greater than 20.", + "SpiderSynQuestion": "Show the host names for parties with number of hosts greater than 20.", + "query": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Which parties have more than 20 hosts? Give me the host names for these parties.", + "SpiderSynQuestion": "Which parties have more than 20 hosts? Give me the host names for these parties.", + "query": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20" + }, + { + "db_id": "party_host", + "SpiderQuestion": "Show the name and the nationality of the oldest host.", + "SpiderSynQuestion": "Show the name and the nation of the oldest host.", + "query": "SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "party_host", + "SpiderQuestion": "What are the name and the nationality of the host of the highest age?", + "SpiderSynQuestion": "What are the name and the nation of the host of the highest age?", + "query": "SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "party_host", + "SpiderQuestion": "List the names of hosts who did not serve as a host of any party in our record.", + "SpiderSynQuestion": "List the names of hosts who did not serve as a host of any party in our record.", + "query": "SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)" + }, + { + "db_id": "party_host", + "SpiderQuestion": "What are the names of hosts who did not host any party in our record?", + "SpiderSynQuestion": "What are the names of hosts who did not host any party in our record?", + "query": "SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "How many regions do we have?", + "SpiderSynQuestion": "How many districts do we have?", + "query": "SELECT count(*) FROM region" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Count the number of regions.", + "SpiderSynQuestion": "Count the number of districts.", + "query": "SELECT count(*) FROM region" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show all region code and region name sorted by the codes.", + "SpiderSynQuestion": "Show all district code and district name sorted by the codes.", + "query": "SELECT region_code , region_name FROM region ORDER BY region_code" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the codes and names for all regions, sorted by codes?", + "SpiderSynQuestion": "What are the codes and names for all districts, sorted by codes?", + "query": "SELECT region_code , region_name FROM region ORDER BY region_code" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "List all region names in alphabetical order.", + "SpiderSynQuestion": "List all district names in alphabetical order.", + "query": "SELECT region_name FROM region ORDER BY region_name" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of the regions in alphabetical order?", + "SpiderSynQuestion": "What are the names of the districts in alphabetical order?", + "query": "SELECT region_name FROM region ORDER BY region_name" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show names for all regions except for Denmark.", + "SpiderSynQuestion": "Show names for all districts except for Denmark.", + "query": "SELECT region_name FROM region WHERE region_name != 'Denmark'" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Return the names of all regions other than Denmark.", + "SpiderSynQuestion": "Return the names of all districts other than Denmark.", + "query": "SELECT region_name FROM region WHERE region_name != 'Denmark'" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "How many storms had death records?", + "SpiderSynQuestion": "How many windstorm had death records?", + "query": "SELECT count(*) FROM storm WHERE Number_Deaths > 0" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Count the number of storms in which at least 1 person died.", + "SpiderSynQuestion": "Count the number of windstorm in which at least 1 person died.", + "query": "SELECT count(*) FROM storm WHERE Number_Deaths > 0" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "List name, dates active, and number of deaths for all storms with at least 1 death.", + "SpiderSynQuestion": "List name, dates active, and number of deaths for all windstorms with at least 1 death.", + "query": "SELECT name , dates_active , number_deaths FROM storm WHERE number_deaths >= 1" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names, dates active, and number of deaths for storms that had 1 or more death?", + "SpiderSynQuestion": "What are the names, dates active, and number of deaths for windstorms that had 1 or more death?", + "query": "SELECT name , dates_active , number_deaths FROM storm WHERE number_deaths >= 1" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show the average and maximum damage for all storms with max speed higher than 1000.", + "SpiderSynQuestion": "Show the average and maximum loss for all windstorms with max speed higher than 1000.", + "query": "SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What is the average and maximum damage in millions for storms that had a max speed over 1000?", + "SpiderSynQuestion": "What is the average and maximum loss in millions for storms that had a max speed over 1000?", + "query": "SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What is the total number of deaths and damage for all storms with a max speed greater than the average?", + "SpiderSynQuestion": "What is the total number of deaths and loss for all storms with a max speed greater than the average?", + "query": "SELECT sum(number_deaths) , sum(damage_millions_USD) FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm)" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.", + "SpiderSynQuestion": "Return the total number of deaths and total loss in millions for storms that had a max speed greater than the average.", + "query": "SELECT sum(number_deaths) , sum(damage_millions_USD) FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm)" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "List name and damage for all storms in a descending order of max speed.", + "SpiderSynQuestion": "List name and loss for all storms in a descending order of max speed.", + "query": "SELECT name , damage_millions_USD FROM storm ORDER BY max_speed DESC" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names and damage in millions for storms, ordered by their max speeds descending?", + "SpiderSynQuestion": "What are the names and loss in millions for storms, ordered by their max speeds descending?", + "query": "SELECT name , damage_millions_USD FROM storm ORDER BY max_speed DESC" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "How many regions are affected?", + "SpiderSynQuestion": "How many districts are affected?", + "query": "SELECT count(DISTINCT region_id) FROM affected_region" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Count the number of different affected regions.", + "SpiderSynQuestion": "Count the number of different affected districts.", + "query": "SELECT count(DISTINCT region_id) FROM affected_region" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show the name for regions not affected.", + "SpiderSynQuestion": "Show the name for districts not affected.", + "query": "SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of regions that were not affected?", + "SpiderSynQuestion": "What are the names of districts that were not affected?", + "query": "SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show the name for regions and the number of storms for each region.", + "SpiderSynQuestion": "Show the name for districts and the number of storms for each district.", + "query": "SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "How many storms occured in each region?", + "SpiderSynQuestion": "How many windstorm occured in each district?", + "query": "SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "List the name for storms and the number of affected regions for each storm.", + "SpiderSynQuestion": "List the name for windstorm and the number of affected districts for each windstorm.", + "query": "SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "How many regions were affected by each storm?", + "SpiderSynQuestion": "How many districts were affected by each windstorm?", + "query": "SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What is the storm name and max speed which affected the greatest number of regions?", + "SpiderSynQuestion": "What is the storm name and max velocity which affected the greatest number of districts?", + "query": "SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Return the name and max speed of the storm that affected the most regions.", + "SpiderSynQuestion": "Return the name and max velocity of the storm that affected the most districts.", + "query": "SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show the name of storms which don't have affected region in record.", + "SpiderSynQuestion": "Show the name of windstorms which don't have affected district in record.", + "query": "SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of storms that did not affect any regions?", + "SpiderSynQuestion": "What are the names of windstorm that did not affect any regions?", + "query": "SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show storm name with at least two regions and 10 cities affected.", + "SpiderSynQuestion": "Show windstorm name with at least two districts and 10 cities affected.", + "query": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected) >= 10" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?", + "SpiderSynQuestion": "What are the names of windstorms that both affected two or more districts and affected a total of 10 or more cities?", + "query": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected) >= 10" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show all storm names except for those with at least two affected regions.", + "SpiderSynQuestion": "Show all windstorm names except for those with at least two affected districts.", + "query": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of storms that did not affect two or more regions?", + "SpiderSynQuestion": "What are the names of windstorms that did not affect two or more districts?", + "query": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the region names affected by the storm with a number of deaths of least 10?", + "SpiderSynQuestion": "What are the district names affected by the storm with a number of deaths of least 10?", + "query": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Return the names of the regions affected by storms that had a death count of at least 10.", + "SpiderSynQuestion": "Return the names of the districts affected by storms that had a death count of at least 10.", + "query": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show all storm names affecting region \"Denmark\".", + "SpiderSynQuestion": "Show all storm names affecting district \"Denmark\".", + "query": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of the storms that affected Denmark?", + "SpiderSynQuestion": "What are the names of the windstorm that affected Denmark?", + "query": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Show the region name with at least two storms.", + "SpiderSynQuestion": "Show the district name with at least two windstorm.", + "query": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of regions with two or more storms?", + "SpiderSynQuestion": "What are the names of districts with two or more windstorm?", + "query": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Find the names of the regions which were affected by the storm that killed the greatest number of people.", + "SpiderSynQuestion": "Find the names of the districts which were affected by the windstorm that killed the greatest number of people.", + "query": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of regions that were affected by the storm in which the most people died?", + "SpiderSynQuestion": "What are the names of districts that were affected by the storm in which the most people died?", + "query": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "Find the name of the storm that affected both Afghanistan and Albania regions.", + "SpiderSynQuestion": "Find the name of the windstorm that affected both Afghanistan and Albania regions.", + "query": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'" + }, + { + "db_id": "storm_record", + "SpiderQuestion": "What are the names of the storms that affected both the regions of Afghanistan and Albania?", + "SpiderSynQuestion": "What are the names of the windstorm that affected both the districts of Afghanistan and Albania?", + "query": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'" + }, + { + "db_id": "election", + "SpiderQuestion": "How many counties are there in total?", + "SpiderSynQuestion": "How many counties are there in total?", + "query": "SELECT count(*) FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "Count the total number of counties.", + "SpiderSynQuestion": "Count the total number of counties.", + "query": "SELECT count(*) FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the county name and population of all counties.", + "SpiderSynQuestion": "Show the county name and populace of all counties.", + "query": "SELECT County_name , Population FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the name and population of each county?", + "SpiderSynQuestion": "What are the name and the number of people in each county?", + "query": "SELECT County_name , Population FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the average population of all counties.", + "SpiderSynQuestion": "Show the average number of people in all counties.", + "query": "SELECT avg(Population) FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "On average how large is the population of the counties?", + "SpiderSynQuestion": "On average how large is the number of people in the counties?", + "query": "SELECT avg(Population) FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "Return the maximum and minimum population among all counties.", + "SpiderSynQuestion": "Return the maximum and minimum number of people in all counties.", + "query": "SELECT max(Population) , min(Population) FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the maximum and minimum population of the counties?", + "SpiderSynQuestion": "What are the maximum and minimum number of people in the counties?", + "query": "SELECT max(Population) , min(Population) FROM county" + }, + { + "db_id": "election", + "SpiderQuestion": "Show all the distinct districts for elections.", + "SpiderSynQuestion": "Show all the different regions for elections.", + "query": "SELECT DISTINCT District FROM election" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the distinct districts for elections?", + "SpiderSynQuestion": "What are the different regions for elections?", + "query": "SELECT DISTINCT District FROM election" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the zip code of the county with name \"Howard\".", + "SpiderSynQuestion": "Show the postal code of the county with name \"Howard\".", + "query": "SELECT Zip_code FROM county WHERE County_name = \"Howard\"" + }, + { + "db_id": "election", + "SpiderQuestion": "What is the zip code the county named \"Howard\" is located in?", + "SpiderSynQuestion": "What is the postal code the county named \"Howard\" is located in?", + "query": "SELECT Zip_code FROM county WHERE County_name = \"Howard\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the delegate from district 1 in election.", + "SpiderSynQuestion": "Show the representative from district 1 in election.", + "query": "SELECT Delegate FROM election WHERE District = 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Who is the delegate of district 1 in the elections?", + "SpiderSynQuestion": "Who is the representative of district 1 in the elections?", + "query": "SELECT Delegate FROM election WHERE District = 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the delegate and committee information of elections.", + "SpiderSynQuestion": "Show the representative and committee information of elections.", + "query": "SELECT Delegate , Committee FROM election" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the delegate and committee information for each election record?", + "SpiderSynQuestion": "What are the representative and committee information for each election record?", + "query": "SELECT Delegate , Committee FROM election" + }, + { + "db_id": "election", + "SpiderQuestion": "How many distinct governors are there?", + "SpiderSynQuestion": "How many different governors are there?", + "query": "SELECT count(DISTINCT Governor) FROM party" + }, + { + "db_id": "election", + "SpiderQuestion": "Count the number of distinct governors.", + "SpiderSynQuestion": "Count the number of different governors.", + "query": "SELECT count(DISTINCT Governor) FROM party" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the lieutenant governor and comptroller from the democratic party.", + "SpiderSynQuestion": "Show the lieutenant governor and comptroller from the democratic party.", + "query": "SELECT Lieutenant_Governor , Comptroller FROM party WHERE Party = \"Democratic\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Who are the lieutenant governor and comptroller from the democratic party?", + "SpiderSynQuestion": "Who are the lieutenant governor and comptroller from the democratic party?", + "query": "SELECT Lieutenant_Governor , Comptroller FROM party WHERE Party = \"Democratic\"" + }, + { + "db_id": "election", + "SpiderQuestion": "In which distinct years was the governor \"Eliot Spitzer\"?", + "SpiderSynQuestion": "In which different years was the governor \"Eliot Spitzer\"?", + "query": "SELECT DISTINCT YEAR FROM party WHERE Governor = \"Eliot Spitzer\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Find the distinct years when the governor was named \"Eliot Spitzer\".", + "SpiderSynQuestion": "Find the different years when the governor was named \"Eliot Spitzer\".", + "query": "SELECT DISTINCT YEAR FROM party WHERE Governor = \"Eliot Spitzer\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Show all the information about election.", + "SpiderSynQuestion": "Show all the details about election.", + "query": "SELECT * FROM election" + }, + { + "db_id": "election", + "SpiderQuestion": "Return all the information for each election record.", + "SpiderSynQuestion": "Return all the details for each election record.", + "query": "SELECT * FROM election" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the delegates and the names of county they belong to.", + "SpiderSynQuestion": "Show the representative and the names of county they belong to.", + "query": "SELECT T2.Delegate , T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the delegate and name of the county they belong to, for each county?", + "SpiderSynQuestion": "What are the representative and name of the county they belong to, for each county?", + "query": "SELECT T2.Delegate , T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District" + }, + { + "db_id": "election", + "SpiderQuestion": "Which delegates are from counties with population smaller than 100000?", + "SpiderSynQuestion": "Which representative are from counties with population smaller than 100000?", + "query": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000" + }, + { + "db_id": "election", + "SpiderQuestion": "Find the delegates who are from counties with population below 100000.", + "SpiderSynQuestion": "Find the representative who are from counties with population below 100000.", + "query": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000" + }, + { + "db_id": "election", + "SpiderQuestion": "How many distinct delegates are from counties with population larger than 50000?", + "SpiderSynQuestion": "How many different representative are from counties with population larger than 50000?", + "query": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000" + }, + { + "db_id": "election", + "SpiderQuestion": "Count the number of distinct delegates who are from counties with population above 50000.", + "SpiderSynQuestion": "Count the number of different representative who are from counties with population above 50000.", + "query": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the names of the county that the delegates on \"Appropriations\" committee belong to?", + "SpiderSynQuestion": "What are the names of the county that the representative on \"Appropriations\" committee belong to?", + "query": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = \"Appropriations\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Which county do the delegates on \"Appropriations\" committee belong to? Give me the county names.", + "SpiderSynQuestion": "Which county do the representative on \"Appropriations\" committee belong to? Give me the county names.", + "query": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = \"Appropriations\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the delegates and the names of the party they belong to.", + "SpiderSynQuestion": "Show the representative and the names of the party they belong to.", + "query": "SELECT T1.Delegate , T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID" + }, + { + "db_id": "election", + "SpiderQuestion": "For each delegate, find the names of the party they are part of.", + "SpiderSynQuestion": "For each representative, find the names of the party they are part of.", + "query": "SELECT T1.Delegate , T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID" + }, + { + "db_id": "election", + "SpiderQuestion": "Who were the governors of the parties associated with delegates from district 1?", + "SpiderSynQuestion": "Who were the governors of the parties associated with delegates from district 1?", + "query": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?", + "SpiderSynQuestion": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?", + "query": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?", + "SpiderSynQuestion": "Who were the comptroller of the parties associated with the delegates from district 1 or district 2?", + "query": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2" + }, + { + "db_id": "election", + "SpiderQuestion": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?", + "SpiderSynQuestion": "Find the parties associated with the delegates from district 1 or 2. Who served as comptroller of the parties?", + "query": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2" + }, + { + "db_id": "election", + "SpiderQuestion": "Return all the committees that have delegates from Democratic party.", + "SpiderSynQuestion": "Return all the committee that have delegates from Democratic party.", + "query": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Which committees have delegates from the Democratic party?", + "SpiderSynQuestion": "Which committee have delegates from the Democratic party?", + "query": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the name of each county along with the corresponding number of delegates from that county.", + "SpiderSynQuestion": "Show the name of each county along with the corresponding number of delegates from that county.", + "query": "SELECT T1.County_name , COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id" + }, + { + "db_id": "election", + "SpiderQuestion": "For each county, find the name of the county and the number of delegates from that county.", + "SpiderSynQuestion": "For each county, find the name of the county and the number of delegates from that county.", + "query": "SELECT T1.County_name , COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the name of each party and the corresponding number of delegates from that party.", + "SpiderSynQuestion": "Show the name of each party and the corresponding number of delegates from that party.", + "query": "SELECT T2.Party , COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party" + }, + { + "db_id": "election", + "SpiderQuestion": "For each party, return the name of the party and the number of delegates from that party.", + "SpiderSynQuestion": "For each party, return the name of the party and the number of delegates from that party.", + "query": "SELECT T2.Party , COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party" + }, + { + "db_id": "election", + "SpiderQuestion": "Return the names of all counties sorted by population in ascending order.", + "SpiderSynQuestion": "Return the names of all counties sorted by population in ascending order.", + "query": "SELECT County_name FROM county ORDER BY Population ASC" + }, + { + "db_id": "election", + "SpiderQuestion": "Sort the names of all counties in ascending order of population.", + "SpiderSynQuestion": "Sort the names of all counties in ascending order of population.", + "query": "SELECT County_name FROM county ORDER BY Population ASC" + }, + { + "db_id": "election", + "SpiderQuestion": "Return the names of all counties sorted by county name in descending alphabetical order.", + "SpiderSynQuestion": "Return the names of all counties sorted by county name in descending alphabetical order.", + "query": "SELECT County_name FROM county ORDER BY County_name DESC" + }, + { + "db_id": "election", + "SpiderQuestion": "Sort the names of all counties in descending alphabetical order.", + "SpiderSynQuestion": "Sort the names of all counties in descending alphabetical order.", + "query": "SELECT County_name FROM county ORDER BY County_name DESC" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the name of the county with the biggest population.", + "SpiderSynQuestion": "Show the name of the county with the biggest population.", + "query": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Which county has the largest population? Give me the name of the county.", + "SpiderSynQuestion": "Which county has the largest populace? Give me the name of the county.", + "query": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the 3 counties with the smallest population.", + "SpiderSynQuestion": "Show the 3 counties with the smallest populace.", + "query": "SELECT County_name FROM county ORDER BY Population ASC LIMIT 3" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the 3 counties that have the smallest population? Give me the county names.", + "SpiderSynQuestion": "What are the 3 counties that have the smallest populace? Give me the county names.", + "query": "SELECT County_name FROM county ORDER BY Population ASC LIMIT 3" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the names of counties that have at least two delegates.", + "SpiderSynQuestion": "Show the names of counties that have at least two delegates.", + "query": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "election", + "SpiderQuestion": "Which counties have two or more delegates? Give me the county names.", + "SpiderSynQuestion": "Which counties have two or more delegates? Give me the county names.", + "query": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the name of the party that has at least two records.", + "SpiderSynQuestion": "Show the name of the party that has at least two records.", + "query": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2" + }, + { + "db_id": "election", + "SpiderQuestion": "Which party has two or more records?", + "SpiderSynQuestion": "Which party has two or more records?", + "query": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the name of the party that has the most delegates.", + "SpiderSynQuestion": "Show the name of the party that has the most representative.", + "query": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Which party has the largest number of delegates?", + "SpiderSynQuestion": "Which party has the largest number of representative?", + "query": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the people that have been governor the most times.", + "SpiderSynQuestion": "Show the people that have been governor the most times.", + "query": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Which people severed as governor most frequently?", + "SpiderSynQuestion": "Which people severed as governor most frequently?", + "query": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Show the people that have been comptroller the most times and the corresponding number of times.", + "SpiderSynQuestion": "Show the people that have been comptroller the most times and the corresponding number of times.", + "query": "SELECT Comptroller , COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.", + "SpiderSynQuestion": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.", + "query": "SELECT Comptroller , COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the names of parties that do not have delegates in election?", + "SpiderSynQuestion": "What are the names of parties that do not have delegates in election?", + "query": "SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)" + }, + { + "db_id": "election", + "SpiderQuestion": "Which parties did not have any delegates in elections?", + "SpiderSynQuestion": "Which parties did not have any representative in elections?", + "query": "SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)" + }, + { + "db_id": "election", + "SpiderQuestion": "What are the names of parties that have both delegates on \"Appropriations\" committee and", + "SpiderSynQuestion": "What are the names of parties that have both representative on \"Appropriations\" committee and", + "query": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Appropriations\" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Economic Matters\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Which parties have delegates in both the \"Appropriations\" committee and the \"Economic Matters\" committee?", + "SpiderSynQuestion": "Which parties have representative in both the \"Appropriations\" committee and the \"Economic Matters\" committee?", + "query": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Appropriations\" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Economic Matters\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Which committees have delegates from both democratic party and liberal party?", + "SpiderSynQuestion": "Which committee have delegates from both democratic party and liberal party?", + "query": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"" + }, + { + "db_id": "election", + "SpiderQuestion": "Find the committees that have delegates both from from the democratic party and the liberal party.", + "SpiderSynQuestion": "Find the committee that have delegates both from from the democratic party and the liberal party.", + "query": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"" + }, + { + "db_id": "news_report", + "SpiderQuestion": "How many journalists are there?", + "SpiderSynQuestion": "How many reporters are there?", + "query": "SELECT count(*) FROM journalist" + }, + { + "db_id": "news_report", + "SpiderQuestion": "List the names of journalists in ascending order of years working.", + "SpiderSynQuestion": "List the names of reporters in ascending order of years working.", + "query": "SELECT Name FROM journalist ORDER BY Years_working ASC" + }, + { + "db_id": "news_report", + "SpiderQuestion": "What are the nationalities and ages of journalists?", + "SpiderSynQuestion": "What are the nation and ages of journalists?", + "query": "SELECT Nationality , Age FROM journalist" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the names of journalists from \"England\" or \"Wales\".", + "SpiderSynQuestion": "Show the names of reporters from \"England\" or \"Wales\".", + "query": "SELECT Name FROM journalist WHERE Nationality = \"England\" OR Nationality = \"Wales\"" + }, + { + "db_id": "news_report", + "SpiderQuestion": "What is the average number of years spent working as a journalist?", + "SpiderSynQuestion": "What is the average number of years spent working as a journalist?", + "query": "SELECT avg(Years_working) FROM journalist" + }, + { + "db_id": "news_report", + "SpiderQuestion": "What is the nationality of the journalist with the largest number of years working?", + "SpiderSynQuestion": "What is the nation of the reporter with the largest number of years working?", + "query": "SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the different nationalities and the number of journalists of each nationality.", + "SpiderSynQuestion": "Show the different nation and the number of reporter of each nation.", + "query": "SELECT Nationality , COUNT(*) FROM journalist GROUP BY Nationality" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the most common nationality for journalists.", + "SpiderSynQuestion": "Show the most common nation for reporters.", + "query": "SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.", + "SpiderSynQuestion": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.", + "query": "SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the dates, places, and names of events in descending order of the attendance.", + "SpiderSynQuestion": "Show the day, location, and names of events in descending order of the attendance.", + "query": "SELECT Date , Name , venue FROM event ORDER BY Event_Attendance DESC" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the names of journalists and the dates of the events they reported.", + "SpiderSynQuestion": "Show the names of reporters and the day of the events they reported.", + "query": "SELECT T3.Name , T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the names of journalists and the names of the events they reported in ascending order", + "SpiderSynQuestion": "Show the names of reporters and the names of the events they reported in ascending order", + "query": "SELECT T3.Name , T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the names of journalists and the number of events they reported.", + "SpiderSynQuestion": "Show the names of reporters and the number of events they reported.", + "query": "SELECT T3.Name , COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Show the names of journalists that have reported more than one event.", + "SpiderSynQuestion": "Show the names of reporters that have reported more than one event.", + "query": "SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1" + }, + { + "db_id": "news_report", + "SpiderQuestion": "List the names of journalists who have not reported any event.", + "SpiderSynQuestion": "List the names of reporters who have not reported any event.", + "query": "SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)" + }, + { + "db_id": "news_report", + "SpiderQuestion": "what are the average and maximum attendances of all events?", + "SpiderSynQuestion": "what are the average and maximum number of attendees of all events?", + "query": "SELECT avg(Event_Attendance) , max(Event_Attendance) FROM event" + }, + { + "db_id": "news_report", + "SpiderQuestion": "Find the average age and experience working length of journalists working on different role type.", + "SpiderSynQuestion": "Find the average age and experience working length of journalists working on different role type.", + "query": "SELECT avg(t1.age) , avg(Years_working) , t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type" + }, + { + "db_id": "news_report", + "SpiderQuestion": "List the event venues and names that have the top 2 most number of people attended.", + "SpiderSynQuestion": "List the event places and names that have the top 2 most number of people attended.", + "query": "SELECT venue , name FROM event ORDER BY Event_Attendance DESC LIMIT 2" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Show me all the restaurants.", + "SpiderSynQuestion": "Show me all the restaurants.", + "query": "SELECT ResName FROM Restaurant;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "What is the address of the restaurant Subway?", + "SpiderSynQuestion": "What is the location of the restaurant Subway?", + "query": "SELECT Address FROM Restaurant WHERE ResName = \"Subway\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "What is the rating of the restaurant Subway?", + "SpiderSynQuestion": "What is the score of the restaurant Subway?", + "query": "SELECT Rating FROM Restaurant WHERE ResName = \"Subway\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "List all restaurant types.", + "SpiderSynQuestion": "List all restaurant types.", + "query": "SELECT ResTypeName FROM Restaurant_Type;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "What is the description of the restaurant type Sandwich?", + "SpiderSynQuestion": "What is the describing content of the restaurant type Sandwich?", + "query": "SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = \"Sandwich\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Which restaurants have highest rating? List the restaurant name and its rating.", + "SpiderSynQuestion": "Which restaurants have highest score? List the restaurant name and its score.", + "query": "SELECT ResName , Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "What is the age of student Linda Smith?", + "SpiderSynQuestion": "What is the age of student Linda Smith?", + "query": "SELECT Age FROM Student WHERE Fname = \"Linda\" AND Lname = \"Smith\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "What is the gender of the student Linda Smith?", + "SpiderSynQuestion": "What is the gender of the student Linda Smith?", + "query": "SELECT Sex FROM Student WHERE Fname = \"Linda\" AND Lname = \"Smith\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "List all students' first names and last names who majored in 600.", + "SpiderSynQuestion": "List all students' forename and family names who majored in 600.", + "query": "SELECT Fname , Lname FROM Student WHERE Major = 600;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Which city does student Linda Smith live in?", + "SpiderSynQuestion": "Which town does student Linda Smith live in?", + "query": "SELECT city_code FROM Student WHERE Fname = \"Linda\" AND Lname = \"Smith\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Advisor 1121 has how many students?", + "SpiderSynQuestion": "Adviser 1121 has how many students?", + "query": "SELECT count(*) FROM Student WHERE Advisor = 1121;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Which Advisor has most of students? List advisor and the number of students.", + "SpiderSynQuestion": "Which Adviser has most of students? List adviser and the number of students.", + "query": "SELECT Advisor , count(*) FROM Student GROUP BY Advisor ORDER BY count(Advisor) DESC LIMIT 1;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Which major has least number of students? List the major and the number of students.", + "SpiderSynQuestion": "Which discipline has least number of students? List the discipline and the number of students.", + "query": "SELECT Major , count(*) FROM Student GROUP BY Major ORDER BY count(Major) ASC LIMIT 1;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Which major has between 2 and 30 number of students? List major and the number of students.", + "SpiderSynQuestion": "Which discipline has between 2 and 30 number of students? List discipline and the number of students.", + "query": "SELECT Major , count(*) FROM Student GROUP BY Major HAVING count(Major) BETWEEN 2 AND 30;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Which student's age is older than 18 and is majoring in 600? List each student's first and last name.", + "SpiderSynQuestion": "Which student's age is older than 18 and is majoring in 600? List each student's full name.", + "query": "SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major = 600;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.", + "SpiderSynQuestion": "List all female students age is older than 18 who is not majoring in 600. List students' full name.", + "query": "SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major != 600 AND Sex = 'F';" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "How many restaurant is the Sandwich type restaurant?", + "SpiderSynQuestion": "How many restaurant is the Sandwich type restaurant?", + "query": "SELECT count(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "How long does student Linda Smith spend on the restaurant in total?", + "SpiderSynQuestion": "How long does student Linda Smith spend on the restaurant in total?", + "query": "SELECT sum(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "How many times has the student Linda Smith visited Subway?", + "SpiderSynQuestion": "How many times has the student Linda Smith visited Subway?", + "query": "SELECT count(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\" AND Restaurant.ResName = \"Subway\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "When did Linda Smith visit Subway?", + "SpiderSynQuestion": "When did Linda Smith visit Subway?", + "query": "SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\" AND Restaurant.ResName = \"Subway\";" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.", + "SpiderSynQuestion": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.", + "query": "SELECT Restaurant.ResName , sum(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY sum(Visits_Restaurant.Spent) ASC LIMIT 1;" + }, + { + "db_id": "restaurant_1", + "SpiderQuestion": "Which student visited restaurant most often? List student's first name and last name.", + "SpiderSynQuestion": "Which student visited restaurant most often? List student's full name.", + "query": "SELECT Student.Fname , Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the ids of orders whose status is 'Success'.", + "SpiderSynQuestion": "Find the ids of orders whose status is 'Success'.", + "query": "SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the name and price of the product that has been ordered the greatest number of times.", + "SpiderSynQuestion": "Find the name and price of the product that has been ordered the greatest number of times.", + "query": "SELECT t1.product_name , t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the number of customers in total.", + "SpiderSynQuestion": "Find the number of client in total.", + "query": "SELECT count(*) FROM customers" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "How many different payment methods are there?", + "SpiderSynQuestion": "How many different payment methods are there?", + "query": "SELECT count(DISTINCT payment_method) FROM customers" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Show the details of all trucks in the order of their license number.", + "SpiderSynQuestion": "Show the information of all lorry in the order of their license number.", + "query": "SELECT truck_details FROM trucks ORDER BY truck_licence_number" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the name of the most expensive product.", + "SpiderSynQuestion": "Find the name of the most expensive goods.", + "query": "SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the names of customers who are not living in the state of California.", + "SpiderSynQuestion": "Find the names of clients who are not living in the state of California.", + "query": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "List the names and emails of customers who payed by Visa card.", + "SpiderSynQuestion": "List the names and emails of clients who payed by Visa card.", + "query": "SELECT customer_email , customer_name FROM customers WHERE payment_method = 'Visa'" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the names and phone numbers of customers living in California state.", + "SpiderSynQuestion": "Find the names and telephone numbers of clients living in California state.", + "query": "SELECT t1.customer_name , t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the states which do not have any employee in their record.", + "SpiderSynQuestion": "Find the states which do not have any staff in their record.", + "query": "SELECT state_province_county FROM addresses WHERE address_id NOT IN (SELECT employee_address_id FROM Employees)" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.", + "SpiderSynQuestion": "List the names, telephone numbers, and emails of all clients sorted by their dates of becoming clients.", + "query": "SELECT customer_name , customer_phone , customer_email FROM Customers ORDER BY date_became_customer" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the name of the first 5 customers.", + "SpiderSynQuestion": "Find the name of the first 5 clients.", + "query": "SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the payment method that is used most frequently.", + "SpiderSynQuestion": "Find the payment method that is used most frequently.", + "query": "SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "List the names of all routes in alphabetic order.", + "SpiderSynQuestion": "List the names of all paths in alphabetic order.", + "query": "SELECT route_name FROM Delivery_Routes ORDER BY route_name" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "Find the name of route that has the highest number of deliveries.", + "SpiderSynQuestion": "Find the name of path that has the highest number of deliveries.", + "query": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customer_deliveries", + "SpiderQuestion": "List the state names and the number of customers living in each state.", + "SpiderSynQuestion": "List the state names and the number of clients living in each state.", + "query": "SELECT t2.state_province_county , count(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "How many authors are there?", + "SpiderSynQuestion": "How many authors are there?", + "query": "SELECT count(*) FROM authors" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Count the number of authors.", + "SpiderSynQuestion": "Count the number of writers.", + "query": "SELECT count(*) FROM authors" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "How many institutions are there?", + "SpiderSynQuestion": "How many organization are there?", + "query": "SELECT count(*) FROM inst" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Count the number of institutions.", + "SpiderSynQuestion": "Count the number of organizations.", + "query": "SELECT count(*) FROM inst" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "How many papers are published in total?", + "SpiderSynQuestion": "How many articles are published in total?", + "query": "SELECT count(*) FROM papers" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Count the number of total papers.", + "SpiderSynQuestion": "Count the number of total articles.", + "query": "SELECT count(*) FROM papers" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What are the titles of papers published by \"Jeremy Gibbons\"?", + "SpiderSynQuestion": "What are the titles of articles published by \"Jeremy Gibbons\"?", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Jeremy\" AND t1.lname = \"Gibbons\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the titles of all the papers written by \"Jeremy Gibbons\"", + "SpiderSynQuestion": "Find the titles of all the articles written by \"Jeremy Gibbons\"", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Jeremy\" AND t1.lname = \"Gibbons\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find all the papers published by \"Aaron Turon\".", + "SpiderSynQuestion": "Find all the articles published by \"Aaron Turon\".", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Aaron\" AND t1.lname = \"Turon\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the titles of all the papers written by \"Aaron Turon\".", + "SpiderSynQuestion": "Find the titles of all the articles written by \"Aaron Turon\".", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Aaron\" AND t1.lname = \"Turon\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "How many papers have \"Atsushi Ohori\" published?", + "SpiderSynQuestion": "How many articles have \"Atsushi Ohori\" published?", + "query": "SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Atsushi\" AND t1.lname = \"Ohori\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "How many papers are \"Atsushi Ohori\" the author of?", + "SpiderSynQuestion": "How many articles are \"Atsushi Ohori\" the writer of?", + "query": "SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Atsushi\" AND t1.lname = \"Ohori\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What is the name of the institution that \"Matthias Blume\" belongs to?", + "SpiderSynQuestion": "What is the name of the institution that \"Matthias Blume\" belongs to?", + "query": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Matthias\" AND t1.lname = \"Blume\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which institution is the author \"Matthias Blume\" belong to? Give me the name of the institution.", + "SpiderSynQuestion": "Which institution is the writer \"Matthias Blume\" belong to? Give me the name of the institution.", + "query": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Matthias\" AND t1.lname = \"Blume\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which institution does \"Katsuhiro Ueno\" belong to?", + "SpiderSynQuestion": "Which institution does \"Katsuhiro Ueno\" belong to?", + "query": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Katsuhiro\" AND t1.lname = \"Ueno\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What is the name of the institution the author \"Katsuhiro Ueno\" belongs to?", + "SpiderSynQuestion": "What is the name of the institution the author \"Katsuhiro Ueno\" belongs to?", + "query": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Katsuhiro\" AND t1.lname = \"Ueno\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Who belong to the institution \"University of Oxford\"? Show the first names and last names.", + "SpiderSynQuestion": "Who belong to the institution \"University of Oxford\"? Show the forename and family name.", + "query": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Oxford\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the first names and last names of the authors whose institution affiliation is \"University of Oxford\".", + "SpiderSynQuestion": "Find the forename and family name of the authors whose institution affiliation is \"University of Oxford\".", + "query": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Oxford\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which authors belong to the institution \"Google\"? Show the first names and last names.", + "SpiderSynQuestion": "Which authors belong to the institution \"Google\"? Show the forename and family name.", + "query": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the first names and last names of the authors whose institution affiliation is \"Google\".", + "SpiderSynQuestion": "Find the full names of the authors whose institution affiliation is \"Google\".", + "query": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What are the last names of the author of the paper titled \"Binders Unbound\"?", + "SpiderSynQuestion": "What are the family names of the author of the paper titled \"Binders Unbound\"?", + "query": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Binders Unbound\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Who is the author of the paper titled \"Binders Unbound\"? Give me the last name.", + "SpiderSynQuestion": "Who is the author of the paper titled \"Binders Unbound\"? Give me the family name.", + "query": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Binders Unbound\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the first and last name of the author(s) who wrote the paper \"Nameless, Painless\".", + "SpiderSynQuestion": "Find the full name of the author(s) who wrote the paper \"Nameless, Painless\".", + "query": "SELECT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Nameless , Painless\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What are the first and last name of the author who published the paper titled \"Nameless, Painless\"?", + "SpiderSynQuestion": "What are the forename and family name of the author who published the paper titled \"Nameless, Painless\"?", + "query": "SELECT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Nameless , Painless\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What are the papers published under the institution \"Indiana University\"?", + "SpiderSynQuestion": "What are the articles published under the institution \"Indiana University\"?", + "query": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Indiana University\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "List the titles of the papers whose authors are from the institution \"Indiana University\".", + "SpiderSynQuestion": "List the titles of the articles whose authors are from the institution \"Indiana University\".", + "query": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Indiana University\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find all the papers published by the institution \"Google\".", + "SpiderSynQuestion": "Find all the articles published by the institution \"Google\".", + "query": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which papers were written by authors from the institution \"Google\"?", + "SpiderSynQuestion": "Which articles were written by authors from the institution \"Google\"?", + "query": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "How many papers are published by the institution \"Tokohu University\"?", + "SpiderSynQuestion": "How many articles are published by the institution \"Tokohu University\"?", + "query": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Tokohu University\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the number of papers published by authors from the institution \"Tokohu University\".", + "SpiderSynQuestion": "Find the number of articles published by authors from the institution \"Tokohu University\".", + "query": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Tokohu University\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the number of papers published by the institution \"University of Pennsylvania\".", + "SpiderSynQuestion": "Find the number of articles published by the institution \"University of Pennsylvania\".", + "query": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Pennsylvania\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "How many papers are written by authors from the institution \"University of Pennsylvania\"?", + "SpiderSynQuestion": "How many articles are written by authors from the institution \"University of Pennsylvania\"?", + "query": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Pennsylvania\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the papers which have \"Olin Shivers\" as an author.", + "SpiderSynQuestion": "Find the articles which have \"Olin Shivers\" as an author.", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Olin\" AND t1.lname = \"Shivers\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which papers did the author \"Olin Shivers\" write? Give me the paper titles.", + "SpiderSynQuestion": "Which articles did the author \"Olin Shivers\" write? Give me the article titles.", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Olin\" AND t1.lname = \"Shivers\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which papers have \"Stephanie Weirich\" as an author?", + "SpiderSynQuestion": "Which articles have \"Stephanie Weirich\" as an author?", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Stephanie\" AND t1.lname = \"Weirich\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the titles of the papers the author \"Stephanie Weirich\" wrote.", + "SpiderSynQuestion": "Find the titles of the articles the author \"Stephanie Weirich\" wrote.", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Stephanie\" AND t1.lname = \"Weirich\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author?", + "SpiderSynQuestion": "Which articles is published in an institution in \"USA\" and have \"Turon\" as its second author?", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find papers whose second author has last name \"Turon\" and is affiliated with an institution in the country \"USA\".", + "SpiderSynQuestion": "Find papers whose second writer has last name \"Turon\" and is affiliated with an institution in the country \"USA\".", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?", + "SpiderSynQuestion": "Find the titles of papers whose first writer is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"Japan\" AND t2.authorder = 1 AND t1.lname = \"Ohori\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which papers' first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"? Give me the titles of the papers.", + "SpiderSynQuestion": "Which papers' first writer is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"? Give me the titles of the papers.", + "query": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"Japan\" AND t2.authorder = 1 AND t1.lname = \"Ohori\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What is the last name of the author that has published the most papers?", + "SpiderSynQuestion": "What is the family name of the writer that has published the most papers?", + "query": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which author has written the most papers? Find his or her last name.", + "SpiderSynQuestion": "Which author has written the most papers? Find his or her family name.", + "query": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Retrieve the country that has published the most papers.", + "SpiderSynQuestion": "Retrieve the nation that has published the most papers.", + "query": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the country that the most papers are affiliated with.", + "SpiderSynQuestion": "Find the nation that the most papers are affiliated with.", + "query": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the name of the organization that has published the largest number of papers.", + "SpiderSynQuestion": "Find the name of the organization that has published the largest number of papers.", + "query": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which institution has the most papers? Find the name of the institution.", + "SpiderSynQuestion": "Which organization has the most papers? Find the name of the organization.", + "query": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the titles of the papers that contain the word \"ML\".", + "SpiderSynQuestion": "Find the titles of the articles that contain the word \"ML\".", + "query": "SELECT title FROM papers WHERE title LIKE \"%ML%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which papers have the substring \"ML\" in their titles? Return the titles of the papers.", + "SpiderSynQuestion": "Which articles have the substring \"ML\" in their titles? Return the titles of the articles.", + "query": "SELECT title FROM papers WHERE title LIKE \"%ML%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which paper's title contains the word \"Database\"?", + "SpiderSynQuestion": "Which article's title contains the word \"Database\"?", + "query": "SELECT title FROM papers WHERE title LIKE \"%Database%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which papers have the substring \"Database\" in their titles? Show the titles of the papers.", + "SpiderSynQuestion": "Which articles have the substring \"Database\" in their titles? Show the titles of the articles.", + "query": "SELECT title FROM papers WHERE title LIKE \"%Database%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the first names of all the authors who have written a paper with title containing the word \"Functional\".", + "SpiderSynQuestion": "Find the forename of all the authors who have written a paper with title containing the word \"Functional\".", + "query": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Functional%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Who has written a paper that has the word \"Functional\" in its title? Return the first names of the authors.", + "SpiderSynQuestion": "Who has written a paper that has the word \"Functional\" in its title? Return the forename of the authors.", + "query": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Functional%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the last names of all the authors that have written a paper with title containing the word \"Monadic\".", + "SpiderSynQuestion": "Find the family names of all the authors that have written a paper with title containing the word \"Monadic\".", + "query": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Monadic%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which authors have written a paper with title containing the word \"Monadic\"? Return their last names.", + "SpiderSynQuestion": "Which authors have written a paper with title containing the word \"Monadic\"? Return their family names.", + "query": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Monadic%\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Retrieve the title of the paper that has the largest number of authors.", + "SpiderSynQuestion": "Retrieve the title of the paper that has the largest number of authors.", + "query": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship)" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which paper has the most authors? Give me the paper title.", + "SpiderSynQuestion": "Which paper has the most authors? Give me the paper title.", + "query": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship)" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "What is the first name of the author with last name \"Ueno\"?", + "SpiderSynQuestion": "What is the forename of the author with family name \"Ueno\"?", + "query": "SELECT fname FROM authors WHERE lname = \"Ueno\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which authors have last name \"Ueno\"? List their first names.", + "SpiderSynQuestion": "Which authors have family name \"Ueno\"? List their forename.", + "query": "SELECT fname FROM authors WHERE lname = \"Ueno\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the last name of the author with first name \"Amal\".", + "SpiderSynQuestion": "Find the family name of the author with forename \"Amal\".", + "query": "SELECT lname FROM authors WHERE fname = \"Amal\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Which authors have first name \"Amal\"? List their last names.", + "SpiderSynQuestion": "Which authors have forename \"Amal\"? List their family names.", + "query": "SELECT lname FROM authors WHERE fname = \"Amal\"" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Find the first names of all the authors ordered in alphabetical order.", + "SpiderSynQuestion": "Find the forename of all the authors ordered in alphabetical order.", + "query": "SELECT fname FROM authors ORDER BY fname" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Sort the first names of all the authors in alphabetical order.", + "SpiderSynQuestion": "Sort the forename of all the authors in alphabetical order.", + "query": "SELECT fname FROM authors ORDER BY fname" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Retrieve all the last names of authors in alphabetical order.", + "SpiderSynQuestion": "Retrieve all the family names of authors in alphabetical order.", + "query": "SELECT lname FROM authors ORDER BY lname" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Give me a list of all the last names of authors sorted in alphabetical order", + "SpiderSynQuestion": "Give me a list of all the family names of authors sorted in alphabetical order", + "query": "SELECT lname FROM authors ORDER BY lname" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Retrieve all the first and last names of authors in the alphabetical order of last names.", + "SpiderSynQuestion": "Retrieve all the full names of authors in the alphabetical order of family names.", + "query": "SELECT fname , lname FROM authors ORDER BY lname" + }, + { + "db_id": "icfp_1", + "SpiderQuestion": "Sort the list of all the first and last names of authors in alphabetical order of the last names.", + "SpiderSynQuestion": "Sort the list of all the forename and family name of authors in alphabetical order of the family names.", + "query": "SELECT fname , lname FROM authors ORDER BY lname" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many different last names do the actors and actresses have?", + "SpiderSynQuestion": "How many different family names do the actors and actresses have?", + "query": "SELECT count(DISTINCT last_name) FROM actor" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of different last names actors have.", + "SpiderSynQuestion": "Count the number of different family names actors have.", + "query": "SELECT count(DISTINCT last_name) FROM actor" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the most popular first name of the actors?", + "SpiderSynQuestion": "What is the most popular forename of the actors?", + "query": "SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the most common first name among all actors.", + "SpiderSynQuestion": "Return the most common forename among all actors.", + "query": "SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the most popular full name of the actors?", + "SpiderSynQuestion": "What is the most popular full name of the actors?", + "query": "SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the most common full name among all actors.", + "SpiderSynQuestion": "Return the most common full name among all actors.", + "query": "SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which districts have at least two addresses?", + "SpiderSynQuestion": "Which regions have at least two addresses?", + "query": "SELECT district FROM address GROUP BY district HAVING count(*) >= 2" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Give the districts which have two or more addresses.", + "SpiderSynQuestion": "Give the regions which have two or more addresses.", + "query": "SELECT district FROM address GROUP BY district HAVING count(*) >= 2" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?", + "SpiderSynQuestion": "What is the telephone number and zip code of the address 1031 Daugavpils Parkway?", + "query": "SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.", + "SpiderSynQuestion": "Give the telephone and zip code corresponding to the address '1031 Daugavpils Parkway'.", + "query": "SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which city has the most addresses? List the city name, number of addresses, and city id.", + "SpiderSynQuestion": "Which town has the most addresses? List the town name, number of addresses, and town id.", + "query": "SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the city name, id, and number of addresses corresponding to the city with the most addressed?", + "SpiderSynQuestion": "What are the town name, id, and number of addresses corresponding to the town with the most addressed?", + "query": "SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many addresses are in the district of California?", + "SpiderSynQuestion": "How many locations are in the district of California?", + "query": "SELECT count(*) FROM address WHERE district = 'California'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of addressed in the California district.", + "SpiderSynQuestion": "Count the number of addressed in the California district.", + "query": "SELECT count(*) FROM address WHERE district = 'California'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.", + "SpiderSynQuestion": "Which movie is rented at a fee of 0.99 and has less than 3 in the inventory? List the movie title and id.", + "query": "SELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?", + "SpiderSynQuestion": "What are the title and id of the movie which has a rental rate of 0.99 and an inventory of below 3?", + "query": "SELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many cities are in Australia?", + "SpiderSynQuestion": "How many towns are in Australia?", + "query": "SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of cities in Australia.", + "SpiderSynQuestion": "Count the number of towns in Australia.", + "query": "SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which countries have at least 3 cities?", + "SpiderSynQuestion": "Which nations have at least 3 cities?", + "query": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING count(*) >= 3" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the countries that contain 3 or more cities?", + "SpiderSynQuestion": "What are the nations that contain 3 or more cities?", + "query": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING count(*) >= 3" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", + "SpiderSynQuestion": "Find all the payment days for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", + "query": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?", + "SpiderSynQuestion": "What are the payment days for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?", + "query": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many customers have an active value of 1?", + "SpiderSynQuestion": "How many clients have an active value of 1?", + "query": "SELECT count(*) FROM customer WHERE active = '1'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of customers who are active.", + "SpiderSynQuestion": "Count the number of clients who are active.", + "query": "SELECT count(*) FROM customer WHERE active = '1'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which film has the highest rental rate? And what is the rate?", + "SpiderSynQuestion": "Which movie has the highest rental rate? And what is the rate?", + "query": "SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the title and rental rate of the film with the highest rental rate?", + "SpiderSynQuestion": "What are the title and rental rate of the movie with the highest rental rate?", + "query": "SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which film has the most number of actors or actresses? List the film name, film id and description.", + "SpiderSynQuestion": "Which movie has the most number of actors or actresses? List the movie name, movie id and describing content.", + "query": "SELECT T2.title , T2.film_id , T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the title, id, and description of the movie with the greatest number of actors?", + "SpiderSynQuestion": "What are the title, id, and describing content of the movie with the greatest number of actors?", + "query": "SELECT T2.title , T2.film_id , T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id.", + "SpiderSynQuestion": "Which movie actor (actress) starred the most movies? List his or her forename, family name and actor id.", + "query": "SELECT T2.first_name , T2.last_name , T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the full name and id of the actor or actress who starred in the greatest number of films.", + "SpiderSynQuestion": "Return the full name and id of the actor or actress who starred in the greatest number of movies.", + "query": "SELECT T2.first_name , T2.last_name , T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.", + "SpiderSynQuestion": "Which film actors (actresses) played a role in more than 30 films? List his or her full name.", + "query": "SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the full names of actors who had roles in more than 30 films?", + "SpiderSynQuestion": "What are the full names of actors who had roles in more than 30 films?", + "query": "SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which store owns most items?", + "SpiderSynQuestion": "Which store owns most items?", + "query": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the id of the store that has the most items in inventory?", + "SpiderSynQuestion": "What is the id of the warehouse that has the most commodity in inventory?", + "query": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the total amount of all payments?", + "SpiderSynQuestion": "What is the total amount of all payments?", + "query": "SELECT sum(amount) FROM payment" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the sum of all payment amounts.", + "SpiderSynQuestion": "Return the sum of all payment amounts.", + "query": "SELECT sum(amount) FROM payment" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.", + "SpiderSynQuestion": "Which client, who has made at least one payment, has spent the least money? List his or her full name, and the id.", + "query": "SELECT T1.first_name , T1.last_name , T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the full name and id of the customer who has the lowest total amount of payment?", + "SpiderSynQuestion": "What is the full name and id of the customer who has the lowest total amount of payment?", + "query": "SELECT T1.first_name , T1.last_name , T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the genre name of the film HUNGER ROOF?", + "SpiderSynQuestion": "What is the genre name of the film HUNGER ROOF?", + "query": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the name of the category to which the film 'HUNGER ROOF' belongs.", + "SpiderSynQuestion": "Return the name of the type to which the film 'HUNGER ROOF' belongs.", + "query": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many films are there in each category? List the genre name, genre id and the count.", + "SpiderSynQuestion": "How many movies are there in each category? List the genre name, genre id and the count.", + "query": "SELECT T2.name , T1.category_id , count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the names and ids of the different categories, and how many films are in each?", + "SpiderSynQuestion": "What are the names and ids of the different types, and how many movies are in each?", + "query": "SELECT T2.name , T1.category_id , count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which film has the most copies in the inventory? List both title and id.", + "SpiderSynQuestion": "Which movie has the most copies in the inventory? List both title and id.", + "query": "SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the title and id of the film that has the greatest number of copies in inventory?", + "SpiderSynQuestion": "What is the title and id of the movie that has the greatest number of copies in inventory?", + "query": "SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the film title and inventory id of the item in the inventory which was rented most frequently?", + "SpiderSynQuestion": "What is the movie title and inventory id of the item in the inventory which was rented most frequently?", + "query": "SELECT T1.title , T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the title and inventory id of the film that is rented most often.", + "SpiderSynQuestion": "Return the title and inventory id of the movie that is rented most often.", + "query": "SELECT T1.title , T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many languages are in these films?", + "SpiderSynQuestion": "How many languages are in these movies?", + "query": "SELECT count(DISTINCT language_id) FROM film" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of different languages in these films.", + "SpiderSynQuestion": "Count the number of different languages in these movies.", + "query": "SELECT count(DISTINCT language_id) FROM film" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are all the movies rated as R? List the titles.", + "SpiderSynQuestion": "What are all the movies rated as R? List the titles.", + "query": "SELECT title FROM film WHERE rating = 'R'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the titles of any movies with an R rating.", + "SpiderSynQuestion": "Return the titles of any movies with an R rating.", + "query": "SELECT title FROM film WHERE rating = 'R'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Where is store 1 located?", + "SpiderSynQuestion": "Where is store 1 located?", + "query": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the address of store 1.", + "SpiderSynQuestion": "Return the location of store 1.", + "query": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which staff handled least number of payments? List the full name and the id.", + "SpiderSynQuestion": "Which staff handled least number of payments? List the full name and the id.", + "query": "SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Give the full name and staff id of the staff who has handled the fewest payments.", + "SpiderSynQuestion": "Give the full name and staff id of the staff who has handled the fewest payments.", + "query": "SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which language does the film AIRPORT POLLOCK use? List the language name.", + "SpiderSynQuestion": "Which language does the movie AIRPORT POLLOCK use? List the language name.", + "query": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the name of the language that the film 'AIRPORT POLLOCK' is in?", + "SpiderSynQuestion": "What is the name of the language that the movie 'AIRPORT POLLOCK' is in?", + "query": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many stores are there?", + "SpiderSynQuestion": "How many warehouses are there?", + "query": "SELECT count(*) FROM store" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of stores.", + "SpiderSynQuestion": "Count the number of warehouse.", + "query": "SELECT count(*) FROM store" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many kinds of different ratings are listed?", + "SpiderSynQuestion": "How many kinds of different ratings are listed?", + "query": "SELECT count(DISTINCT rating) FROM film" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of different film ratings.", + "SpiderSynQuestion": "Count the number of different movie scores.", + "query": "SELECT count(DISTINCT rating) FROM film" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which movies have 'Deleted Scenes' as a substring in the special feature?", + "SpiderSynQuestion": "Which movies have 'Deleted Scenes' as a substring in the special feature?", + "query": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the titles of films that include 'Deleted Scenes' in their special feature section.", + "SpiderSynQuestion": "Return the titles of movies that include 'Deleted Scenes' in their special feature section.", + "query": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "How many items in inventory does store 1 have?", + "SpiderSynQuestion": "How many items in inventory does store 1 have?", + "query": "SELECT count(*) FROM inventory WHERE store_id = 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Count the number of items store 1 has in stock.", + "SpiderSynQuestion": "Count the number of items store 1 has in stock.", + "query": "SELECT count(*) FROM inventory WHERE store_id = 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "When did the first payment happen?", + "SpiderSynQuestion": "When did the first payment happen?", + "query": "SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What was the date of the earliest payment?", + "SpiderSynQuestion": "What was the day of the earliest payment?", + "query": "SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Where does the customer with the first name Linda live? And what is her email?", + "SpiderSynQuestion": "Where does the client with the forename Linda live? And what is her email?", + "query": "SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the address and email of the customer with the first name Linda.", + "SpiderSynQuestion": "Return the location and email of the client with the forename Linda.", + "query": "SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.", + "SpiderSynQuestion": "Find all the movies longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.", + "query": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?", + "SpiderSynQuestion": "What are the titles of movies that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?", + "query": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the first name and the last name of the customer who made the earliest rental?", + "SpiderSynQuestion": "What is the forename and the family name of the customer who made the earliest rental?", + "query": "SELECT T1.first_name , T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the full name of the customer who made the first rental.", + "SpiderSynQuestion": "Return the full name of the client who made the first rental.", + "query": "SELECT T1.first_name , T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?", + "SpiderSynQuestion": "What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?", + "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.", + "SpiderSynQuestion": "Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.", + "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Which store has most the customers?", + "SpiderSynQuestion": "Which warehouse has most the clients?", + "query": "SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the id of the store with the most customers.", + "SpiderSynQuestion": "Return the id of the warehouse with the most clients.", + "query": "SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What is the largest payment amount?", + "SpiderSynQuestion": "What is the largest payment amount?", + "query": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the amount of the largest payment.", + "SpiderSynQuestion": "Return the amount of the largest payment.", + "query": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Where does the staff member with the first name Elsa live?", + "SpiderSynQuestion": "Where does the employee member with the forename Elsa live?", + "query": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Give the address of the staff member who has the first name Elsa.", + "SpiderSynQuestion": "Give the location of the staff member who has the forename Elsa.", + "query": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?", + "SpiderSynQuestion": "What are the forename of customers who have not rented any films after '2005-08-23 02:06:01'?", + "query": "SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01' )" + }, + { + "db_id": "sakila_1", + "SpiderQuestion": "Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.", + "SpiderSynQuestion": "Return the forename of customers who did not rented a film after the date '2005-08-23 02:06:01'.", + "query": "SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01' )" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "How many bank branches are there?", + "SpiderSynQuestion": "How many bank branches are there?", + "query": "SELECT count(*) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Count the number of bank branches.", + "SpiderSynQuestion": "Count the number of bank branches.", + "query": "SELECT count(*) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "How many customers are there?", + "SpiderSynQuestion": "How many clients are there?", + "query": "SELECT sum(no_of_customers) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the total number of customers across banks?", + "SpiderSynQuestion": "What is the total number of clients across banks?", + "query": "SELECT sum(no_of_customers) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the number of customers in the banks at New York City.", + "SpiderSynQuestion": "Find the number of clients in the banks at New York City.", + "query": "SELECT sum(no_of_customers) FROM bank WHERE city = 'New York City'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the total number of customers who use banks in New York City?", + "SpiderSynQuestion": "What is the total number of clients who use banks in New York City?", + "query": "SELECT sum(no_of_customers) FROM bank WHERE city = 'New York City'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the average number of customers in all banks of Utah state.", + "SpiderSynQuestion": "Find the average number of clients in all banks of Utah state.", + "query": "SELECT avg(no_of_customers) FROM bank WHERE state = 'Utah'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the average number of customers across banks in the state of Utah?", + "SpiderSynQuestion": "What is the average number of clients across banks in the state of Utah?", + "query": "SELECT avg(no_of_customers) FROM bank WHERE state = 'Utah'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the average number of customers cross all banks.", + "SpiderSynQuestion": "Find the average number of clients cross all banks.", + "query": "SELECT avg(no_of_customers) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the average number of bank customers?", + "SpiderSynQuestion": "What is the average number of bank clients?", + "query": "SELECT avg(no_of_customers) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the city and state of the bank branch named morningside.", + "SpiderSynQuestion": "Find the city and state of the bank branch named morningside.", + "query": "SELECT city , state FROM bank WHERE bname = 'morningside'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What city and state is the bank with the name morningside in?", + "SpiderSynQuestion": "What city and state is the bank with the name morningside in?", + "query": "SELECT city , state FROM bank WHERE bname = 'morningside'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the branch names of banks in the New York state.", + "SpiderSynQuestion": "Find the branch names of banks in the New York state.", + "query": "SELECT bname FROM bank WHERE state = 'New York'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of banks in the state of New York?", + "SpiderSynQuestion": "What are the names of banks in the state of New York?", + "query": "SELECT bname FROM bank WHERE state = 'New York'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "List the name of all customers sorted by their account balance in ascending order.", + "SpiderSynQuestion": "List the name of all clients sorted by their account balance in ascending order.", + "query": "SELECT cust_name FROM customer ORDER BY acc_bal" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of all customers, ordered by account balance?", + "SpiderSynQuestion": "What are the names of all clients, ordered by account balance?", + "query": "SELECT cust_name FROM customer ORDER BY acc_bal" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "List the name of all different customers who have some loan sorted by their total loan amount.", + "SpiderSynQuestion": "List the name of all different clients who have some loan sorted by their total loan amount.", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount)" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?", + "SpiderSynQuestion": "What are the names of the different clients who have taken out a loan, ordered by the total amount that they have taken?", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount)" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the state, account type, and credit score of the customer whose number of loan is 0.", + "SpiderSynQuestion": "Find the state, account type, and credit score of the client whose number of loan is 0.", + "query": "SELECT state , acc_type , credit_score FROM customer WHERE no_of_loans = 0" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the states, account types, and credit scores for customers who have 0 loans?", + "SpiderSynQuestion": "What are the states, account types, and credit scores for clients who have 0 loans?", + "query": "SELECT state , acc_type , credit_score FROM customer WHERE no_of_loans = 0" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the number of different cities which banks are located at.", + "SpiderSynQuestion": "Find the number of different cities which banks are located at.", + "query": "SELECT count(DISTINCT city) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "In how many different cities are banks located?", + "SpiderSynQuestion": "In how many different cities are banks located?", + "query": "SELECT count(DISTINCT city) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the number of different states which banks are located at.", + "SpiderSynQuestion": "Find the number of different states which banks are located at.", + "query": "SELECT count(DISTINCT state) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "In how many different states are banks located?", + "SpiderSynQuestion": "In how many different states are banks located?", + "query": "SELECT count(DISTINCT state) FROM bank" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "How many distinct types of accounts are there?", + "SpiderSynQuestion": "How many different categories of accounts are there?", + "query": "SELECT count(DISTINCT acc_type) FROM customer" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Count the number of different account types.", + "SpiderSynQuestion": "Count the number of different account categories.", + "query": "SELECT count(DISTINCT acc_type) FROM customer" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.", + "SpiderSynQuestion": "Find the name and account balance of the client whose name includes the letter \u2018a\u2019.", + "query": "SELECT cust_name , acc_bal FROM customer WHERE cust_name LIKE '%a%'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names and account balances of customers with the letter a in their names?", + "SpiderSynQuestion": "What are the names and account balances of clients with the letter a in their names?", + "query": "SELECT cust_name , acc_bal FROM customer WHERE cust_name LIKE '%a%'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the total account balance of each customer from Utah or Texas.", + "SpiderSynQuestion": "Find the total account balance of each client from Utah or Texas.", + "query": "SELECT sum(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the total account balances for each customer from Utah or Texas?", + "SpiderSynQuestion": "What are the total account balances for each client from Utah or Texas?", + "query": "SELECT sum(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customers who have both saving and checking account types.", + "SpiderSynQuestion": "Find the name of clients who have both saving and checking account types.", + "query": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of customers who have both savings and checking accounts?", + "SpiderSynQuestion": "What are the names of clients who have both savings and checking accounts?", + "query": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customers who do not have an saving account.", + "SpiderSynQuestion": "Find the name of clients who do not have an saving account.", + "query": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of customers who do not have saving accounts?", + "SpiderSynQuestion": "What are the names of clients who do not have saving accounts?", + "query": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customers who do not have a loan with a type of Mortgages.", + "SpiderSynQuestion": "Find the name of clients who do not have a loan with a type of Mortgages.", + "query": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of customers who have not taken a Mortage loan?", + "SpiderSynQuestion": "What are the names of clients who have not taken a Mortage loan?", + "query": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customers who have loans of both Mortgages and Auto.", + "SpiderSynQuestion": "Find the name of clients who have loans of both Mortgages and Auto.", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of customers who have taken both Mortgage and Auto loans?", + "SpiderSynQuestion": "What are the names of clients who have taken both Mortgage and Auto loans?", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customers whose credit score is below the average credit scores of all customers.", + "SpiderSynQuestion": "Find the name of clients whose credit score is below the average credit scores of all clients.", + "query": "SELECT cust_name FROM customer WHERE credit_score < (SELECT avg(credit_score) FROM customer)" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of customers with credit score less than the average credit score across customers?", + "SpiderSynQuestion": "What are the names of clients with credit score less than the average credit score across clients?", + "query": "SELECT cust_name FROM customer WHERE credit_score < (SELECT avg(credit_score) FROM customer)" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the branch name of the bank that has the most number of customers.", + "SpiderSynQuestion": "Find the branch name of the bank that has the most number of clients.", + "query": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the name of the bank branch with the greatest number of customers?", + "SpiderSynQuestion": "What is the name of the bank branch with the greatest number of clients?", + "query": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customer who has the lowest credit score.", + "SpiderSynQuestion": "Find the name of client who has the lowest credit score.", + "query": "SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the name of the customer with the worst credit score?", + "SpiderSynQuestion": "What is the name of the client with the worst credit score?", + "query": "SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name, account type, and account balance of the customer who has the highest credit score.", + "SpiderSynQuestion": "Find the name, account category, and account balance of the client who has the highest credit score.", + "query": "SELECT cust_name , acc_type , acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the name, account type, and account balance corresponding to the customer with the highest credit score?", + "SpiderSynQuestion": "What is the name, account category, and account balance corresponding to the client with the highest credit score?", + "query": "SELECT cust_name , acc_type , acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customer who has the highest amount of loans.", + "SpiderSynQuestion": "Find the name of client who has the highest amount of loans.", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the name of the customer who has greatest total loan amount?", + "SpiderSynQuestion": "What is the name of the client who has greatest total loan amount?", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the state which has the most number of customers.", + "SpiderSynQuestion": "Find the state which has the most number of clients.", + "query": "SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Which state has the greatest total number of bank customers?", + "SpiderSynQuestion": "Which state has the greatest total number of bank clients?", + "query": "SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "For each account type, find the average account balance of customers with credit score lower than 50.", + "SpiderSynQuestion": "For each account category, find the average account balance of clients with credit score lower than 50.", + "query": "SELECT avg(acc_bal) , acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the average account balance of customers with credit score below 50 for the different account types?", + "SpiderSynQuestion": "What is the average account balance of clients with credit score below 50 for the different account categories?", + "query": "SELECT avg(acc_bal) , acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "For each state, find the total account balance of customers whose credit score is above 100.", + "SpiderSynQuestion": "For each state, find the total account balance of clients whose credit score is above 100.", + "query": "SELECT sum(acc_bal) , state FROM customer WHERE credit_score > 100 GROUP BY state" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the total account balance for customers with a credit score of above 100 for the different states?", + "SpiderSynQuestion": "What is the total account balance for clients with a credit score of above 100 for the different states?", + "query": "SELECT sum(acc_bal) , state FROM customer WHERE credit_score > 100 GROUP BY state" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the total amount of loans offered by each bank branch.", + "SpiderSynQuestion": "Find the total amount of loans offered by each bank branch.", + "query": "SELECT sum(amount) , T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of the different bank branches, and what are their total loan amounts?", + "SpiderSynQuestion": "What are the names of the different bank branches, and what are their total loan amounts?", + "query": "SELECT sum(amount) , T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of customers who have more than one loan.", + "SpiderSynQuestion": "Find the name of clients who have more than one loan.", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING count(*) > 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of customers who have taken out more than one loan?", + "SpiderSynQuestion": "What are the names of clients who have taken out more than one loan?", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING count(*) > 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name and account balance of the customers who have loans with a total amount of more than 5000.", + "SpiderSynQuestion": "Find the name and account balance of the clients who have loans with a total amount of more than 5000.", + "query": "SELECT T1.cust_name , T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount) > 5000" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?", + "SpiderSynQuestion": "What are the names and account balances for clients who have taken a total amount of more than 5000 in loans?", + "query": "SELECT T1.cust_name , T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount) > 5000" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of bank branch that provided the greatest total amount of loans.", + "SpiderSynQuestion": "Find the name of bank branch that provided the greatest total amount of loans.", + "query": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the name of the bank branch that has lent the greatest amount?", + "SpiderSynQuestion": "What is the name of the bank branch that has lent the greatest amount?", + "query": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.", + "SpiderSynQuestion": "Find the name of bank branch that provided the greatest total amount of loans to clients with credit score is less than 100.", + "query": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?", + "SpiderSynQuestion": "What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?", + "query": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name of bank branches that provided some loans.", + "SpiderSynQuestion": "Find the name of bank branches that provided some loans.", + "query": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of the different banks that have provided loans?", + "SpiderSynQuestion": "What are the names of the different banks that have provided loans?", + "query": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the name and credit score of the customers who have some loans.", + "SpiderSynQuestion": "Find the name and credit score of the clients who have some loans.", + "query": "SELECT DISTINCT T1.cust_name , T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the different names and credit scores of customers who have taken a loan?", + "SpiderSynQuestion": "What are the different names and credit scores of clients who have taken a loan?", + "query": "SELECT DISTINCT T1.cust_name , T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the the name of the customers who have a loan with amount more than 3000.", + "SpiderSynQuestion": "Find the the name of the clients who have a loan with amount more than 3000.", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of customers who have a loan of more than 3000 in amount?", + "SpiderSynQuestion": "What are the names of clients who have a loan of more than 3000 in amount?", + "query": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the city and name of bank branches that provide business loans.", + "SpiderSynQuestion": "Find the city and name of bank branches that provide business loans.", + "query": "SELECT T1.bname , T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names and cities of bank branches that offer loans for business?", + "SpiderSynQuestion": "What are the names and cities of bank branches that offer loans for business?", + "query": "SELECT T1.bname , T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.", + "SpiderSynQuestion": "Find the names of bank branches that have provided a loan to any client whose credit score is below 100.", + "query": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What are the names of banks that have loaned money to customers with credit scores below 100?", + "SpiderSynQuestion": "What are the names of banks that have loaned money to clients with credit scores below 100?", + "query": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the total amount of loans provided by bank branches in the state of New York.", + "SpiderSynQuestion": "Find the total amount of loans provided by bank branches in the state of New York.", + "query": "SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the total amount of money loaned by banks in New York state?", + "SpiderSynQuestion": "What is the total amount of money loaned by banks in New York state?", + "query": "SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the average credit score of the customers who have some loan.", + "SpiderSynQuestion": "Find the average credit score of the clients who have some loan.", + "query": "SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the average credit score for customers who have taken a loan?", + "SpiderSynQuestion": "What is the average credit score for clients who have taken a loan?", + "query": "SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "Find the average credit score of the customers who do not have any loan.", + "SpiderSynQuestion": "Find the average credit score of the clients who do not have any loan.", + "query": "SELECT avg(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan)" + }, + { + "db_id": "loan_1", + "SpiderQuestion": "What is the average credit score for customers who have never taken a loan?", + "SpiderSynQuestion": "What is the average credit score for clients who have never taken a loan?", + "query": "SELECT avg(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan)" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "How many assessment notes are there in total?", + "SpiderSynQuestion": "How many assessment notes are there in total?", + "query": "SELECT count(*) FROM ASSESSMENT_NOTES" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the dates of the assessment notes?", + "SpiderSynQuestion": "What are the day of the assessment notes?", + "query": "SELECT date_of_notes FROM Assessment_Notes" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "How many addresses have zip code 197?", + "SpiderSynQuestion": "How many locations have zip code 197?", + "query": "SELECT count(*) FROM ADDRESSES WHERE zip_postcode = \"197\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "How many distinct incident type codes are there?", + "SpiderSynQuestion": "How many different event type codes are there?", + "query": "SELECT count(DISTINCT incident_type_code) FROM Behavior_Incident" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Return all distinct detention type codes.", + "SpiderSynQuestion": "Return all different detainment type codes.", + "query": "SELECT DISTINCT detention_type_code FROM Detention" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the start and end dates for incidents with incident type code \"NOISE\"?", + "SpiderSynQuestion": "What are the start and end day for event with event type code \"NOISE\"?", + "query": "SELECT date_incident_start , date_incident_end FROM Behavior_Incident WHERE incident_type_code = \"NOISE\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Return all detention summaries.", + "SpiderSynQuestion": "Return all detainment summaries.", + "query": "SELECT detention_summary FROM Detention" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Return the cell phone number and email address for all students.", + "SpiderSynQuestion": "Return the mobile phone number and email address for all students.", + "query": "SELECT cell_mobile_number , email_address FROM STUDENTS" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What is the email of the student with first name \"Emma\" and last name \"Rohan\"?", + "SpiderSynQuestion": "What is the email of the student with first name \"Emma\" and last name \"Rohan\"?", + "query": "SELECT email_address FROM Students WHERE first_name = \"Emma\" AND last_name = \"Rohan\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "How many distinct students have been in detention?", + "SpiderSynQuestion": "How many different students have been in detainment?", + "query": "SELECT count(DISTINCT student_id) FROM Students_in_Detention" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What is the gender of the teacher with last name \"Medhurst\"?", + "SpiderSynQuestion": "What is the sex of the teacher with last name \"Medhurst\"?", + "query": "SELECT gender FROM TEACHERS WHERE last_name = \"Medhurst\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What is the incident type description for the incident type with code \"VIOLENCE\"?", + "SpiderSynQuestion": "What is the event type describing content for the even type with code \"VIOLENCE\"?", + "query": "SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = \"VIOLENCE\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the maximum and minimum monthly rental for all student addresses.", + "SpiderSynQuestion": "Find the maximum and minimum monthly rent for all student addresses.", + "query": "SELECT max(monthly_rental) , min(monthly_rental) FROM Student_Addresses" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the first names of teachers whose email address contains the word \"man\".", + "SpiderSynQuestion": "Find the forename of teachers whose email address contains the word \"man\".", + "query": "SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "List all information about the assessment notes sorted by date in ascending order.", + "SpiderSynQuestion": "List all information about the assessment notes sorted by date in ascending order.", + "query": "SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "List all cities of addresses in alphabetical order.", + "SpiderSynQuestion": "List all towns of locations in alphabetical order.", + "query": "SELECT city FROM Addresses ORDER BY city" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the first names and last names of teachers in alphabetical order of last name.", + "SpiderSynQuestion": "Find the full names of teachers in alphabetical order of family name.", + "query": "SELECT first_name , last_name FROM Teachers ORDER BY last_name" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find all information about student addresses, and sort by monthly rental in descending order.", + "SpiderSynQuestion": "Find all information about student locations, and sort by monthly rent in descending order.", + "query": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the id and first name of the student that has the most number of assessment notes?", + "SpiderSynQuestion": "Find the id and forename of the student that has the most number of assessment notes?", + "query": "SELECT T1.student_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the ids and first names of the 3 teachers that have the most number of assessment notes?", + "SpiderSynQuestion": "Find the ids and forename of the 3 teachers that have the most number of assessment notes?", + "query": "SELECT T1.teacher_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the id and last name of the student that has the most behavior incidents?", + "SpiderSynQuestion": "Find the id and family name of the student that has the most behavior incidents?", + "query": "SELECT T1.student_id , T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the id and last name of the teacher that has the most detentions with detention type code \"AFTER\"?", + "SpiderSynQuestion": "Find the id and family name of the teacher that has the most detentions with detention type code \"AFTER\"?", + "query": "SELECT T1.teacher_id , T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = \"AFTER\" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the id and first name of the student whose addresses have the highest average monthly rental?", + "SpiderSynQuestion": "What are the id and forename of the student whose addresses have the highest average monthly rental?", + "query": "SELECT T1.student_id , T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the id and city of the student address with the highest average monthly rental.", + "SpiderSynQuestion": "Find the id and town of the student location with the highest average monthly rental.", + "query": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the code and description of the most frequent behavior incident type?", + "SpiderSynQuestion": "What are the code and describing content of the most frequent behavior incident type?", + "query": "SELECT T1.incident_type_code , T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the code and description of the least frequent detention type ?", + "SpiderSynQuestion": "What are the code and describing content of the least frequent detainment type ?", + "query": "SELECT T1.detention_type_code , T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the dates of assessment notes for students with first name \"Fanny\".", + "SpiderSynQuestion": "Find the day of assessment notes for students with forename \"Fanny\".", + "query": "SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = \"Fanny\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the texts of assessment notes for teachers with last name \"Schuster\".", + "SpiderSynQuestion": "Find the texts of assessment notes for teachers with family name \"Schuster\".", + "query": "SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schuster\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the start and end dates of behavior incidents of students with last name \"Fahey\".", + "SpiderSynQuestion": "Find the start and end day of behavior events of students with surname \"Fahey\".", + "query": "SELECT T1.date_incident_start , date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = \"Fahey\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the start and end dates of detentions of teachers with last name \"Schultz\".", + "SpiderSynQuestion": "Find the start and end day of detainments of teachers with surname \"Schultz\".", + "query": "SELECT T1.datetime_detention_start , datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schultz\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the id and zip code of the address with the highest monthly rental?", + "SpiderSynQuestion": "What are the id and postal code of the address with the highest monthly rent?", + "query": "SELECT T2.address_id , T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What is the cell phone number of the student whose address has the lowest monthly rental?", + "SpiderSynQuestion": "What is the mobile phone number of the student whose address has the lowest monthly rental?", + "query": "SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the monthly rentals of student addresses in Texas state?", + "SpiderSynQuestion": "What are the monthly rent of student locations in Texas state?", + "query": "SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = \"Texas\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the first names and last names of students with address in Wisconsin state?", + "SpiderSynQuestion": "What are the forename and surname of students with address in Wisconsin state?", + "query": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = \"Wisconsin\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the line 1 and average monthly rentals of all student addresses?", + "SpiderSynQuestion": "What are the line 1 and average monthly rent of all student addresses?", + "query": "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" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What is the zip code of the address where the teacher with first name \"Lyla\" lives?", + "SpiderSynQuestion": "What is the postal code of the location where the teacher with forename \"Lyla\" lives?", + "query": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = \"Lyla\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the email addresses of teachers whose address has zip code \"918\"?", + "SpiderSynQuestion": "What are the email addresses of teachers whose address has zip code \"918\"?", + "query": "SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = \"918\"" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "How many students are not involved in any behavior incident?", + "SpiderSynQuestion": "How many students are not involved in any behavior event?", + "query": "SELECT count(*) FROM STUDENTS WHERE student_id NOT IN ( SELECT student_id FROM Behavior_Incident )" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "Find the last names of teachers who are not involved in any detention.", + "SpiderSynQuestion": "Find the family names of teachers who are not involved in any detention.", + "query": "SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id" + }, + { + "db_id": "behavior_monitoring", + "SpiderQuestion": "What are the line 1 of addresses shared by some students and some teachers?", + "SpiderSynQuestion": "What are the line 1 of locations shared by some students and some teachers?", + "query": "SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.", + "SpiderSynQuestion": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and information.", + "query": "SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count(*) = 2 INTERSECT SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count(*) < 2" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "How many assets does each maintenance contract contain? List the number and the contract id.", + "SpiderSynQuestion": "How many assets does each maintenance contract contain? List the number and the contract id.", + "query": "SELECT count(*) , T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "How many assets does each third party company supply? List the count and the company id.", + "SpiderSynQuestion": "How many assets does each third party enterprise supply? List the count and the enterprise id.", + "query": "SELECT count(*) , T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id = T2.supplier_company_id GROUP BY T1.company_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.", + "SpiderSynQuestion": "Which third party enterprise have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the enterprise id and name.", + "query": "SELECT T1.company_id , T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING count(*) >= 2 UNION SELECT T3.company_id , T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING count(*) >= 2" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?", + "SpiderSynQuestion": "What is the name and id of the employee who recorded the fault log but has not contacted any visiting engineers?", + "query": "SELECT T1.staff_name , T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name , T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which engineer has visited the most times? Show the engineer id, first name and last name.", + "SpiderSynQuestion": "Which engineer has visited the most times? Show the engineer id, full name.", + "query": "SELECT T1.engineer_id , T1.first_name , T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which parts have more than 2 faults? Show the part name and id.", + "SpiderSynQuestion": "Which components have more than 2 faults? Show the component name and id.", + "query": "SELECT T1.part_name , T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING count(*) > 2" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "List all every engineer's first name, last name, details and coresponding skill description.", + "SpiderSynQuestion": "List all every engineer's forename, surname, detail and coresponding skill describing content.", + "query": "SELECT T1.first_name , T1.last_name , T1.other_details , T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.", + "SpiderSynQuestion": "For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill describing content.", + "query": "SELECT T1.fault_short_name , T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "How many assets can each parts be used in? List the part name and the number.", + "SpiderSynQuestion": "How many assets can each component be used in? List the component name and the number.", + "query": "SELECT T1.part_name , count(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "What are all the fault descriptions and the fault status of all the faults recoreded in the logs?", + "SpiderSynQuestion": "What are all the fault descriptions and the fault status of all the fault recoreded in the logs?", + "query": "SELECT T1.fault_description , T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", + "SpiderSynQuestion": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", + "query": "SELECT count(*) , T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "What are all the distinct last names of all the engineers?", + "SpiderSynQuestion": "What are all the different family names of all the engineers?", + "query": "SELECT DISTINCT last_name FROM Maintenance_Engineers" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "How many fault status codes are recorded in the fault log parts table?", + "SpiderSynQuestion": "How many fault status codes are recorded in the fault log parts table?", + "query": "SELECT DISTINCT fault_status FROM Fault_Log_Parts" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which engineers have never visited to maintain the assets? List the engineer first name and last name.", + "SpiderSynQuestion": "Which engineers have never visited to maintain the assets? List the engineer full name.", + "query": "SELECT first_name , last_name FROM Maintenance_Engineers WHERE engineer_id NOT IN (SELECT engineer_id FROM Engineer_Visits)" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "List the asset id, details, make and model for every asset.", + "SpiderSynQuestion": "List the asset id, information, make and type for every asset.", + "query": "SELECT asset_id , asset_details , asset_make , asset_model FROM Assets" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "When was the first asset acquired?", + "SpiderSynQuestion": "When was the first asset acquired?", + "query": "SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which part fault requires the most number of skills to fix? List part id and name.", + "SpiderSynQuestion": "Which component fault requires the most number of skills to fix? List component id and name.", + "query": "SELECT T1.part_id , T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which kind of part has the least number of faults? List the part name.", + "SpiderSynQuestion": "Which kind of component has the least number of faults? List the component name.", + "query": "SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.", + "SpiderSynQuestion": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, full name.", + "query": "SELECT T1.engineer_id , T1.first_name , T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id = T2.engineer_id GROUP BY T1.engineer_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.", + "SpiderSynQuestion": "Which employee have contacted which engineers? List the employee name and the engineer forename and surname.", + "query": "SELECT T1.staff_name , T3.first_name , T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which fault log included the most number of faulty parts? List the fault log id, description and record time.", + "SpiderSynQuestion": "Which fault log included the most number of faulty parts? List the fault log id, describing content and record time.", + "query": "SELECT T1.fault_log_entry_id , T1.fault_description , T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which skill is used in fixing the most number of faults? List the skill id and description.", + "SpiderSynQuestion": "Which skill is used in fixing the most number of faults? List the skill id and describing content.", + "query": "SELECT T1.skill_id , T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "What are all the distinct asset models?", + "SpiderSynQuestion": "What are all the distinct asset models?", + "query": "SELECT DISTINCT asset_model FROM Assets" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "List the all the assets make, model, details by the disposed date ascendingly.", + "SpiderSynQuestion": "List the all the assets make, type, detail by the disposed date ascendingly.", + "query": "SELECT asset_make , asset_model , asset_details FROM Assets ORDER BY asset_disposed_date ASC" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which part has the least chargeable amount? List the part id and amount.", + "SpiderSynQuestion": "Which component has the least chargeable amount? List the component id and amount.", + "query": "SELECT part_id , chargeable_amount FROM Parts ORDER BY chargeable_amount ASC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which company started the earliest the maintenance contract? Show the company name.", + "SpiderSynQuestion": "Which enterprise started the earliest the maintenance contract? Show the enterprise name.", + "query": "SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "What is the description of the type of the company who concluded its contracts most recently?", + "SpiderSynQuestion": "What is the describing content of the type of the enterprise who concluded its contracts most recently?", + "query": "SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id JOIN Ref_Company_Types AS T3 ON T1.company_type_code = T3.company_type_code ORDER BY T2.contract_end_date DESC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which gender makes up the majority of the staff?", + "SpiderSynQuestion": "Which sex makes up the majority of the employee?", + "query": "SELECT gender FROM staff GROUP BY gender ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.", + "SpiderSynQuestion": "How many engineers did each employee contact? List both the contact employee name and number of engineers contacted.", + "query": "SELECT T1.staff_name , count(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name" + }, + { + "db_id": "assets_maintenance", + "SpiderQuestion": "Which assets did not incur any fault log? List the asset model.", + "SpiderSynQuestion": "Which assets did not incur any fault log? List the asset type.", + "query": "SELECT asset_model FROM Assets WHERE asset_id NOT IN (SELECT asset_id FROM Fault_Log)" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "list the local authorities and services provided by all stations.", + "SpiderSynQuestion": "list the local authorities and services provided by all terminals.", + "query": "SELECT local_authority , services FROM station" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "show all train numbers and names ordered by their time from early to late.", + "SpiderSynQuestion": "show all train numbers and names ordered by their time from early to late.", + "query": "SELECT train_number , name FROM train ORDER BY TIME" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Give me the times and numbers of all trains that go to Chennai, ordered by time.", + "SpiderSynQuestion": "Give me the times and numbers of all trains that go to Chennai, ordered by time.", + "query": "SELECT TIME , train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "How many trains have 'Express' in their names?", + "SpiderSynQuestion": "How many trains have 'Express' in their names?", + "query": "SELECT count(*) FROM train WHERE name LIKE \"%Express%\"" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find the number and time of the train that goes from Chennai to Guruvayur.", + "SpiderSynQuestion": "Find the number and time of the train that goes from Chennai to Guruvayur.", + "query": "SELECT train_number , TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find the number of trains starting from each origin.", + "SpiderSynQuestion": "Find the number of trains starting from each origin.", + "query": "SELECT origin , count(*) FROM train GROUP BY origin" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find the name of the train whose route runs through greatest number of stations.", + "SpiderSynQuestion": "Find the name of the train whose route runs through greatest number of stations.", + "query": "SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id = t2.train_id GROUP BY t2.train_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find the number of trains for each station, as well as the station network name and services.", + "SpiderSynQuestion": "Find the number of trains for each terminal, as well as the terminal network name and services.", + "query": "SELECT count(*) , t1.network_name , t1.services FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "What is the average high temperature for each day of week?", + "SpiderSynQuestion": "What is the average high temperature for each day of week?", + "query": "SELECT avg(high_temperature) , day_of_week FROM weekly_weather GROUP BY day_of_week" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Give me the maximum low temperature and average precipitation at the Amersham station.", + "SpiderSynQuestion": "Give me the maximum low temperature and average precipitation at the Amersham station.", + "query": "SELECT max(t1.low_temperature) , avg(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = \"Amersham\"" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find names and times of trains that run through stations for the local authority Chiltern.", + "SpiderSynQuestion": "Find names and times of trains that run through terminals for the local authority Chiltern.", + "query": "SELECT t3.name , t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = \"Chiltern\"" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "How many different services are provided by all stations?", + "SpiderSynQuestion": "How many different services are provided by all terminals?", + "query": "SELECT count(DISTINCT services) FROM station" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find the id and local authority of the station with has the highest average high temperature.", + "SpiderSynQuestion": "Find the id and local authority of the terminal with has the highest average high temperature.", + "query": "SELECT t2.id , t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY avg(high_temperature) DESC LIMIT 1" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find the id and local authority of the station whose maximum precipitation is higher than 50.", + "SpiderSynQuestion": "Find the id and local authority of the station whose maximum precipitation is higher than 50.", + "query": "SELECT t2.id , t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id HAVING max(t1.precipitation) > 50" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "show the lowest low temperature and highest wind speed in miles per hour.", + "SpiderSynQuestion": "show the lowest low temperature and highest wind velocity in miles per hour.", + "query": "SELECT min(low_temperature) , max(wind_speed_mph) FROM weekly_weather" + }, + { + "db_id": "station_weather", + "SpiderQuestion": "Find the origins from which more than 1 train starts.", + "SpiderSynQuestion": "Find the starting point from which more than 1 train starts.", + "query": "SELECT origin FROM train GROUP BY origin HAVING count(*) > 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of professors in accounting department.", + "SpiderSynQuestion": "Find the number of professors in accounting division.", + "query": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = \"Accounting\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors are in the accounting dept?", + "SpiderSynQuestion": "How many professors are in the accounting dept?", + "query": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = \"Accounting\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors are teaching class with code ACCT-211?", + "SpiderSynQuestion": "How many professors are teaching class with code ACCT-211?", + "query": "SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = \"ACCT-211\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors teach a class with the code ACCT-211?", + "SpiderSynQuestion": "How many professors teach a class with the code ACCT-211?", + "query": "SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = \"ACCT-211\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first and last name of the professor in biology department?", + "SpiderSynQuestion": "What is the full name of the professor in biology department?", + "query": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first and last name of all biology professors?", + "SpiderSynQuestion": "What are the forename and surname of all biology professors?", + "query": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names and date of birth of professors teaching course ACCT-211?", + "SpiderSynQuestion": "What are the forename and birthday of professors teaching course ACCT-211?", + "query": "SELECT DISTINCT T1.EMP_FNAME , T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = \"ACCT-211\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names and birthdates of the professors in charge of ACCT-211?", + "SpiderSynQuestion": "What are the forename and birthdates of the professors in charge of ACCT-211?", + "query": "SELECT DISTINCT T1.EMP_FNAME , T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = \"ACCT-211\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many classes are professor whose last name is Graztevski has?", + "SpiderSynQuestion": "How many classes are professor whose last name is Graztevski has?", + "query": "SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many classes does the professor whose last name is Graztevski teach?", + "SpiderSynQuestion": "How many classes does the professor whose last name is Graztevski teach?", + "query": "SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the code of the school where the accounting department belongs to?", + "SpiderSynQuestion": "What is the code of the school where the accounting department belongs to?", + "query": "SELECT school_code FROM department WHERE dept_name = \"Accounting\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the school code of the accounting department?", + "SpiderSynQuestion": "What is the school code of the accounting department?", + "query": "SELECT school_code FROM department WHERE dept_name = \"Accounting\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many credits does course CIS-220 have, and what its description?", + "SpiderSynQuestion": "How many credits does course CIS-220 have, and what its describing content?", + "query": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'CIS-220'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the description for the CIS-220 and how many credits does it have?", + "SpiderSynQuestion": "What is the describing content for the CIS-220 and how many credits does it have?", + "query": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'CIS-220'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "what is the address of history department?", + "SpiderSynQuestion": "what is the location of history department?", + "query": "SELECT dept_address FROM department WHERE dept_name = 'History'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Where is the history department?", + "SpiderSynQuestion": "Where is the history department?", + "query": "SELECT dept_address FROM department WHERE dept_name = 'History'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many different locations does the school with code BUS has?", + "SpiderSynQuestion": "How many different locations does the school with code BUS has?", + "query": "SELECT count(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the different locations of the school with the code BUS?", + "SpiderSynQuestion": "What are the different locations of the school with the code BUS?", + "query": "SELECT count(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many different locations does each school have?", + "SpiderSynQuestion": "How many different locations does each school have?", + "query": "SELECT count(DISTINCT dept_address) , school_code FROM department GROUP BY school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Count different addresses of each school.", + "SpiderSynQuestion": "Count different locations of each school.", + "query": "SELECT count(DISTINCT dept_address) , school_code FROM department GROUP BY school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the description and credit for the course QM-261?", + "SpiderSynQuestion": "Find the describing content and credit for the course QM-261?", + "query": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'QM-261'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the course description and number of credits for QM-261?", + "SpiderSynQuestion": "What is the course describing content and number of credits for QM-261?", + "query": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'QM-261'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of departments in each school.", + "SpiderSynQuestion": "Find the number of departments in each school.", + "query": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many departments are in each school?", + "SpiderSynQuestion": "How many departments are in each school?", + "query": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of different departments in each school whose number of different departments is less than 5.", + "SpiderSynQuestion": "Find the number of different departments in each school whose number of different departments is less than 5.", + "query": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code HAVING count(DISTINCT dept_name) < 5" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many different departments are there in each school that has less than 5 apartments?", + "SpiderSynQuestion": "How many different departments are there in each school that has less than 5 apartments?", + "query": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code HAVING count(DISTINCT dept_name) < 5" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many sections does each course has?", + "SpiderSynQuestion": "How many parts does each course has?", + "query": "SELECT count(*) , crs_code FROM CLASS GROUP BY crs_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many sections does each course have?", + "SpiderSynQuestion": "How many parts does each course have?", + "query": "SELECT count(*) , crs_code FROM CLASS GROUP BY crs_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the total credit does each department offer?", + "SpiderSynQuestion": "What is the total credit does each department offer?", + "query": "SELECT sum(crs_credit) , dept_code FROM course GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many credits does the department offer?", + "SpiderSynQuestion": "How many credits does the department offer?", + "query": "SELECT sum(crs_credit) , dept_code FROM course GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of classes offered for all class rooms that held at least 2 classes.", + "SpiderSynQuestion": "Find the number of classes offered for all classrooms that held at least 2 classes.", + "query": "SELECT count(*) , class_room FROM CLASS GROUP BY class_room HAVING count(*) >= 2" + }, + { + "db_id": "college_1", + "SpiderQuestion": "For each classroom with at least 2 classes, how many classes are offered?", + "SpiderSynQuestion": "For each classroom with at least 2 classes, how many classes are offered?", + "query": "SELECT count(*) , class_room FROM CLASS GROUP BY class_room HAVING count(*) >= 2" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of classes in each department.", + "SpiderSynQuestion": "Find the number of classes in each department.", + "query": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many classes are held in each department?", + "SpiderSynQuestion": "How many classes are held in each department?", + "query": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of classes in each school.", + "SpiderSynQuestion": "Find the number of classes in each school.", + "query": "SELECT count(*) , T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many classes exist for each school?", + "SpiderSynQuestion": "How many classes exist for each school?", + "query": "SELECT count(*) , T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the number of professors for different school?", + "SpiderSynQuestion": "What is the number of professors for different school?", + "query": "SELECT count(*) , T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many different professors are there for the different schools?", + "SpiderSynQuestion": "How many different professors are there for the different schools?", + "query": "SELECT count(*) , T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the count and code of the job has most employees.", + "SpiderSynQuestion": "Find the count and code of the job has most staffs.", + "query": "SELECT emp_jobcode , count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the count and code of the job with the most employee?", + "SpiderSynQuestion": "What is the count and code of the job with the most staff?", + "query": "SELECT emp_jobcode , count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Which school has the smallest amount of professors?", + "SpiderSynQuestion": "Which school has the smallest amount of professors?", + "query": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Which school has the fewest professors?", + "SpiderSynQuestion": "Which school has the fewest professors?", + "query": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of professors with a Ph.D. degree in each department.", + "SpiderSynQuestion": "Find the number of professors with a Ph.D. degree in each department.", + "query": "SELECT count(*) , dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors have a Ph.D. in each department?", + "SpiderSynQuestion": "How many professors have a Ph.D. in each department?", + "query": "SELECT count(*) , dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the number of students for each department.", + "SpiderSynQuestion": "Find the number of students for each department.", + "query": "SELECT count(*) , dept_code FROM student GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many students are in each department?", + "SpiderSynQuestion": "How many students are in each department?", + "query": "SELECT count(*) , dept_code FROM student GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the total number of hours have done for all students in each department.", + "SpiderSynQuestion": "Find the total number of hours have done for all students in each department.", + "query": "SELECT sum(stu_hrs) , dept_code FROM student GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many hours do the students spend studying in each department?", + "SpiderSynQuestion": "How many hours do the students spend studying in each department?", + "query": "SELECT sum(stu_hrs) , dept_code FROM student GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the max, average, and minimum gpa of all students in each department.", + "SpiderSynQuestion": "Find the max, average, and minimum gpa of all students in each department.", + "query": "SELECT max(stu_gpa) , avg(stu_gpa) , min(stu_gpa) , dept_code FROM student GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the highest, lowest, and average student GPA for every department?", + "SpiderSynQuestion": "What is the highest, lowest, and average student GPA for every department?", + "query": "SELECT max(stu_gpa) , avg(stu_gpa) , min(stu_gpa) , dept_code FROM student GROUP BY dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name and the average gpa of department whose students have the highest average gpa?", + "SpiderSynQuestion": "What is the name and the average gpa of department whose students have the highest average gpa?", + "query": "SELECT T2.dept_name , avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Which department has the highest average student GPA, and what is the average gpa?", + "SpiderSynQuestion": "Which department has the highest average student GPA, and what is the average gpa?", + "query": "SELECT T2.dept_name , avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "how many schools exist in total?", + "SpiderSynQuestion": "how many schools exist in total?", + "query": "SELECT count(DISTINCT school_code) FROM department" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many schools are there in the department?", + "SpiderSynQuestion": "How many schools are there in the department?", + "query": "SELECT count(DISTINCT school_code) FROM department" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many different classes are there?", + "SpiderSynQuestion": "How many different classes are there?", + "query": "SELECT count(DISTINCT class_code) FROM CLASS" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many unique classes are offered?", + "SpiderSynQuestion": "How many unique classes are offered?", + "query": "SELECT count(DISTINCT class_code) FROM CLASS" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many courses are offered?", + "SpiderSynQuestion": "How many curriculum are offered?", + "query": "SELECT count(DISTINCT crs_code) FROM CLASS" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the number of different course codes?", + "SpiderSynQuestion": "What are the number of different curriculum codes?", + "query": "SELECT count(DISTINCT crs_code) FROM CLASS" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many departments does the college has?", + "SpiderSynQuestion": "How many departments does the college has?", + "query": "SELECT count(DISTINCT dept_name) FROM department" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many different departments are there?", + "SpiderSynQuestion": "How many different departments are there?", + "query": "SELECT count(DISTINCT dept_name) FROM department" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many courses are offered by the Computer Info. Systems department?", + "SpiderSynQuestion": "How many curriculum are offered by the Computer Info. Systems department?", + "query": "SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = \"Computer Info. Systems\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many courses does the department of Computer Information Systmes offer?", + "SpiderSynQuestion": "How many curriculum does the division of Computer Information Systmes offer?", + "query": "SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = \"Computer Info. Systems\"" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many sections does course ACCT-211 has?", + "SpiderSynQuestion": "How many parts does course ACCT-211 has?", + "query": "SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the number of different class sections offered in the course ACCT-211?", + "SpiderSynQuestion": "What is the number of different class sections offered in the curriculum ACCT-211?", + "query": "SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the total credits of all classes offered by each department.", + "SpiderSynQuestion": "Find the total credits of all classes offered by each department.", + "query": "SELECT sum(T1.crs_credit) , T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the total number of credits offered by each department?", + "SpiderSynQuestion": "What are the total number of credits offered by each division?", + "query": "SELECT sum(T1.crs_credit) , T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the name of the department that offers the largest number of credits of all classes.", + "SpiderSynQuestion": "Find the name of the division that offers the largest number of credits of all classes.", + "query": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Which department offers the most credits all together?", + "SpiderSynQuestion": "Which division offers the most credits all together?", + "query": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many students enrolled in class ACCT-211?", + "SpiderSynQuestion": "How many students are registered in class ACCT-211?", + "query": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the total number of students enrolled in ACCT-211?", + "SpiderSynQuestion": "What are the total number of students are registered in ACCT-211?", + "query": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name of each student enrolled in class ACCT-211?", + "SpiderSynQuestion": "What is the forename of each student are registered in class ACCT-211?", + "query": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all students in course ACCT-211?", + "SpiderSynQuestion": "What are the forename of all students in course ACCT-211?", + "query": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name of students enrolled in class ACCT-211 and got grade C?", + "SpiderSynQuestion": "What is the forename of students enrolled in class ACCT-211 and got grade C?", + "query": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all students who took ACCT-211 and received a C?", + "SpiderSynQuestion": "What are the forename of all students who took ACCT-211 and received a C?", + "query": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the total number of employees.", + "SpiderSynQuestion": "Find the total number of staffs.", + "query": "SELECT count(*) FROM employee" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many employees are there all together?", + "SpiderSynQuestion": "How many staffs are there all together?", + "query": "SELECT count(*) FROM employee" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors do have a Ph.D. degree?", + "SpiderSynQuestion": "How many professors do have a Ph.D. degree?", + "query": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the total number of professors with a Ph.D. ?", + "SpiderSynQuestion": "What is the total number of professors with a Ph.D. ?", + "query": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many students are enrolled in the class taught by some professor from the accounting department?", + "SpiderSynQuestion": "How many students are registered in the class taught by some professor from the accounting department?", + "query": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many students are enrolled in some classes that are taught by an accounting professor?", + "SpiderSynQuestion": "How many students are registered in some classes that are taught by an accounting professor?", + "query": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of the department that has the largest number of students enrolled?", + "SpiderSynQuestion": "What is the name of the division that has the largest number of students enrolled?", + "query": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of the department with the most students enrolled?", + "SpiderSynQuestion": "What is the name of the division with the most students registered?", + "query": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "list names of all departments ordered by their names.", + "SpiderSynQuestion": "list names of all divisions ordered by their names.", + "query": "SELECT dept_name FROM department ORDER BY dept_name" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the names of all departments in alphabetical order?", + "SpiderSynQuestion": "What are the names of all divisions in alphabetical order?", + "query": "SELECT dept_name FROM department ORDER BY dept_name" + }, + { + "db_id": "college_1", + "SpiderQuestion": "List the codes of all courses that take place in room KLR209.", + "SpiderSynQuestion": "List the codes of all courses that take place in room KLR209.", + "query": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the codes of all the courses that are located in room KLR209?", + "SpiderSynQuestion": "What are the codes of all the courses that are located in room KLR209?", + "query": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "List the first name of all employees with job code PROF ordered by their date of birth.", + "SpiderSynQuestion": "List the forename of all staff with job code PROF ordered by their date of birth.", + "query": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all employees that are professors ordered by date of birth?", + "SpiderSynQuestion": "What are the forename of all staff that are professors ordered by date of birth?", + "query": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names and offices of all professors sorted by alphabetical order of their first name.", + "SpiderSynQuestion": "Find the forename and offices of all professors sorted by alphabetical order of their forename.", + "query": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names and office locations for all professors sorted alphabetically by first name?", + "SpiderSynQuestion": "What are the forename and office locations for all professors sorted alphabetically by forename?", + "query": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first and last name of the oldest employee?", + "SpiderSynQuestion": "What is the full name of the oldest employee?", + "query": "SELECT emp_fname , emp_lname FROM employee ORDER BY emp_dob LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first and last names of the employee with the earliest date of birth?", + "SpiderSynQuestion": "What are the forename and surname of the staff with the earliest date of birth?", + "query": "SELECT emp_fname , emp_lname FROM employee ORDER BY emp_dob LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?", + "SpiderSynQuestion": "What is the forename, surname, gpa of the youngest one among students whose GPA is above 3?", + "query": "SELECT stu_fname , stu_lname , stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?", + "SpiderSynQuestion": "What is the forename and family name of the youngest student with a GPA above 3, and what is their GPA?", + "query": "SELECT stu_fname , stu_lname , stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name of students who got grade C in any class?", + "SpiderSynQuestion": "What is the forename of students who got grade C in any class?", + "query": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all students who got a grade C in a class?", + "SpiderSynQuestion": "What are the forename of all students who got a grade C in a class?", + "query": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of department where has the smallest number of professors?", + "SpiderSynQuestion": "What is the name of division where has the smallest number of professors?", + "query": "SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of the department with the fewest professors?", + "SpiderSynQuestion": "What is the name of the division with the fewest professors?", + "query": "SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of department where has the largest number of professors with a Ph.D. degree?", + "SpiderSynQuestion": "What is the name of division where has the largest number of professors with a Ph.D. degree?", + "query": "SELECT T2.dept_name , T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Which department has the most professors with a Ph.D.?", + "SpiderSynQuestion": "Which division has the most professors with a Ph.D.?", + "query": "SELECT T2.dept_name , T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of the professors who do not teach a class.", + "SpiderSynQuestion": "What are the forename of the professors who do not teach a class.", + "query": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all professors not teaching any classes?", + "SpiderSynQuestion": "What are the forename of all professors not teaching any classes?", + "query": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first names of the professors from the history department who do not teach a class.", + "SpiderSynQuestion": "What is the forename of the professors from the history department who do not teach a class.", + "query": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all history professors who do not teach?", + "SpiderSynQuestion": "What are the forename of all history professors who do not teach?", + "query": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the last name and office of the professor from the history department?", + "SpiderSynQuestion": "What is the surname and office of the professor from the history department?", + "query": "SELECT T1.emp_lname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the last name and office of all history professors?", + "SpiderSynQuestion": "What are the family name and office of all history professors?", + "query": "SELECT T1.emp_lname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is department name and office for the professor whose last name is Heffington?", + "SpiderSynQuestion": "What is division name and office for the professor whose surname is Heffington?", + "query": "SELECT T3.dept_name , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of the department and office location for the professor with the last name of Heffington?", + "SpiderSynQuestion": "What is the name of the division and office location for the professor with the last name of Heffington?", + "query": "SELECT T3.dept_name , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the last name and hire date of the professor who is in office DRE 102.", + "SpiderSynQuestion": "Find the family name and hire day of the professor who is in office DRE 102.", + "query": "SELECT T1.emp_lname , T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the last name of the professor whose office is located in DRE 102, and when were they hired?", + "SpiderSynQuestion": "What is the surname of the professor whose office is located in DRE 102, and when were they hired?", + "query": "SELECT T1.emp_lname , T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the code of the course which the student whose last name is Smithson took?", + "SpiderSynQuestion": "What is the code of the course which the student whose family name is Smithson took?", + "query": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the course codes for every class that the student with the last name Smithson took?", + "SpiderSynQuestion": "What are the course codes for every class that the student with the surname Smithson took?", + "query": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the description and credit of the course which the student whose last name is Smithson took?", + "SpiderSynQuestion": "What are the describing content and credit of the course which the student whose last name is Smithson took?", + "query": "SELECT T4.crs_description , T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many credits is the course that the student with the last name Smithson took, and what is its description?", + "SpiderSynQuestion": "How many credits is the course that the student with the last name Smithson took, and what is its describing content?", + "query": "SELECT T4.crs_description , T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors who has a either Ph.D. or MA degree?", + "SpiderSynQuestion": "How many professors who has a either Ph.D. or MA degree?", + "query": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors attained either Ph.D. or Masters degrees?", + "SpiderSynQuestion": "How many professors attained either Ph.D. or Masters degrees?", + "query": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "How many professors who are from either Accounting or Biology department?", + "SpiderSynQuestion": "How many professors who are from either Accounting or Biology department?", + "query": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the number of professors who are in the Accounting or Biology departments?", + "SpiderSynQuestion": "What is the number of professors who are in the Accounting or Biology departments?", + "query": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.", + "SpiderSynQuestion": "Find the forename of the professor who is teaching two courses with code CIS-220 and QM-261.", + "query": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name of the professor who is teaching CIS-220 and QM-261?", + "SpiderSynQuestion": "What is the forename of the professor who is teaching CIS-220 and QM-261?", + "query": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments", + "SpiderSynQuestion": "Find the forename of student who is taking classes from accounting and Computer Info. Systems departments", + "query": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all students taking accoutning and Computer Information Systems classes?", + "SpiderSynQuestion": "What are the forename of all students taking accoutning and Computer Information Systems classes?", + "query": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the average gpa of the students enrolled in the course with code ACCT-211?", + "SpiderSynQuestion": "What is the average gpa of the students registered in the course with code ACCT-211?", + "query": "SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the average GPA of students taking ACCT-211?", + "SpiderSynQuestion": "What is the average GPA of students taking ACCT-211?", + "query": "SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name, gpa and phone number of the top 5 students with highest gpa?", + "SpiderSynQuestion": "What is the forename, gpa and telephone number of the top 5 students with highest gpa?", + "query": "SELECT stu_gpa , stu_phone , stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name, GPA, and phone number of the students with the top 5 GPAs?", + "SpiderSynQuestion": "What is the forename, GPA, and telephone number of the students with the top 5 GPAs?", + "query": "SELECT stu_gpa , stu_phone , stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the department name of the students with lowest gpa belongs to?", + "SpiderSynQuestion": "What is the division name of the students with lowest gpa belongs to?", + "query": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of the department with the student that has the lowest GPA?", + "SpiderSynQuestion": "What is the name of the division with the student that has the lowest GPA?", + "query": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.", + "SpiderSynQuestion": "Find the forename and gpa of the students whose gpa is lower than the average gpa of all students.", + "query": "SELECT stu_fname , stu_gpa FROM student WHERE stu_gpa < (SELECT avg(stu_gpa) FROM student)" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name and GPA of every student that has a GPA lower than average?", + "SpiderSynQuestion": "What is the forename and GPA of every student that has a GPA lower than average?", + "query": "SELECT stu_fname , stu_gpa FROM student WHERE stu_gpa < (SELECT avg(stu_gpa) FROM student)" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the name and address of the department that has the highest number of students.", + "SpiderSynQuestion": "Find the name and location of the department that has the highest number of students.", + "query": "SELECT T2.dept_name , T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name and address of the department with the most students?", + "SpiderSynQuestion": "What is the name and location of the department with the most students?", + "query": "SELECT T2.dept_name , T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the name, address, number of students in the departments that have the top 3 highest number of students.", + "SpiderSynQuestion": "Find the name, location, number of students in the departments that have the top 3 highest number of students.", + "query": "SELECT T2.dept_name , T2.dept_address , count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name, address, and number of students in the departments that have the 3 most students?", + "SpiderSynQuestion": "What is the name, location, and number of students in the departments that have the 3 most students?", + "query": "SELECT T2.dept_name , T2.dept_address , count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree.", + "SpiderSynQuestion": "Find the forename and office of the professor who is in the history department and has a Ph.D. degree.", + "query": "SELECT T1.emp_fname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names and office of the professors who are in the history department and have a Ph.D?", + "SpiderSynQuestion": "What are the forename and office of the professors who are in the history department and have a Ph.D?", + "query": "SELECT T1.emp_fname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names of all instructors who have taught some course and the course code.", + "SpiderSynQuestion": "Find the forename of all instructors who have taught some course and the course code.", + "query": "SELECT T2.emp_fname , T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all teachers who have taught a course and the corresponding course codes?", + "SpiderSynQuestion": "What are the forename of all teachers who have taught a course and the corresponding course codes?", + "query": "SELECT T2.emp_fname , T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names of all instructors who have taught some course and the course description.", + "SpiderSynQuestion": "Find the forename of all instructors who have taught some course and the course describing content.", + "query": "SELECT T2.emp_fname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all teachers who have taught a course and the corresponding descriptions?", + "SpiderSynQuestion": "What are the forename of all teachers who have taught a course and the corresponding descriptions?", + "query": "SELECT T2.emp_fname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names and offices of all instructors who have taught some course and also find the course description.", + "SpiderSynQuestion": "Find the forename and offices of all instructors who have taught some course and also find the course describing content.", + "query": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names, office locations of all lecturers who have taught some course?", + "SpiderSynQuestion": "What are the forename, office locations of all lecturers who have taught some course?", + "query": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.", + "SpiderSynQuestion": "Find the forename and offices of all instructors who have taught some course and the course description and the department name.", + "query": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description , T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?", + "SpiderSynQuestion": "What are the forename, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?", + "query": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description , T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find names of all students who took some course and the course description.", + "SpiderSynQuestion": "Find names of all students who took some course and the course description.", + "query": "SELECT T1.stu_fname , T1.stu_lname , T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the names of all students who took a class and the corresponding course descriptions?", + "SpiderSynQuestion": "What are the names of all students who took a class and the corresponding course descriptions?", + "query": "SELECT T1.stu_fname , T1.stu_lname , T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find names of all students who took some course and got A or C.", + "SpiderSynQuestion": "Find names of all students who took some course and got A or C.", + "query": "SELECT T1.stu_fname , T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the names of all students taking a course who received an A or C?", + "SpiderSynQuestion": "What are the names of all students taking a course who received an A or C?", + "query": "SELECT T1.stu_fname , T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names of all professors in the Accounting department who is teaching some course and the class room.", + "SpiderSynQuestion": "Find the forename of all professors in the Accounting department who is teaching some course and the class room.", + "query": "SELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?", + "SpiderSynQuestion": "What are the forename of all Accounting professors who teach and what are the classrooms of the courses they teach?", + "query": "SELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.", + "SpiderSynQuestion": "Find the forename and degree of all professors who are teaching some class in Computer Info. Systems department.", + "query": "SELECT DISTINCT T2.emp_fname , T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?", + "SpiderSynQuestion": "What are the different forename and highest degree attained for professors teaching in the Computer Information Systems department?", + "query": "SELECT DISTINCT T2.emp_fname , T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the last name of the student who got a grade A in the class with code 10018.", + "SpiderSynQuestion": "What is the family name of the student who got a grade A in the class with code 10018.", + "query": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the last name of the student who received an A in the class with the code 10018?", + "SpiderSynQuestion": "What is the family name of the student who received an A in the class with the code 10018?", + "query": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first name and office of history professor who did not get a Ph.D. degree.", + "SpiderSynQuestion": "Find the forename and office of history professor who did not get a Ph.D. degree.", + "query": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree != 'Ph.D.'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names and offices of history professors who don't have Ph.D.s?", + "SpiderSynQuestion": "What are the forename and offices of history professors who don't have Ph.D.s?", + "query": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree != 'Ph.D.'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names of professors who are teaching more than one class.", + "SpiderSynQuestion": "Find the forename of professors who are teaching more than one class.", + "query": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING count(*) > 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of all professors who teach more than one class?", + "SpiderSynQuestion": "What are the forename of all professors who teach more than one class?", + "query": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING count(*) > 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the first names of students who took exactly one class.", + "SpiderSynQuestion": "Find the forename of students who took exactly one class.", + "query": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING count(*) = 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What are the first names of student who only took one course?", + "SpiderSynQuestion": "What are the forename of student who only took one course?", + "query": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING count(*) = 1" + }, + { + "db_id": "college_1", + "SpiderQuestion": "Find the name of department that offers the class whose description has the word \"Statistics\".", + "SpiderSynQuestion": "Find the name of department that offers the class whose description has the word \"Statistics\".", + "query": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the name of the department that offers a course that has a description including the word \"Statistics\"?", + "SpiderSynQuestion": "What is the name of the division that offers a course that has a description including the word \"Statistics\"?", + "query": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?", + "SpiderSynQuestion": "What is the forename of the student whose last name starting with the letter S and is taking ACCT-211 class?", + "query": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'" + }, + { + "db_id": "college_1", + "SpiderQuestion": "What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?", + "SpiderSynQuestion": "What is the forename of the student whose last name starts with the letter S and is taking ACCT-211?", + "query": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "How many clubs are there?", + "SpiderSynQuestion": "How many clubs are there?", + "query": "SELECT count(*) FROM club" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the total number of clubs?", + "SpiderSynQuestion": "What is the total number of clubs?", + "query": "SELECT count(*) FROM club" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List the distinct region of clubs in ascending alphabetical order.", + "SpiderSynQuestion": "List the different district of clubs in ascending alphabetical order.", + "query": "SELECT DISTINCT Region FROM club ORDER BY Region ASC" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the different regions of clubs in ascending alphabetical order?", + "SpiderSynQuestion": "What are the different districts of clubs in ascending alphabetical order?", + "query": "SELECT DISTINCT Region FROM club ORDER BY Region ASC" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the average number of gold medals for clubs?", + "SpiderSynQuestion": "What is the average number of gold medals for clubs?", + "query": "SELECT avg(Gold) FROM club_rank" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the average number of gold medals for a club?", + "SpiderSynQuestion": "What is the average number of gold medals for a club?", + "query": "SELECT avg(Gold) FROM club_rank" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the types and countries of competitions?", + "SpiderSynQuestion": "What are the types and nations of competitions?", + "query": "SELECT Competition_type , Country FROM competition" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the types of every competition and in which countries are they located?", + "SpiderSynQuestion": "What are the types of every competition and in which nations are they located?", + "query": "SELECT Competition_type , Country FROM competition" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the distinct years in which the competitions type is not \"Tournament\"?", + "SpiderSynQuestion": "What are the different years in which the match type is not \"Tournament\"?", + "query": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type != \"Tournament\"" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the different years for all competitions that are not of type equal to tournament?", + "SpiderSynQuestion": "What are the different years for all match that are not of type equal to tournament?", + "query": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type != \"Tournament\"" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the maximum and minimum number of silver medals for clubs.", + "SpiderSynQuestion": "What are the maximum and minimum number of silver medals for clubs.", + "query": "SELECT max(Silver) , min(Silver) FROM club_rank" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the maximum and minimum number of silver medals for all the clubs?", + "SpiderSynQuestion": "What are the maximum and minimum number of silver medals for all the clubs?", + "query": "SELECT max(Silver) , min(Silver) FROM club_rank" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "How many clubs have total medals less than 10?", + "SpiderSynQuestion": "How many clubs have total medals less than 10?", + "query": "SELECT count(*) FROM club_rank WHERE Total < 10" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the total number of clubs that have less than 10 medals in total?", + "SpiderSynQuestion": "What is the total number of clubs that have less than 10 medals in total?", + "query": "SELECT count(*) FROM club_rank WHERE Total < 10" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List all club names in ascending order of start year.", + "SpiderSynQuestion": "List all club names in ascending order of start year.", + "query": "SELECT name FROM club ORDER BY Start_year ASC" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the names of all the clubs starting with the oldest?", + "SpiderSynQuestion": "What are the names of all the clubs starting with the oldest?", + "query": "SELECT name FROM club ORDER BY Start_year ASC" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List all club names in descending alphabetical order.", + "SpiderSynQuestion": "List all club names in descending alphabetical order.", + "query": "SELECT name FROM club ORDER BY name DESC" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the names of all the clubs ordered in descending alphabetical order?", + "SpiderSynQuestion": "What are the names of all the clubs ordered in descending alphabetical order?", + "query": "SELECT name FROM club ORDER BY name DESC" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "Please show the names and the players of clubs.", + "SpiderSynQuestion": "Please show the names and the participants of clubs.", + "query": "SELECT T1.name , T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the names and players of all the clubs?", + "SpiderSynQuestion": "What are the names and participants of all the clubs?", + "query": "SELECT T1.name , T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "Show the names of clubs that have players with position \"Right Wing\".", + "SpiderSynQuestion": "Show the names of clubs that have participants with position \"Right Wing\".", + "query": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = \"Right Wing\"" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the names of the clubs that have players in the position of \"Right Wing\"?", + "SpiderSynQuestion": "What are the names of the clubs that have participants in the position of \"Right Wing\"?", + "query": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = \"Right Wing\"" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the average points of players from club with name \"AIB\".", + "SpiderSynQuestion": "What is the average points of players from club with name \"AIB\".", + "query": "SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = \"AIB\"" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the average number of points for players from the \"AIB\" club?", + "SpiderSynQuestion": "What is the average number of points for players from the \"AIB\" club?", + "query": "SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = \"AIB\"" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List the position of players and the average number of points of players of each position.", + "SpiderSynQuestion": "List the location of players and the average number of points of players of each location.", + "query": "SELECT POSITION , avg(Points) FROM player GROUP BY POSITION" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "For each position, what is the average number of points for players in that position?", + "SpiderSynQuestion": "For each location, what is the average number of points for players in that location?", + "query": "SELECT POSITION , avg(Points) FROM player GROUP BY POSITION" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List the position of players with average number of points scored by players of that position bigger than 20.", + "SpiderSynQuestion": "List the location of participants with average number of points scored by players of that location bigger than 20.", + "query": "SELECT POSITION FROM player GROUP BY name HAVING avg(Points) >= 20" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the positions of players whose average number of points scored by that position is larger than 20?", + "SpiderSynQuestion": "What are the locations of participants whose average number of points scored by that location is larger than 20?", + "query": "SELECT POSITION FROM player GROUP BY name HAVING avg(Points) >= 20" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List the types of competition and the number of competitions of each type.", + "SpiderSynQuestion": "List the categories of match and the number of match of each category.", + "query": "SELECT Competition_type , COUNT(*) FROM competition GROUP BY Competition_type" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the types of competition and number of competitions for that type?", + "SpiderSynQuestion": "What are the categories of match and number of match for that category?", + "query": "SELECT Competition_type , COUNT(*) FROM competition GROUP BY Competition_type" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List the most common type of competition.", + "SpiderSynQuestion": "List the most common category of match.", + "query": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the most common competition type?", + "SpiderSynQuestion": "What is the most common match category?", + "query": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List the types of competition that have at most five competitions of that type.", + "SpiderSynQuestion": "List the categories of match that have at most five match of that category.", + "query": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the types of competition that have most 5 competitions for that type?", + "SpiderSynQuestion": "What are the categories of match that have most 5 match for that category?", + "query": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "List the names of clubs that do not have any players.", + "SpiderSynQuestion": "List the names of clubs that do not have any participants.", + "query": "SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the names of all clubs that do not have any players?", + "SpiderSynQuestion": "What are the names of all clubs that do not have any participants?", + "query": "SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the positions with both players having more than 20 points and less than 10 points.", + "SpiderSynQuestion": "What are the locations with both participants having more than 20 points and less than 10 points.", + "query": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the positions of both players that have more than 20 20 points and less than 10 points?", + "SpiderSynQuestion": "What are the locations of both players that have more than 20 20 points and less than 10 points?", + "query": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "Show total points of all players.", + "SpiderSynQuestion": "Show total points of all participants.", + "query": "SELECT sum(Points) FROM player" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the total number of points for all players?", + "SpiderSynQuestion": "What is the total number of points for all participants?", + "query": "SELECT sum(Points) FROM player" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "how many different positions are there?", + "SpiderSynQuestion": "how many different locations are there?", + "query": "SELECT count(DISTINCT POSITION) FROM player" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "How many different position for players are listed?", + "SpiderSynQuestion": "How many different location for players are listed?", + "query": "SELECT count(DISTINCT POSITION) FROM player" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "what are the name of players who get more than the average points.", + "SpiderSynQuestion": "what are the name of participants who get more than the average points.", + "query": "SELECT name FROM player WHERE points > (SELECT avg(points) FROM player)" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the names of all players that got more than the average number of points?", + "SpiderSynQuestion": "What are the names of all participants that got more than the average number of points?", + "query": "SELECT name FROM player WHERE points > (SELECT avg(points) FROM player)" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "find the number of players whose points are lower than 30 in each position.", + "SpiderSynQuestion": "find the number of participants whose points are lower than 30 in each location.", + "query": "SELECT count(*) , POSITION FROM player WHERE points < 30 GROUP BY POSITION" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What is the number of players who have points less than 30 for each position?", + "SpiderSynQuestion": "What is the number of participants who have points less than 30 for each location?", + "query": "SELECT count(*) , POSITION FROM player WHERE points < 30 GROUP BY POSITION" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "which country did participated in the most number of Tournament competitions?", + "SpiderSynQuestion": "which nation did participated in the most number of Tournament competitions?", + "query": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "what is the name of the country that participated in the most tournament competitions?", + "SpiderSynQuestion": "what is the name of the nation that participated in the most tournament competitions?", + "query": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "which countries did participated in both Friendly and Tournament type competitions.", + "SpiderSynQuestion": "which nations did participated in both Friendly and Tournament type competitions.", + "query": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the countries that participated in both friendly and tournament type competitions?", + "SpiderSynQuestion": "What are the nations that participated in both friendly and tournament type competitions?", + "query": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "Find the countries that have never participated in any competition with Friendly type.", + "SpiderSynQuestion": "Find the nations that have never participated in any match with Friendly type.", + "query": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'" + }, + { + "db_id": "sports_competition", + "SpiderQuestion": "What are the countries that have never participated in any friendly-type competitions?", + "SpiderSynQuestion": "What are the nations that have never participated in any friendly-type competitions?", + "query": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "How many furniture components are there in total?", + "SpiderSynQuestion": "How many furnishing components are there in total?", + "query": "SELECT sum(num_of_component) FROM furniture" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Return the name and id of the furniture with the highest market rate.", + "SpiderSynQuestion": "Return the name and id of the furnishing with the highest market rate.", + "query": "SELECT name , furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "find the total market rate of the furnitures that have the top 2 market shares.", + "SpiderSynQuestion": "find the total market rate of the furnishings that have the top 2 market shares.", + "query": "SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the component amounts and names of all furnitures that have more than 10 components.", + "SpiderSynQuestion": "Find the component amounts and names of all furnishings that have more than 10 components.", + "query": "SELECT Num_of_Component , name FROM furniture WHERE Num_of_Component > 10" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the name and component amount of the least popular furniture.", + "SpiderSynQuestion": "Find the name and component amount of the least popular furnishing.", + "query": "SELECT name , Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the names of furnitures whose prices are lower than the highest price.", + "SpiderSynQuestion": "Find the names of furnishings whose prices are lower than the highest price.", + "query": "SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte)" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Which manufacturer has the most number of shops? List its name and year of opening.", + "SpiderSynQuestion": "Which manufacturer has the most number of shops? List its name and year of opening.", + "query": "SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the average number of factories for the manufacturers that have more than 20 shops.", + "SpiderSynQuestion": "Find the average number of manufactories for the manufacturers that have more than 20 shops.", + "query": "SELECT avg(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "List all manufacturer names and ids ordered by their opening year.", + "SpiderSynQuestion": "List all manufacturer names and ids ordered by their opening year.", + "query": "SELECT name , manufacturer_id FROM manufacturer ORDER BY open_year" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.", + "SpiderSynQuestion": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.", + "query": "SELECT name , open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.", + "SpiderSynQuestion": "what is the average number of manufactories and maximum number of stores for manufacturers that opened before 1990.", + "query": "SELECT max(num_of_shops) , avg(Num_of_Factories) FROM manufacturer WHERE open_year < 1990" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the id and number of shops for the company that produces the most expensive furniture.", + "SpiderSynQuestion": "Find the id and number of stores for the company that produces the most expensive furniture.", + "query": "SELECT t1.manufacturer_id , t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the number of funiture types produced by each manufacturer as well as the company names.", + "SpiderSynQuestion": "Find the number of furnishing types produced by each manufacturer as well as the company names.", + "query": "SELECT count(*) , t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Give me the names and prices of furnitures which some companies are manufacturing.", + "SpiderSynQuestion": "Give me the names and prices of furnishings which some companies are manufacturing.", + "query": "SELECT t1.name , t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the market shares and names of furnitures which no any company is producing in our records.", + "SpiderSynQuestion": "Find the market shares and names of furnishings which no any company is producing in our records.", + "query": "SELECT Market_Rate , name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)" + }, + { + "db_id": "manufacturer", + "SpiderQuestion": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.", + "SpiderSynQuestion": "Find the name of the company that produces both furnishings with less than 6 components and furnishings with more than 10 components.", + "query": "SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component > 10" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Display the first name and department name for each employee.", + "SpiderSynQuestion": "Display the forename and division name for each staff.", + "query": "SELECT T1.first_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the first name and department name of all employees?", + "SpiderSynQuestion": "What are the forename and division name of all staffs?", + "query": "SELECT T1.first_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "List the full name (first and last name), and salary for those employees who earn below 6000.", + "SpiderSynQuestion": "List the full name (first and last name), and wage for those employees who earn below 6000.", + "query": "SELECT first_name , last_name , salary FROM employees WHERE salary < 6000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full names and salaries for any employees earning less than 6000?", + "SpiderSynQuestion": "What are the full names and wages for any employees earning less than 6000?", + "query": "SELECT first_name , last_name , salary FROM employees WHERE salary < 6000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Display the first name, and department number for all employees whose last name is \"McEwen\".", + "SpiderSynQuestion": "Display the forename, and division number for all employees whose last name is \"McEwen\".", + "query": "SELECT first_name , department_id FROM employees WHERE last_name = 'McEwen'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the first names and department numbers for employees with last name McEwen?", + "SpiderSynQuestion": "What are the forename and division numbers for staffs with last name McEwen?", + "query": "SELECT first_name , department_id FROM employees WHERE last_name = 'McEwen'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Return all the information for all employees without any department number.", + "SpiderSynQuestion": "Return all the information for all staffs without any division number.", + "query": "SELECT * FROM employees WHERE department_id = \"null\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are all the employees without a department number?", + "SpiderSynQuestion": "What are all the staffs without a division number?", + "query": "SELECT * FROM employees WHERE department_id = \"null\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Display all the information about the department Marketing.", + "SpiderSynQuestion": "Display all the information about the division Marketing.", + "query": "SELECT * FROM departments WHERE department_name = 'Marketing'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the information about the Marketing department?", + "SpiderSynQuestion": "What is all the information about the Marketing division?", + "query": "SELECT * FROM departments WHERE department_name = 'Marketing'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "when is the hire date for those employees whose first name does not containing the letter M?", + "SpiderSynQuestion": "when is the day of hire for those staffs whose first name does not containing the letter M?", + "query": "SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "On what dates were employees without the letter M in their first names hired?", + "SpiderSynQuestion": "On what day were staffs without the letter M in their first names hired?", + "query": "SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.", + "SpiderSynQuestion": "display the full name (first and last), day of hire, wage, and division number for those employees whose forename does not containing the letter M.", + "query": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full name, hire date, salary, and department id for employees without the letter M in their first name?", + "SpiderSynQuestion": "What are the full name, day of hire, wage, and division id for employees without the letter M in their forename?", + "query": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number.", + "SpiderSynQuestion": "display the full name (first and last), day of hire, wage, and division number for those employees whose forename does not containing the letter M and make the result set in ascending order by division number.", + "query": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id?", + "SpiderSynQuestion": "What are the full name, day of hire, wage and division id for employees without the letter M in their forename, ordered by ascending division id?", + "query": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "what is the phone number of employees whose salary is in the range of 8000 and 12000?", + "SpiderSynQuestion": "what is the telephone number of staffs whose salary is in the range of 8000 and 12000?", + "query": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Return the phone numbers of employees with salaries between 8000 and 12000.", + "SpiderSynQuestion": "Return the telephone numbers of staffs with salaries between 8000 and 12000.", + "query": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.", + "SpiderSynQuestion": "display all the information of staffs whose salary is in the range of 8000 and 12000 and commission is not null or division number does not equal to 40.", + "query": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != \"null\" OR department_id != 40" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Return all information about employees with salaries between 8000 and 12000 for which commission is not null or where their department id is not 40.", + "SpiderSynQuestion": "Return all information about staffs with salaries between 8000 and 12000 for which commission is not null or where their division id is not 40.", + "query": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != \"null\" OR department_id != 40" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full name (first and last name) and salary for all employees who does not have any value for commission?", + "SpiderSynQuestion": "What are the full name (first and last name) and wage for all employees who does not have any value for commission?", + "query": "SELECT first_name , last_name , salary FROM employees WHERE commission_pct = \"null\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Return the full names and salaries of employees with null commissions.", + "SpiderSynQuestion": "Return the full names and wages of employees with null commissions.", + "query": "SELECT first_name , last_name , salary FROM employees WHERE commission_pct = \"null\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.", + "SpiderSynQuestion": "Display the forename and surname, and wage for those employees whose forename is ending with the letter m.", + "query": "SELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Return the full names and salaries for employees with first names that end with the letter m.", + "SpiderSynQuestion": "Return the full names and wages for employees with forename that end with the letter m.", + "query": "SELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.", + "SpiderSynQuestion": "Find job id and day of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.", + "query": "SELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?", + "SpiderSynQuestion": "What are the job ids and day of hire for employees hired after November 5th, 2007 and before July 5th, 2009?", + "query": "SELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the first and last name for those employees who works either in department 70 or 90?", + "SpiderSynQuestion": "What are the forename and family name for those employees who works either in division 70 or 90?", + "query": "SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full names of employees who with in department 70 or 90?", + "SpiderSynQuestion": "What are the full names of employees who with in division 70 or 90?", + "query": "SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find the salary and manager number for those employees who is working under a manager.", + "SpiderSynQuestion": "Find the wage and head number for those employees who is working under a manager.", + "query": "SELECT salary , manager_id FROM employees WHERE manager_id != \"null\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the salaries and manager ids for employees who have managers?", + "SpiderSynQuestion": "What are the wages and head ids for employees who have heads?", + "query": "SELECT salary , manager_id FROM employees WHERE manager_id != \"null\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display all the details from Employees table for those employees who was hired before 2002-06-21.", + "SpiderSynQuestion": "display all the details from staffs table for those staffs who was hired before 2002-06-21.", + "query": "SELECT * FROM employees WHERE hire_date < '2002-06-21'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the information about employees hired before June 21, 2002?", + "SpiderSynQuestion": "What is all the information about staffs hired before June 21, 2002?", + "query": "SELECT * FROM employees WHERE hire_date < '2002-06-21'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary.", + "SpiderSynQuestion": "display all the information for all staffs who have the letters D or S in their first name and also arrange the result in descending order by salary.", + "query": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the information about employees with D or S in their first name, ordered by salary descending?", + "SpiderSynQuestion": "What is all the information about staffs with D or S in their first name, ordered by salary descending?", + "query": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display those employees who joined after 7th September, 1987.", + "SpiderSynQuestion": "display those staffs who joined after 7th September, 1987.", + "query": "SELECT * FROM employees WHERE hire_date > '1987-09-07'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Which employees were hired after September 7th, 1987?", + "SpiderSynQuestion": "Which staffs were hired after September 7th, 1987?", + "query": "SELECT * FROM employees WHERE hire_date > '1987-09-07'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the job title of jobs which minimum salary is greater than 9000.", + "SpiderSynQuestion": "display the occupation name of occupations which minimum salary is greater than 9000.", + "query": "SELECT job_title FROM jobs WHERE min_salary > 9000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Which job titles correspond to jobs with salaries over 9000?", + "SpiderSynQuestion": "Which occupation name correspond to occupations with salaries over 9000?", + "query": "SELECT job_title FROM jobs WHERE min_salary > 9000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.", + "SpiderSynQuestion": "display occupation name, the difference between minimum and maximum wage for those occupations which max wage within the range 12000 to 18000.", + "query": "SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?", + "SpiderSynQuestion": "What are the occupation name, and range of wage for occupations with maximum wage between 12000 and 18000?", + "query": "SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.", + "SpiderSynQuestion": "display the emails of the staffs who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.", + "query": "SELECT email FROM employees WHERE commission_pct = \"null\" AND salary BETWEEN 7000 AND 12000 AND department_id = 50" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?", + "SpiderSynQuestion": "What are the emails of staffs with null commission, salary between 7000 and 12000, and who work in department 50?", + "query": "SELECT email FROM employees WHERE commission_pct = \"null\" AND salary BETWEEN 7000 AND 12000 AND department_id = 50" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee ID for each employee and the date on which he ended his previous job.", + "SpiderSynQuestion": "display the staffs ID for each staff and the date on which he ended his previous job.", + "query": "SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the employee ids for each employee and final dates of employment at their last job?", + "SpiderSynQuestion": "What are the staff ids for each staff and final dates of employment at their last job?", + "query": "SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display those departments where more than ten employees work who got a commission percentage.", + "SpiderSynQuestion": "display those divisions where more than ten staffs work who got a commission percentage.", + "query": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the department ids for which more than 10 employees had a commission?", + "SpiderSynQuestion": "What are the division ids for which more than 10 staffs had a commission?", + "query": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find the ids of the departments where any manager is managing 4 or more employees.", + "SpiderSynQuestion": "Find the ids of the divisions where any manager is managing 4 or more staffs.", + "query": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are department ids for departments with managers managing more than 3 employees?", + "SpiderSynQuestion": "What are division ids for divisions with managers managing more than 3 staffs?", + "query": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the average salary of employees for each department who gets a commission percentage.", + "SpiderSynQuestion": "display the average wage of staffs for each division who gets a commission percentage.", + "query": "SELECT department_id , AVG(salary) FROM employees WHERE commission_pct != \"null\" GROUP BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is the average salary of employees who have a commission percentage that is not null?", + "SpiderSynQuestion": "What is the average wage of staffs who have a commission percentage that is not null?", + "query": "SELECT department_id , AVG(salary) FROM employees WHERE commission_pct != \"null\" GROUP BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the country ID and number of cities for each country.", + "SpiderSynQuestion": "display the nation ID and number of cities for each nation.", + "query": "SELECT country_id , COUNT(*) FROM locations GROUP BY country_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Give the country id and corresponding count of cities in each country.", + "SpiderSynQuestion": "Give the nation id and corresponding count of cities in each nation.", + "query": "SELECT country_id , COUNT(*) FROM locations GROUP BY country_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display job ID for those jobs that were done by two or more for more than 300 days.", + "SpiderSynQuestion": "display occupation ID for those occupations that were done by two or more for more than 300 days.", + "query": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the job ids for jobs done more than once for a period of more than 300 days?", + "SpiderSynQuestion": "What are the occupation ids for occupations done more than once for a period of more than 300 days?", + "query": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the ID for those employees who did two or more jobs in the past.", + "SpiderSynQuestion": "display the ID for those staffs who did two or more jobs in the past.", + "query": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the employee ids for employees who have held two or more jobs?", + "SpiderSynQuestion": "What are the staff ids for staffs who have held two or more jobs?", + "query": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find employee with ID and name of the country presently where (s)he is working.", + "SpiderSynQuestion": "Find staff with ID and name of the country presently where (s)he is working.", + "query": "SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are all the employee ids and the names of the countries in which they work?", + "SpiderSynQuestion": "What are all the staff ids and the names of the countries in which they work?", + "query": "SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the department name and number of employees in each of the department.", + "SpiderSynQuestion": "display the division name and number of staffs in each of the division.", + "query": "SELECT T2.department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Give the name of each department and the number of employees in each.", + "SpiderSynQuestion": "Give the name of each division and the number of staffs in each.", + "query": "SELECT T2.department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?", + "SpiderSynQuestion": "Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?", + "query": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the job history info done by employees earning a salary greater than or equal to 12000?", + "SpiderSynQuestion": "What is all the job history info done by employees earning a salary greater than or equal to 12000?", + "query": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display job title and average salary of employees.", + "SpiderSynQuestion": "display occupation name and average wage of staffs.", + "query": "SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is the average salary for each job title?", + "SpiderSynQuestion": "What is the average wage for each occupation name?", + "query": "SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?", + "SpiderSynQuestion": "What is the full name ( first name and last name ) for those staffs who gets more salary than the staff whose id is 163?", + "query": "SELECT first_name , last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163 )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Provide the full names of employees earning more than the employee with id 163.", + "SpiderSynQuestion": "Provide the full names of staffs earning more than the staff with id 163.", + "query": "SELECT first_name , last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163 )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "return the smallest salary for every departments.", + "SpiderSynQuestion": "return the smallest wage for every divisions.", + "query": "SELECT MIN(salary) , department_id FROM employees GROUP BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is the minimum salary in each department?", + "SpiderSynQuestion": "What is the minimum wage in each division?", + "query": "SELECT MIN(salary) , department_id FROM employees GROUP BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.", + "SpiderSynQuestion": "Find the forename and surname and division id for those employees who earn such amount of salary which is the smallest salary of any of the divisions.", + "query": "SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full names and department ids for the lowest paid employees across all departments.", + "SpiderSynQuestion": "What are the full names and division ids for the lowest paid employees across all divisions.", + "query": "SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find the employee id for all employees who earn more than the average salary.", + "SpiderSynQuestion": "Find the staff id for all staffs who earn more than the average salary.", + "query": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the employee ids for employees who make more than the average?", + "SpiderSynQuestion": "What are the staff ids for staffs who make more than the average?", + "query": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee id and salary of all employees who report to Payam (first name).", + "SpiderSynQuestion": "display the staff id and wage of all staffs who report to Payam (first name).", + "query": "SELECT employee_id , salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the employee ids of employees who report to Payam, and what are their salaries?", + "SpiderSynQuestion": "What are the staff ids of staffs who report to Payam, and what are their wages?", + "query": "SELECT employee_id , salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "find the name of all departments that do actually have one or more employees assigned to them.", + "SpiderSynQuestion": "find the name of all divisions that do actually have one or more employees assigned to them.", + "query": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the names of departments that have at least one employee.", + "SpiderSynQuestion": "What are the names of divisions that have at least one employee.", + "query": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "get the details of employees who manage a department.", + "SpiderSynQuestion": "get the information of staffs who manage a division.", + "query": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the information regarding employees who are managers?", + "SpiderSynQuestion": "What is all the information regarding staffs who are managers?", + "query": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display all the information about the department Marketing.", + "SpiderSynQuestion": "display all the information about the division Marketing.", + "query": "SELECT * FROM departments WHERE department_name = 'Marketing'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the information about the Marketing department?", + "SpiderSynQuestion": "What is all the information about the Marketing division?", + "query": "SELECT * FROM departments WHERE department_name = 'Marketing'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the ID for those employees who did two or more jobs in the past.", + "SpiderSynQuestion": "display the ID for those staffs who did two or more jobs in the past.", + "query": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the employee ids for those who had two or more jobs.", + "SpiderSynQuestion": "What are the staff ids for those who had two or more jobs.", + "query": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the unique ids of those departments where any manager is managing 4 or more employees.", + "SpiderSynQuestion": "What are the unique ids of those divisions where any head is managing 4 or more staffs.", + "query": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?", + "SpiderSynQuestion": "Give the different division ids of divisions in which a head is in charge of 4 or more staffs?", + "query": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find the job ID for those jobs which average salary is above 8000.", + "SpiderSynQuestion": "Find the occupation ID for those occupations which average wage is above 8000.", + "query": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the job ids corresponding to jobs with average salary above 8000?", + "SpiderSynQuestion": "What are the occupation ids corresponding to occupations with average wage above 8000?", + "query": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee ID and job name for all those jobs in department 80.", + "SpiderSynQuestion": "display the staff ID and occupation name for all those occupations in department 80.", + "query": "SELECT T1.employee_id , T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "what are the employee ids and job titles for employees in department 80?", + "SpiderSynQuestion": "what are the staff ids and occupation name for staff in department 80?", + "query": "SELECT T1.employee_id , T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is the first name and job id for all employees in the Finance department?", + "SpiderSynQuestion": "What is the forename and occupation id for all staffs in the Finance department?", + "query": "SELECT T1.first_name , T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Give the first name and job id for all employees in the Finance department.", + "SpiderSynQuestion": "Give the forename and occupation id for all staffs in the Finance department.", + "query": "SELECT T1.first_name , T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display all the information of the employees whose salary if within the range of smallest salary and 2500.", + "SpiderSynQuestion": "display all the information of the staffs whose wage if within the range of smallest wage and 2500.", + "query": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the information regarding employees with salaries above the minimum and under 2500?", + "SpiderSynQuestion": "What is all the information regarding staffs with wages above the minimum and under 2500?", + "query": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200.", + "SpiderSynQuestion": "Find the ids of the staffs who does not work in those departments where some staffs works whose manager id within the range 100 and 200.", + "query": "SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?", + "SpiderSynQuestion": "What are the ids for staffs who do not work in departments with managers that have ids between 100 and 200?", + "query": "SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.", + "SpiderSynQuestion": "display the staff name ( forename and surname ) and day of hire for all staffs in the same department as Clara.", + "query": "SELECT first_name , last_name , hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = \"Clara\")" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full names and hire dates for employees in the same department as someone with the first name Clara?", + "SpiderSynQuestion": "What are the full names and day of hire for employees in the same department as someone with the forename Clara?", + "query": "SELECT first_name , last_name , hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = \"Clara\")" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.", + "SpiderSynQuestion": "display the employee name ( forename and surname ) and day of hire for all employees in the same department as Clara excluding Clara.", + "query": "SELECT first_name , last_name , hire_date FROM employees WHERE department_id = ( SELECT department_id FROM employees WHERE first_name = \"Clara\") AND first_name != \"Clara\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?", + "SpiderSynQuestion": "What are the full names and day of hire for employees in the same department as someone with the forename Clara, not including Clara?", + "query": "SELECT first_name , last_name , hire_date FROM employees WHERE department_id = ( SELECT department_id FROM employees WHERE first_name = \"Clara\") AND first_name != \"Clara\"" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a \u2019T\u2019.", + "SpiderSynQuestion": "display the staff number and name( forename and surname ) for all staffs who work in a department with any staff whose name contains a \u2019T\u2019.", + "query": "SELECT employee_id , first_name , last_name FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T?", + "SpiderSynQuestion": "What are the ids and full names for staffs who work in a department that has someone with a forename that contains the letter T?", + "query": "SELECT employee_id , first_name , last_name FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.", + "SpiderSynQuestion": "display the staff number, name( forename and family name ), and wage for all staffs who earn more than the average wage and who work in a department with any employee with a 'J' in their first name.", + "query": "SELECT employee_id , first_name , last_name , salary FROM employees WHERE salary > ( SELECT AVG (salary) FROM employees ) AND department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%J%')" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name?", + "SpiderSynQuestion": "What are the ids, full names, and wage for staffs making more than average and who work in a department with staffs who have the letter J in their forename?", + "query": "SELECT employee_id , first_name , last_name , salary FROM employees WHERE salary > ( SELECT AVG (salary) FROM employees ) AND department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%J%')" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.", + "SpiderSynQuestion": "display the staff number and job id for all staffs whose salary is smaller than any salary of those staffs whose job name is MK_MAN.", + "query": "SELECT employee_id , job_id FROM employees WHERE salary < ( SELECT min(salary) FROM employees WHERE job_id = 'MK_MAN' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?", + "SpiderSynQuestion": "What are the staff ids and occupation ids for staffs who make less than the lowest earning staff with title MK_MAN?", + "query": "SELECT employee_id , job_id FROM employees WHERE salary < ( SELECT min(salary) FROM employees WHERE job_id = 'MK_MAN' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN.", + "SpiderSynQuestion": "display the staff number, name( forename and surname ) and occupation name for all staffs whose salary is more than any salary of those staffs whose occupation name is PU_MAN.", + "query": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", + "SpiderSynQuestion": "What are the staff ids, full names, and occupation ids for staffs who make more than the highest earning staff with title PU_MAN?", + "query": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the department id and the total salary for those departments which contains at least two employees.", + "SpiderSynQuestion": "display the department id and the total wage for those departments which contains at least two employees.", + "query": "SELECT department_id , SUM(salary) FROM employees GROUP BY department_id HAVING count(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are total salaries and department id for each department that has more than 2 employees?", + "SpiderSynQuestion": "What are total wages and division id for each division that has more than 2 employees?", + "query": "SELECT department_id , SUM(salary) FROM employees GROUP BY department_id HAVING count(*) >= 2" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display all the information of those employees who did not have any job in the past.", + "SpiderSynQuestion": "display all the information of those staffs who did not have any job in the past.", + "query": "SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What is all the information about employees who have never had a job in the past?", + "SpiderSynQuestion": "What is all the information about staffs who have never had a job in the past?", + "query": "SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history)" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.", + "SpiderSynQuestion": "display the division ID, full name (first and last name), wage for those employees who is highest salary in every division.", + "query": "SELECT first_name , last_name , salary , department_id , MAX(salary) FROM employees GROUP BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the department ids, full names, and salaries for employees who make the most in their departments?", + "SpiderSynQuestion": "What are the division ids, full names, and wages for employees who make the most in their divisions?", + "query": "SELECT first_name , last_name , salary , department_id , MAX(salary) FROM employees GROUP BY department_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the first and last name, department, city, and state province for each employee.", + "SpiderSynQuestion": "display the full name, division, city, and state province for each employee.", + "query": "SELECT T1.first_name , T1.last_name , T2.department_name , T3.city , T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full names, departments, cities, and state provinces for each employee?", + "SpiderSynQuestion": "What are the full names, divisions, cities, and state provinces for each employee?", + "query": "SELECT T1.first_name , T1.last_name , T2.department_name , T3.city , T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display those employees who contain a letter z to their first name and also display their last name, city.", + "SpiderSynQuestion": "display those staffs who contain a letter z to their forename and also display their family name, city.", + "query": "SELECT T1.first_name , T1.last_name , T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the full names and cities of employees who have the letter Z in their first names?", + "SpiderSynQuestion": "What are the full names and cities of employees who have the letter Z in their forename?", + "query": "SELECT T1.first_name , T1.last_name , T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the department name, city, and state province for each department.", + "SpiderSynQuestion": "display the division name, town, and state province for each division.", + "query": "SELECT T1.department_name , T2.city , T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the department names, cities, and state provinces for each department?", + "SpiderSynQuestion": "What are the division names, towns, and state provinces for each division?", + "query": "SELECT T1.department_name , T2.city , T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.", + "SpiderSynQuestion": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.", + "query": "SELECT T1.first_name , T1.last_name , T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What the full names, ids of each employee and the name of the country they are in?", + "SpiderSynQuestion": "What the full names, ids of each staff and the name of the country they are in?", + "query": "SELECT T1.first_name , T1.last_name , T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the department name and number of employees in each of the department.", + "SpiderSynQuestion": "display the division name and number of staffs in each of the division.", + "query": "SELECT department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are the department names and how many employees work in each of them?", + "SpiderSynQuestion": "What are the division names and how many staffs work in each of them?", + "query": "SELECT department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "display the full name (first and last name), and salary of those employees who working in any department located in London.", + "SpiderSynQuestion": "display the full name (first and last name), and wage of those employees who working in any division located in London.", + "query": "SELECT first_name , last_name , salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'" + }, + { + "db_id": "hr_1", + "SpiderQuestion": "What are full names and salaries of employees working in the city of London?", + "SpiderSynQuestion": "What are full names and wages of employees working in the city of London?", + "query": "SELECT first_name , last_name , salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the name of the song that was released in the most recent year?", + "SpiderSynQuestion": "What is the title of the music that was released in the most recent year?", + "query": "SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the name of the song that was released most recently?", + "SpiderSynQuestion": "What is the title of the music that was released most recently?", + "query": "SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the id of the longest song?", + "SpiderSynQuestion": "What is the id of the longest song?", + "query": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the id of the song that lasts the longest.", + "SpiderSynQuestion": "Find the id of the song that lasts the longest.", + "query": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the names of all English songs.", + "SpiderSynQuestion": "Find the titles of all English musics.", + "query": "SELECT song_name FROM song WHERE languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all songs in English?", + "SpiderSynQuestion": "What are the titles of all musics in English?", + "query": "SELECT song_name FROM song WHERE languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the id of songs whose format is mp3.", + "SpiderSynQuestion": "What are the id of songs whose format is mp3.", + "query": "SELECT f_id FROM files WHERE formats = \"mp3\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the id of all the files in mp3 format?", + "SpiderSynQuestion": "What are the id of all the document in mp3 format?", + "query": "SELECT f_id FROM files WHERE formats = \"mp3\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "List the name and country of origin for all singers who have produced songs with rating above 9.", + "SpiderSynQuestion": "List the name and nationality of origin for all singers who have produced songs with rating above 9.", + "query": "SELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the different names and countries of origins for all artists whose song ratings are above 9?", + "SpiderSynQuestion": "What are the different names and nations of origins for all artists whose song ratings are above 9?", + "query": "SELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9" + }, + { + "db_id": "music_1", + "SpiderQuestion": "List the file size and format for all songs that have resolution lower than 800.", + "SpiderSynQuestion": "List the document size and format for all songs that have resolution lower than 800.", + "query": "SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the file sizes and formats for all songs with a resolution lower than 800?", + "SpiderSynQuestion": "What are the document sizes and formats for all songs with a resolution lower than 800?", + "query": "SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the name of the artist who produced the shortest song?", + "SpiderSynQuestion": "What is the name of the artist who produced the shortest song?", + "query": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the artists who sang the shortest song?", + "SpiderSynQuestion": "What are the names of the artists who sang the shortest song?", + "query": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names and countries of origin for the artists who produced the top three highly rated songs.", + "SpiderSynQuestion": "What are the names and nations of origin for the artists who produced the top three highly rated songs.", + "query": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?", + "SpiderSynQuestion": "What are the names of the singers who sang the top 3 most highly rated songs and what nations do they hail from?", + "query": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3" + }, + { + "db_id": "music_1", + "SpiderQuestion": "How many songs have 4 minute duration?", + "SpiderSynQuestion": "How many songs have 4 minute duration?", + "query": "SELECT count(*) FROM files WHERE duration LIKE \"4:%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the count of the songs that last approximately 4 minutes?", + "SpiderSynQuestion": "What is the count of the songs that last approximately 4 minutes?", + "query": "SELECT count(*) FROM files WHERE duration LIKE \"4:%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "How many artists are from Bangladesh?", + "SpiderSynQuestion": "How many artists are from Bangladesh?", + "query": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "How many Bangladeshi artists are listed?", + "SpiderSynQuestion": "How many Bangladeshi artists are listed?", + "query": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the average rating of songs produced by female artists?", + "SpiderSynQuestion": "What is the average score of songs produced by female artists?", + "query": "SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "How many songs, on average, are sung by a female artist?", + "SpiderSynQuestion": "How many songs, on average, are sung by a female artist?", + "query": "SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the most popular file format?", + "SpiderSynQuestion": "What is the most popular document format?", + "query": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the file format that is used by the most files.", + "SpiderSynQuestion": "Find the document format that is used by the most document.", + "query": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the names of the artists who are from UK and have produced English songs.", + "SpiderSynQuestion": "Find the names of the artists who are from UK and have produced English songs.", + "query": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT artist_name FROM song WHERE languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the artists that are from the UK and sang songs in English?", + "SpiderSynQuestion": "What are the names of the artists that are from the UK and sang songs in English?", + "query": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT artist_name FROM song WHERE languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.", + "SpiderSynQuestion": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.", + "query": "SELECT f_id FROM files WHERE formats = \"mp4\" INTERSECT SELECT f_id FROM song WHERE resolution < 1000" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?", + "SpiderSynQuestion": "What is the id of the document that are available in the format of mp4 and a resolution smaller than 1000?", + "query": "SELECT f_id FROM files WHERE formats = \"mp4\" INTERSECT SELECT f_id FROM song WHERE resolution < 1000" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the country of origin of the artist who is female and produced a song in Bangla?", + "SpiderSynQuestion": "What is the nationality of origin of the artist who is female and produced a song in Bangla?", + "query": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\" AND T2.languages = \"bangla\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What countries are the female artists who sung in the language Bangla from?", + "SpiderSynQuestion": "What nationalities are the female artists who sung in the language Bangla from?", + "query": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\" AND T2.languages = \"bangla\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the average duration of songs that have mp3 format and resolution below 800?", + "SpiderSynQuestion": "What is the average duration of songs that have mp3 format and resolution below 800?", + "query": "SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" AND T2.resolution < 800" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?", + "SpiderSynQuestion": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?", + "query": "SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" AND T2.resolution < 800" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the number of artists for each gender?", + "SpiderSynQuestion": "What is the number of artists for each sex?", + "query": "SELECT count(*) , gender FROM artist GROUP BY gender" + }, + { + "db_id": "music_1", + "SpiderQuestion": "How many artists are male and how many are female?", + "SpiderSynQuestion": "How many artists are male and how many are female?", + "query": "SELECT count(*) , gender FROM artist GROUP BY gender" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the average rating of songs for each language?", + "SpiderSynQuestion": "What is the average score of songs for each language?", + "query": "SELECT avg(rating) , languages FROM song GROUP BY languages" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the average song rating for each language?", + "SpiderSynQuestion": "What is the average song score for each language?", + "query": "SELECT avg(rating) , languages FROM song GROUP BY languages" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Return the gender and name of artist who produced the song with the lowest resolution.", + "SpiderSynQuestion": "Return the sex and name of artist who produced the song with the lowest resolution.", + "query": "SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the gender and name of the artist who sang the song with the smallest resolution?", + "SpiderSynQuestion": "What is the sex and name of the artist who sang the song with the smallest resolution?", + "query": "SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "For each file format, return the number of artists who released songs in that format.", + "SpiderSynQuestion": "For each document format, return the number of artists who released songs in that format.", + "query": "SELECT count(*) , formats FROM files GROUP BY formats" + }, + { + "db_id": "music_1", + "SpiderQuestion": "How many songs were released for each format?", + "SpiderSynQuestion": "How many songs were released for each format?", + "query": "SELECT count(*) , formats FROM files GROUP BY formats" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the distinct names of all songs that have a higher resolution than some songs in English.", + "SpiderSynQuestion": "Find the different titles of all musics that have a higher resolution than some musics in English.", + "query": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = \"english\")" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the different names for all songs that have a higher resolution than English songs?", + "SpiderSynQuestion": "What are the different titles for all musics that have a higher resolution than English musics?", + "query": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = \"english\")" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all songs that have a lower rating than some song of blues genre?", + "SpiderSynQuestion": "What are the titles of all musics that have a lower rating than some music of blues genre?", + "query": "SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = \"blues\")" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the songs that have a lower rating than at least one blues song?", + "SpiderSynQuestion": "What are the titles of the musics that have a lower rating than at least one blues music?", + "query": "SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = \"blues\")" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the name and country of origin of the artist who released a song that has \"love\" in its title?", + "SpiderSynQuestion": "What is the name and nationality of origin of the artist who released a song that has \"love\" in its title?", + "query": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE \"%love%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the artists who released a song that has the word love in its title, and where are the artists from?", + "SpiderSynQuestion": "What are the names of the artists who released a song that has the word love in its title, and where are the artists from?", + "query": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE \"%love%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "List the name and gender for all artists who released songs in March.", + "SpiderSynQuestion": "List the name and sex for all artists who released songs in March.", + "query": "SELECT T1.artist_name , T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE \"%Mar%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names and genders of all artists who released songs in the month of March?", + "SpiderSynQuestion": "What are the names and sex of all artists who released songs in the month of March?", + "query": "SELECT T1.artist_name , T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE \"%Mar%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "List the names of all genres in alphabetical oder, together with its ratings.", + "SpiderSynQuestion": "List the names of all genres in alphabetical oder, together with its score.", + "query": "SELECT g_name , rating FROM genre ORDER BY g_name" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all genres in alphabetical order, combined with its ratings?", + "SpiderSynQuestion": "What are the names of all genres in alphabetical order, combined with its score?", + "query": "SELECT g_name , rating FROM genre ORDER BY g_name" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Give me a list of the names of all songs ordered by their resolution.", + "SpiderSynQuestion": "Give me a list of the titles of all musics ordered by their resolution.", + "query": "SELECT song_name FROM song ORDER BY resolution" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all songs that are ordered by their resolution numbers?", + "SpiderSynQuestion": "What are the titles of all musics that are ordered by their resolution numbers?", + "query": "SELECT song_name FROM song ORDER BY resolution" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the ids of songs that are available in either mp4 format or have resolution above 720?", + "SpiderSynQuestion": "What are the ids of songs that are available in either mp4 format or have resolution above 720?", + "query": "SELECT f_id FROM files WHERE formats = \"mp4\" UNION SELECT f_id FROM song WHERE resolution > 720" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?", + "SpiderSynQuestion": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?", + "query": "SELECT f_id FROM files WHERE formats = \"mp4\" UNION SELECT f_id FROM song WHERE resolution > 720" + }, + { + "db_id": "music_1", + "SpiderQuestion": "List the names of all songs that have 4 minute duration or are in English.", + "SpiderSynQuestion": "List the titles of all musics that have 4 minute duration or are in English.", + "query": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"4:%\" UNION SELECT song_name FROM song WHERE languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all songs that are approximately 4 minutes long or are in English?", + "SpiderSynQuestion": "What are the titles of all musics that are approximately 4 minutes long or are in English?", + "query": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"4:%\" UNION SELECT song_name FROM song WHERE languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the language used most often in the songs?", + "SpiderSynQuestion": "What is the language used most often in the songs?", + "query": "SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the languages that are used most often in songs?", + "SpiderSynQuestion": "What are the languages that are used most often in songs?", + "query": "SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the language that was used most often in songs with resolution above 500?", + "SpiderSynQuestion": "What is the language that was used most often in songs with resolution above 500?", + "query": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?", + "SpiderSynQuestion": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?", + "query": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of artists who are Male and are from UK?", + "SpiderSynQuestion": "What are the names of artists who are Male and are from UK?", + "query": "SELECT artist_name FROM artist WHERE country = \"UK\" AND gender = \"Male\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all male British artists?", + "SpiderSynQuestion": "What are the names of all male British artists?", + "query": "SELECT artist_name FROM artist WHERE country = \"UK\" AND gender = \"Male\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the names of songs whose genre is modern or language is English.", + "SpiderSynQuestion": "Find the titles of musics whose genre is modern or language is English.", + "query": "SELECT song_name FROM song WHERE genre_is = \"modern\" OR languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the songs that are modern or sung in English?", + "SpiderSynQuestion": "What are the titles of the musics that are modern or sung in English?", + "query": "SELECT song_name FROM song WHERE genre_is = \"modern\" OR languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Return the names of songs for which format is mp3 and resolution is below 1000.", + "SpiderSynQuestion": "Return the titles of musics for which format is mp3 and resolution is below 1000.", + "query": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" INTERSECT SELECT song_name FROM song WHERE resolution < 1000" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all songs that are in mp3 format and have a resolution lower than 1000?", + "SpiderSynQuestion": "What are the titles of all musics that are in mp3 format and have a resolution lower than 1000?", + "query": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" INTERSECT SELECT song_name FROM song WHERE resolution < 1000" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Return the names of singers who are from UK and released an English song.", + "SpiderSynQuestion": "Return the names of singers who are from UK and released an English song.", + "query": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of all singers that are from the UK and released a song in English?", + "SpiderSynQuestion": "What are the names of all singers that are from the UK and released a song in English?", + "query": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the average rating and resolution of songs that are in Bangla?", + "SpiderSynQuestion": "What are the average score and resolution of songs that are in Bangla?", + "query": "SELECT avg(rating) , avg(resolution) FROM song WHERE languages = \"bangla\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the average rating and resolution of all bangla songs?", + "SpiderSynQuestion": "What is the average score and resolution of all bangla songs?", + "query": "SELECT avg(rating) , avg(resolution) FROM song WHERE languages = \"bangla\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?", + "SpiderSynQuestion": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?", + "query": "SELECT max(T2.resolution) , min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"3:%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?", + "SpiderSynQuestion": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?", + "query": "SELECT max(T2.resolution) , min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"3:%\"" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the maximum duration and resolution of songs grouped and ordered by languages?", + "SpiderSynQuestion": "What are the maximum duration and resolution of songs grouped and ordered by languages?", + "query": "SELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?", + "SpiderSynQuestion": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?", + "query": "SELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?", + "SpiderSynQuestion": "What are the shortest duration and lowest score of songs grouped by genre and ordered by genre?", + "query": "SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?", + "SpiderSynQuestion": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?", + "query": "SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the names and number of works of all artists who have at least one English songs.", + "SpiderSynQuestion": "Find the names and number of works of all artists who have at least one English songs.", + "query": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\" GROUP BY T2.artist_name HAVING count(*) >= 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names and number of works for all artists who have sung at least one song in English?", + "SpiderSynQuestion": "What are the names and number of works for all artists who have sung at least one song in English?", + "query": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\" GROUP BY T2.artist_name HAVING count(*) >= 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the name and country of origin for all artists who have release at least one song of resolution above 900.", + "SpiderSynQuestion": "Find the name and nationality of origin for all artists who have release at least one song of resolution above 900.", + "query": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the name and country of origin for each artist who has released a song with a resolution higher than 900?", + "SpiderSynQuestion": "What is the name and nationality of origin for each artist who has released a song with a resolution higher than 900?", + "query": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the names and number of works of the three artists who have produced the most songs.", + "SpiderSynQuestion": "Find the names and number of works of the three artists who have produced the most songs.", + "query": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the three artists who have produced the most songs, and how many works did they produce?", + "SpiderSynQuestion": "What are the names of the three artists who have produced the most songs, and how many works did they produce?", + "query": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the country of origin for the artist who made the least number of songs?", + "SpiderSynQuestion": "Find the nationality of origin for the artist who made the least number of songs?", + "query": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What country is the artist who made the fewest songs from?", + "SpiderSynQuestion": "What nationality is the artist who made the fewest songs from?", + "query": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the songs whose rating is below the rating of all songs in English?", + "SpiderSynQuestion": "What are the titles of the musics whose score is below the score of all songs in English?", + "query": "SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages = 'english')" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the song names for every song whose rating is less than the minimum rating for English songs?", + "SpiderSynQuestion": "What are the music titles for every music whose score is less than the minimum score for English musics?", + "query": "SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages = 'english')" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?", + "SpiderSynQuestion": "What is ids of the musics whose resolution is higher than the resolution of any musics with score lower than 8?", + "query": "SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FROM song WHERE rating < 8)" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the id of every song that has a resolution higher than that of a song with a rating below 8?", + "SpiderSynQuestion": "What is the id of every music that has a resolution higher than that of a song with a score below 8?", + "query": "SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FROM song WHERE rating < 8)" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?", + "SpiderSynQuestion": "What is ids of the musics whose resolution is higher than the average resolution of songs in modern genre?", + "query": "SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = \"modern\")" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the ids of all songs that have higher resolution of the average resolution in the modern genre?", + "SpiderSynQuestion": "What are the ids of all musics that have higher resolution of the average resolution in the modern genre?", + "query": "SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = \"modern\")" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the top 3 artists who have the largest number of songs works whose language is Bangla.", + "SpiderSynQuestion": "Find the top 3 artists who have the largest number of songs works whose language is Bangla.", + "query": "SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"bangla\" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the top 3 artists with the largest number of songs in the language Bangla?", + "SpiderSynQuestion": "What are the top 3 artists with the largest number of songs in the language Bangla?", + "query": "SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"bangla\" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "music_1", + "SpiderQuestion": "List the id, genre and artist name of English songs ordered by rating.", + "SpiderSynQuestion": "List the id, type and artist name of English songs ordered by score.", + "query": "SELECT f_id , genre_is , artist_name FROM song WHERE languages = \"english\" ORDER BY rating" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the id, genre, and name of the artist for every English song ordered by ascending rating?", + "SpiderSynQuestion": "What is the id, type, and name of the artist for every English song ordered by ascending rating?", + "query": "SELECT f_id , genre_is , artist_name FROM song WHERE languages = \"english\" ORDER BY rating" + }, + { + "db_id": "music_1", + "SpiderQuestion": "List the duration, file size and format of songs whose genre is pop, ordered by title?", + "SpiderSynQuestion": "List the duration, document size and format of songs whose genre is pop, ordered by title?", + "query": "SELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"pop\" ORDER BY T2.song_name" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What is the duration, file size, and song format for every pop song, ordered by title alphabetically?", + "SpiderSynQuestion": "What is the duration, document size, and song format for every pop song, ordered by title alphabetically?", + "query": "SELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"pop\" ORDER BY T2.song_name" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the names of the artists who have produced English songs but have never received rating higher than 8.", + "SpiderSynQuestion": "Find the names of the artists who have produced English songs but have never received score higher than 8.", + "query": "SELECT DISTINCT artist_name FROM song WHERE languages = \"english\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?", + "SpiderSynQuestion": "What are the names of the different artists that have produced a song in English but have never receieved a score higher than 8?", + "query": "SELECT DISTINCT artist_name FROM song WHERE languages = \"english\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8" + }, + { + "db_id": "music_1", + "SpiderQuestion": "Find the names of the artists who are from Bangladesh and have never received rating higher than 7.", + "SpiderSynQuestion": "Find the names of the artists who are from Bangladesh and have never received score higher than 7.", + "query": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7" + }, + { + "db_id": "music_1", + "SpiderQuestion": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", + "SpiderSynQuestion": "What are the names of the different artists from Bangladesh who never received a score higher than a 7?", + "query": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "what is the full name and id of the college with the largest number of baseball players?", + "SpiderSynQuestion": "what is the forename, surname and id of the college with the largest number of baseball players?", + "query": "SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the full name and id of the college that has the most baseball players.", + "SpiderSynQuestion": "Find the forename, surname and id of the college that has the most baseball players.", + "query": "SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is average salary of the players in the team named 'Boston Red Stockings' ?", + "SpiderSynQuestion": "What is average wage of the players in the team named 'Boston Red Stockings' ?", + "query": "SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Compute the average salary of the players in the team called 'Boston Red Stockings'.", + "SpiderSynQuestion": "Compute the average wage of the players in the team called 'Boston Red Stockings'.", + "query": "SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are first and last names of players participating in all star game in 1998?", + "SpiderSynQuestion": "What are forename and family names of players participating in all star game in 1998?", + "query": "SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List the first and last name for players who participated in all star game in 1998.", + "SpiderSynQuestion": "List the forename and family names for players who participated in all star game in 1998.", + "query": "SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.", + "SpiderSynQuestion": "What are the forename, family name and id of the player with the most all star game experiences? Also list the count.", + "query": "SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game.", + "SpiderSynQuestion": "Which player has the most all star game experiences? Give me the forename, family name and id of the player, as well as the number of times the player participated in all star game.", + "query": "SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many players enter hall of fame each year?", + "SpiderSynQuestion": "How many participants enter hall of fame each year?", + "query": "SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Count the number of players who enter hall of fame for each year.", + "SpiderSynQuestion": "Count the number of participants who enter hall of fame for each year.", + "query": "SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the average number of attendance at home games for each year?", + "SpiderSynQuestion": "What is the average number of number of attendees at home games for each year?", + "query": "SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "For each year, return the year and the average number of attendance at home games.", + "SpiderSynQuestion": "For each year, return the year and the average number of attendee at home games.", + "query": "SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "In 2014, what are the id and rank of the team that has the largest average number of attendance?", + "SpiderSynQuestion": "In 2014, what are the id and rank of the team that has the largest average number of attendance?", + "query": "SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the id and rank of the team that has the highest average attendance rate in 2014.", + "SpiderSynQuestion": "Find the id and rank of the team that has the highest average attendance rate in 2014.", + "query": "SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the manager's first name, last name and id who won the most manager award?", + "SpiderSynQuestion": "What are the manager's full name and id who won the most manager award?", + "query": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which manager won the most manager award? Give me the manager's first name, last name and id.", + "SpiderSynQuestion": "Which manager won the most manager award? Give me the manager's forename, family name and id.", + "query": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many parks are there in the state of NY?", + "SpiderSynQuestion": "How many parks are there in the state of NY?", + "query": "SELECT count(*) FROM park WHERE state = 'NY';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Show me the number of parks the state of NY has.", + "SpiderSynQuestion": "Show me the number of parks the state of NY has.", + "query": "SELECT count(*) FROM park WHERE state = 'NY';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which 3 players won the most player awards? List their full name and id.", + "SpiderSynQuestion": "Which 3 players won the most player awards? List their full name and id.", + "query": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the first name, last name and id for the top three players won the most player awards.", + "SpiderSynQuestion": "Find the forename, family name and id for the top three players won the most player awards.", + "query": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List three countries which are the origins of the least players.", + "SpiderSynQuestion": "List three nations which are the origins of the least participants.", + "query": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the three countries that the least players are from?", + "SpiderSynQuestion": "What are the three nations that the least participants are from?", + "query": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find all the players' first name and last name who have empty death record.", + "SpiderSynQuestion": "Find all the players' forename and family name who have empty death record.", + "query": "SELECT name_first , name_last FROM player WHERE death_year = '';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the first name and last name of the players whose death record is empty?", + "SpiderSynQuestion": "What are the forename and family name of the players whose death record is empty?", + "query": "SELECT name_first , name_last FROM player WHERE death_year = '';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.", + "SpiderSynQuestion": "How many participants born in USA are right-handed batters? That is, have the batter value 'R'.", + "query": "SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Count the number of players who were born in USA and have bats information 'R'.", + "SpiderSynQuestion": "Count the number of participants who were born in USA and have bats information 'R'.", + "query": "SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the average height of the players from the college named 'Yale University'?", + "SpiderSynQuestion": "What is the average stature of the participants from the college named 'Yale University'?", + "query": "SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the average height of the players who belong to the college called 'Yale University'.", + "SpiderSynQuestion": "Find the average stature of the participants who belong to the college called 'Yale University'.", + "query": "SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the highest salary among each team? List the team name, id and maximum salary.", + "SpiderSynQuestion": "What is the highest wage among each team? List the team name, id and maximum wage.", + "query": "SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "For each team, return the team name, id and the maximum salary among the team.", + "SpiderSynQuestion": "For each team, return the team name, id and the maximum wage among the team.", + "query": "SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the name and id of the team offering the lowest average salary?", + "SpiderSynQuestion": "What are the name and id of the team offering the lowest average wage?", + "query": "SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which team offers the lowest average salary? Give me the name and id of the team.", + "SpiderSynQuestion": "Which team offers the lowest average wage? Give me the name and id of the team.", + "query": "SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the players' first name and last name who won award both in 1960 and in 1961.", + "SpiderSynQuestion": "Find the players' forename and family name who won award both in 1960 and in 1961.", + "query": "SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which players won awards in both 1960 and 1961? Return their first names and last names.", + "SpiderSynQuestion": "Which players won awards in both 1960 and 1961? Return their forename and family name.", + "query": "SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List players' first name and last name who have weight greater than 220 or height shorter than 75.", + "SpiderSynQuestion": "List players' forename and family name who have weight greater than 220 or height shorter than 75.", + "query": "SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the first name and last name of the players who have weight above 220 or height below 75?", + "SpiderSynQuestion": "What are the forename and family name of the players who have weight above 220 or height below 75?", + "query": "SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?", + "SpiderSynQuestion": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?", + "query": "SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?", + "SpiderSynQuestion": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?", + "query": "SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many times did Boston Red Stockings lose in 2009 postseason?", + "SpiderSynQuestion": "How many times did Boston Red Stockings lose in 2009 postseason?", + "query": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", + "SpiderSynQuestion": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", + "query": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the name and id of the team with the most victories in 2008 postseason?", + "SpiderSynQuestion": "What are the name and id of the team with the most victories in 2008 postseason?", + "query": "SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the name and id of the team that won the most times in 2008 postseason.", + "SpiderSynQuestion": "Find the name and id of the team that won the most times in 2008 postseason.", + "query": "SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?", + "SpiderSynQuestion": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?", + "query": "SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.", + "SpiderSynQuestion": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.", + "query": "SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the total number of postseason games that team Boston Red Stockings participated in?", + "SpiderSynQuestion": "What is the total number of postseason games that team Boston Red Stockings participated in?", + "query": "SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' );" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many times in total did the team Boston Red Stockings participate in postseason games?", + "SpiderSynQuestion": "How many times in total did the team Boston Red Stockings participate in postseason games?", + "query": "SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' );" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')?", + "SpiderSynQuestion": "How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')?", + "query": "SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason.", + "SpiderSynQuestion": "Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason.", + "query": "SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the total salary paid by team Boston Red Stockings in 2010?", + "SpiderSynQuestion": "What is the total wage paid by team Boston Red Stockings in 2010?", + "query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the total salary expenses of team Boston Red Stockings in 2010?", + "SpiderSynQuestion": "What is the total wage expenses of team Boston Red Stockings in 2010?", + "query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many players were in the team Boston Red Stockings in 2000?", + "SpiderSynQuestion": "How many participants were in the team Boston Red Stockings in 2000?", + "query": "SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many players did Boston Red Stockings have in 2000?", + "SpiderSynQuestion": "How many participants did Boston Red Stockings have in 2000?", + "query": "SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List the 3 highest salaries of the players in 2001?", + "SpiderSynQuestion": "List the 3 highest wages of the players in 2001?", + "query": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How much salary did the top 3 well-paid players get in 2001?", + "SpiderSynQuestion": "How much wage did the top 3 well-paid players get in 2001?", + "query": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What were all the salary values of players in 2010 and 2001?", + "SpiderSynQuestion": "What were all the wage values of players in 2010 and 2001?", + "query": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List all the salary values players received in 2010 and 2001.", + "SpiderSynQuestion": "List all the wage values players received in 2010 and 2001.", + "query": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "In which year did the least people enter hall of fame?", + "SpiderSynQuestion": "In which year did the least people enter hall of fame?", + "query": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the year in which the least people enter hall of fame.", + "SpiderSynQuestion": "Find the year in which the least people enter hall of fame.", + "query": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many parks are there in Atlanta city?", + "SpiderSynQuestion": "How many parks are there in Atlanta city?", + "query": "SELECT count(*) FROM park WHERE city = 'Atlanta';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many parks does Atlanta city have?", + "SpiderSynQuestion": "How many parks does Atlanta city have?", + "query": "SELECT count(*) FROM park WHERE city = 'Atlanta';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many games were played in park \"Columbia Park\" in 1907?", + "SpiderSynQuestion": "How many games were played in park \"Columbia Park\" in 1907?", + "query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Count the number of games taken place in park \"Columbia Park\" in 1907.", + "SpiderSynQuestion": "Count the number of games taken place in park \"Columbia Park\" in 1907.", + "query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many games were played in city Atlanta in 2000?", + "SpiderSynQuestion": "How many games were played in city Atlanta in 2000?", + "query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the number of games taken place in city Atlanta in 2000.", + "SpiderSynQuestion": "Find the number of games taken place in city Atlanta in 2000.", + "query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?", + "SpiderSynQuestion": "What is the total home game attendees of team Boston Red Stockings from 2000 to 2010?", + "query": "SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?", + "SpiderSynQuestion": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?", + "query": "SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?", + "SpiderSynQuestion": "How much did the the player with forename Len and family name Barker earn between 1985 to 1990 in total?", + "query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.", + "SpiderSynQuestion": "Compute the total wage that the player with first name Len and last name Barker received between 1985 to 1990.", + "query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.", + "SpiderSynQuestion": "List players' forename and surname who received salary from team Washington Nationals in both 2005 and 2007.", + "query": "SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?", + "SpiderSynQuestion": "What are the forename and surname of the players who were paid salary by team Washington Nationals in both 2005 and 2007?", + "query": "SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?", + "SpiderSynQuestion": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?", + "query": "SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.", + "SpiderSynQuestion": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.", + "query": "SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which team had the least number of attendances in home games in 1980?", + "SpiderSynQuestion": "Which team had the least number of attendees in home games in 1980?", + "query": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the team that attended the least number of home games in 1980.", + "SpiderSynQuestion": "Find the team that attended the least number of home games in 1980.", + "query": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "List the names of states that have more than 2 parks.", + "SpiderSynQuestion": "List the names of states that have more than 2 parks.", + "query": "SELECT state FROM park GROUP BY state HAVING count(*) > 2;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which states have more than 2 parks?", + "SpiderSynQuestion": "Which states have more than 2 parks?", + "query": "SELECT state FROM park GROUP BY state HAVING count(*) > 2;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "How many team franchises are active, with active value 'Y'?", + "SpiderSynQuestion": "How many team franchises are active, with active value 'Y'?", + "query": "SELECT count(*) FROM team_franchise WHERE active = 'Y';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find the number of team franchises that are active (have 'Y' as \"active\" information).", + "SpiderSynQuestion": "Find the number of team franchises that are active (have 'Y' as \"active\" information).", + "query": "SELECT count(*) FROM team_franchise WHERE active = 'Y';" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which cities have 2 to 4 parks?", + "SpiderSynQuestion": "Which towns have 2 to 4 parks?", + "query": "SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Find all the cities that have 2 to 4 parks.", + "SpiderSynQuestion": "Find all the towns that have 2 to 4 parks.", + "query": "SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which park had most attendances in 2008?", + "SpiderSynQuestion": "Which park had most attendances in 2008?", + "query": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;" + }, + { + "db_id": "baseball_1", + "SpiderQuestion": "Which park did the most people attend in 2008?", + "SpiderSynQuestion": "Which park did the most people attend in 2008?", + "query": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "How many camera lenses have a focal length longer than 15 mm?", + "SpiderSynQuestion": "How many camera lenses have a focal length longer than 15 mm?", + "query": "SELECT count(*) FROM camera_lens WHERE focal_length_mm > 15" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.", + "SpiderSynQuestion": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.", + "query": "SELECT brand , name FROM camera_lens ORDER BY max_aperture DESC" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "List the id, color scheme, and name for all the photos.", + "SpiderSynQuestion": "List the id, scheme of colour, and name for all the photos.", + "query": "SELECT id , color , name FROM photos" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What are the maximum and average height of the mountains?", + "SpiderSynQuestion": "What are the maximum and average height of the mountains?", + "query": "SELECT max(height) , avg(height) FROM mountain" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What are the average prominence of the mountains in country 'Morocco'?", + "SpiderSynQuestion": "What are the average prominence of the mountains in country 'Morocco'?", + "query": "SELECT avg(prominence) FROM mountain WHERE country = 'Morocco'" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?", + "SpiderSynQuestion": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?", + "query": "SELECT name , height , prominence FROM mountain WHERE range != 'Aberdare Range'" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What are the id and name of the photos for mountains?", + "SpiderSynQuestion": "What are the id and name of the photos for mountains?", + "query": "SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What are the id and name of the mountains that have at least 2 photos?", + "SpiderSynQuestion": "What are the id and name of the mountains that have at least 2 photos?", + "query": "SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING count(*) >= 2" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What are the names of the cameras that have taken picture of the most mountains?", + "SpiderSynQuestion": "What are the names of the cameras that have taken picture of the most mountains?", + "query": "SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?", + "SpiderSynQuestion": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?", + "query": "SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus'" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "How many different kinds of lens brands are there?", + "SpiderSynQuestion": "How many different kinds of lens brands are there?", + "query": "SELECT count(DISTINCT brand) FROM camera_lens" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "How many camera lenses are not used in taking any photos?", + "SpiderSynQuestion": "How many camera lenses are not used in taking any photos?", + "query": "SELECT count(*) FROM camera_lens WHERE id NOT IN ( SELECT camera_lens_id FROM photos )" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?", + "SpiderSynQuestion": "How many different kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?", + "query": "SELECT count(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia'" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif'", + "SpiderSynQuestion": "List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif'", + "query": "SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif'" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.", + "SpiderSynQuestion": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.", + "query": "SELECT name , prominence FROM mountain EXCEPT SELECT T1.name , T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma'" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "List the camera lens names containing substring \"Digital\".", + "SpiderSynQuestion": "List the camera lens names containing substring \"Digital\".", + "query": "SELECT name FROM camera_lens WHERE name LIKE \"%Digital%\"" + }, + { + "db_id": "mountain_photos", + "SpiderQuestion": "What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.", + "SpiderSynQuestion": "What is the name of each camera lens and the number of picture taken by it? Order the result by the count of photos.", + "query": "SELECT T1.name , count(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY count(*)" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Find the names of channels that are not owned by CCTV.", + "SpiderSynQuestion": "Find the names of channels that are not owned by CCTV.", + "query": "SELECT name FROM channel WHERE OWNER != 'CCTV'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Which channels are not owned by CCTV? Give me the channel names.", + "SpiderSynQuestion": "Which channels are not owned by CCTV? Give me the channel names.", + "query": "SELECT name FROM channel WHERE OWNER != 'CCTV'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "List all channel names ordered by their rating in percent from big to small.", + "SpiderSynQuestion": "List all channel names ordered by their score in percent from big to small.", + "query": "SELECT name FROM channel ORDER BY rating_in_percent DESC" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Give me a list of all the channel names sorted by the channel rating in descending order.", + "SpiderSynQuestion": "Give me a list of all the channel names sorted by the channel score in descending order.", + "query": "SELECT name FROM channel ORDER BY rating_in_percent DESC" + }, + { + "db_id": "program_share", + "SpiderQuestion": "What is the owner of the channel that has the highest rating ratio?", + "SpiderSynQuestion": "What is the owner of the channel that has the highest rating ratio?", + "query": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Show me the owner of the channel with the highest rating.", + "SpiderSynQuestion": "Show me the owner of the channel with the highest score.", + "query": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1" + }, + { + "db_id": "program_share", + "SpiderQuestion": "how many programs are there?", + "SpiderSynQuestion": "how many programmes are there?", + "query": "SELECT count(*) FROM program" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Count the number of programs.", + "SpiderSynQuestion": "Count the number of programmes.", + "query": "SELECT count(*) FROM program" + }, + { + "db_id": "program_share", + "SpiderQuestion": "list all the names of programs, ordering by launch time.", + "SpiderSynQuestion": "list all the names of programmes, ordering by launch time.", + "query": "SELECT name FROM program ORDER BY launch" + }, + { + "db_id": "program_share", + "SpiderQuestion": "What is the list of program names, sorted by the order of launch date?", + "SpiderSynQuestion": "What is the list of programme names, sorted by the order of launch date?", + "query": "SELECT name FROM program ORDER BY launch" + }, + { + "db_id": "program_share", + "SpiderQuestion": "List the name, origin and owner of each program.", + "SpiderSynQuestion": "List the name, origin and owner of each programme.", + "query": "SELECT name , origin , OWNER FROM program" + }, + { + "db_id": "program_share", + "SpiderQuestion": "What are the name, origin and owner of each program?", + "SpiderSynQuestion": "What are the name, origin and owner of each programme?", + "query": "SELECT name , origin , OWNER FROM program" + }, + { + "db_id": "program_share", + "SpiderQuestion": "find the name of the program that was launched most recently.", + "SpiderSynQuestion": "find the name of the programme that was launched most recently.", + "query": "SELECT name FROM program ORDER BY launch DESC LIMIT 1" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Which program was launched most recently? Return the program name.", + "SpiderSynQuestion": "Which programme was launched most recently? Return the programme name.", + "query": "SELECT name FROM program ORDER BY launch DESC LIMIT 1" + }, + { + "db_id": "program_share", + "SpiderQuestion": "find the total percentage share of all channels owned by CCTV.", + "SpiderSynQuestion": "find the total percentage share of all channels owned by CCTV.", + "query": "SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "What is the total share (in percent) of all the channels owned by CCTV?", + "SpiderSynQuestion": "What is the total share (in percent) of all the channels owned by CCTV?", + "query": "SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Find the names of the channels that are broadcast in the morning.", + "SpiderSynQuestion": "Find the names of the channels that are broadcast in the morning.", + "query": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Which channels are broadcast in the morning? Give me the channel names.", + "SpiderSynQuestion": "Which channels are broadcast in the morning? Give me the channel names.", + "query": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "what are the names of the channels that broadcast in both morning and night?", + "SpiderSynQuestion": "what are the names of the channels that broadcast in both morning and night?", + "query": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Which channels broadcast both in the morning and at night? Give me the channel names.", + "SpiderSynQuestion": "Which channels broadcast both in the morning and at night? Give me the channel names.", + "query": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "how many programs are broadcast in each time section of the day?", + "SpiderSynQuestion": "how many programmes are broadcast in each time section of the day?", + "query": "SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Count the number of programs broadcast for each time section of a day.", + "SpiderSynQuestion": "Count the number of programmes broadcast for each time section of a day.", + "query": "SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day" + }, + { + "db_id": "program_share", + "SpiderQuestion": "find the number of different programs that are broadcast during night time.", + "SpiderSynQuestion": "find the number of different programmes that are broadcast during night time.", + "query": "SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "How many distinct programs are broadcast at \"Night\" time?", + "SpiderSynQuestion": "How many different programmes are broadcast at \"Night\" time?", + "query": "SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Find the names of programs that are never broadcasted in the morning.", + "SpiderSynQuestion": "Find the names of programmes that are never broadcasted in the morning.", + "query": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\"" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Which programs are never broadcasted in the morning? Give me the names of the programs.", + "SpiderSynQuestion": "Which programmes are never broadcasted in the morning? Give me the names of the programmes.", + "query": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\"" + }, + { + "db_id": "program_share", + "SpiderQuestion": "find the program owners that have some programs in both morning and night time.", + "SpiderSynQuestion": "find the programme owners that have some programmes in both morning and night time.", + "query": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Night\"" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Who are the owners of the programs that broadcast both in the morning and at night?", + "SpiderSynQuestion": "Who are the owners of the programmes that broadcast both in the morning and at night?", + "query": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Night\"" + }, + { + "db_id": "program_share", + "SpiderQuestion": "List all program origins in the alphabetical order.", + "SpiderSynQuestion": "List all programme origins in the alphabetical order.", + "query": "SELECT origin FROM program ORDER BY origin" + }, + { + "db_id": "program_share", + "SpiderQuestion": "What is the list of program origins ordered alphabetically?", + "SpiderSynQuestion": "What is the list of programme origins ordered alphabetically?", + "query": "SELECT origin FROM program ORDER BY origin" + }, + { + "db_id": "program_share", + "SpiderQuestion": "what is the number of different channel owners?", + "SpiderSynQuestion": "what is the number of different channel owners?", + "query": "SELECT count(DISTINCT OWNER) FROM channel" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Count the number of distinct channel owners.", + "SpiderSynQuestion": "Count the number of different channel owners.", + "query": "SELECT count(DISTINCT OWNER) FROM channel" + }, + { + "db_id": "program_share", + "SpiderQuestion": "find the names of programs whose origin is not in Beijing.", + "SpiderSynQuestion": "find the names of programmes whose origin is not in Beijing.", + "query": "SELECT name FROM program WHERE origin != 'Beijing'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Which programs' origins are not \"Beijing\"? Give me the program names.", + "SpiderSynQuestion": "Which programmes' origins are not \"Beijing\"? Give me the programme names.", + "query": "SELECT name FROM program WHERE origin != 'Beijing'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "What are the names of the channels owned by CCTV or HBS?", + "SpiderSynQuestion": "What are the names of the channels owned by CCTV or HBS?", + "query": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "List the names of all the channels owned by either CCTV or HBS", + "SpiderSynQuestion": "List the names of all the channels owned by either CCTV or HBS", + "query": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Find the total rating ratio for each channel owner.", + "SpiderSynQuestion": "Find the total score ratio for each channel owner.", + "query": "SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER" + }, + { + "db_id": "program_share", + "SpiderQuestion": "What is the total rating of channel for each channel owner?", + "SpiderSynQuestion": "What is the total score of channel for each channel owner?", + "query": "SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Find the name of the program that is broadcast most frequently.", + "SpiderSynQuestion": "Find the name of the programme that is broadcast most frequently.", + "query": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "program_share", + "SpiderQuestion": "Which program is broadcast most frequently? Give me the program name.", + "SpiderSynQuestion": "Which programme is broadcast most frequently? Give me the programme name.", + "query": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "How many courses are there in total?", + "SpiderSynQuestion": "How many curriculum are there in total?", + "query": "SELECT count(*) FROM COURSES" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the total number of courses offered.", + "SpiderSynQuestion": "Find the total number of curriculum offered.", + "query": "SELECT count(*) FROM COURSES" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the descriptions of the courses with name \"database\"?", + "SpiderSynQuestion": "What are the describing contents of the curriculum with name \"database\"?", + "query": "SELECT course_description FROM COURSES WHERE course_name = \"database\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Return the description for the courses named \"database\".", + "SpiderSynQuestion": "Return the describing content for the curriculum named \"database\".", + "query": "SELECT course_description FROM COURSES WHERE course_name = \"database\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the addresses of the course authors or tutors with personal name \"Cathrine\"", + "SpiderSynQuestion": "What are the locations of the course authors or tutors with personal name \"Cathrine\"", + "query": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name\t = \"Cathrine\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Return the addresses of the course authors or tutors whose personal name is \"Cathrine\".", + "SpiderSynQuestion": "Return the locations of the course authors or tutors whose personal name is \"Cathrine\".", + "query": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name\t = \"Cathrine\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List the addresses of all the course authors or tutors.", + "SpiderSynQuestion": "List the locations of all the course authors or tutors.", + "query": "SELECT address_line_1 FROM Course_Authors_and_Tutors" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What is the address of each course author or tutor?", + "SpiderSynQuestion": "What is the location of each course author or tutor?", + "query": "SELECT address_line_1 FROM Course_Authors_and_Tutors" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List all the login names and family names of course author and tutors.", + "SpiderSynQuestion": "List all the login names and last names of course author and tutors.", + "query": "SELECT login_name , family_name FROM Course_Authors_and_Tutors" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the login names and family names of course author and tutors?", + "SpiderSynQuestion": "What are the login names and last names of course author and tutors?", + "query": "SELECT login_name , family_name FROM Course_Authors_and_Tutors" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List all the dates of enrollment and completion of students.", + "SpiderSynQuestion": "List all the day of enrollment and completion of students.", + "query": "SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are all the dates of enrollment and completion in record?", + "SpiderSynQuestion": "What are all the day of enrollment and completion in record?", + "query": "SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "How many distinct students are enrolled in courses?", + "SpiderSynQuestion": "How many different students have registered for the courses?", + "query": "SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the number of distinct students enrolled in courses.", + "SpiderSynQuestion": "Find the number of different students enrolled in curriculum.", + "query": "SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "How many distinct courses are enrolled in by students?", + "SpiderSynQuestion": "How many different curriculum are enrolled in by students?", + "query": "SELECT count(distinct course_id) FROM Student_Course_Enrolment" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the number of distinct courses that have enrolled students.", + "SpiderSynQuestion": "Find the number of different curriculum that have enrolled students.", + "query": "SELECT count(distinct course_id) FROM Student_Course_Enrolment" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the dates of the tests taken with result \"Pass\".", + "SpiderSynQuestion": "Find the day of the tests taken with result \"Pass\".", + "query": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = \"Pass\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Which tests have \"Pass\" results? Return the dates when the tests were taken.", + "SpiderSynQuestion": "Which tests have \"Pass\" results? Return the day when the tests were taken.", + "query": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = \"Pass\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "How many tests have result \"Fail\"?", + "SpiderSynQuestion": "How many tests have result \"Fail\"?", + "query": "SELECT count(*) FROM Student_Tests_Taken WHERE test_result = \"Fail\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Count the number of tests with \"Fail\" result.", + "SpiderSynQuestion": "Count the number of tests with \"Fail\" result.", + "query": "SELECT count(*) FROM Student_Tests_Taken WHERE test_result = \"Fail\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the login names of the students with family name \"Ward\"?", + "SpiderSynQuestion": "What are the login names of the students with last name \"Ward\"?", + "query": "SELECT login_name FROM Students WHERE family_name = \"Ward\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Return the login names of the students whose family name is \"Ward\".", + "SpiderSynQuestion": "Return the login names of the students whose last name is \"Ward\".", + "query": "SELECT login_name FROM Students WHERE family_name = \"Ward\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?", + "SpiderSynQuestion": "What are the day of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?", + "query": "SELECT date_of_latest_logon FROM Students WHERE family_name = \"Jaskolski\" OR family_name = \"Langosh\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the latest logon date of the students whose family name is \"Jaskolski\" or \"Langosh\".", + "SpiderSynQuestion": "Find the latest logon day of the students whose family name is \"Jaskolski\" or \"Langosh\".", + "query": "SELECT date_of_latest_logon FROM Students WHERE family_name = \"Jaskolski\" OR family_name = \"Langosh\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "How many students have personal names that contain the word \"son\"?", + "SpiderSynQuestion": "How many students have personal names that contain the word \"son\"?", + "query": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE \"%son%\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the number of students who have the word \"son\" in their personal names.", + "SpiderSynQuestion": "Find the number of students who have the word \"son\" in their personal names.", + "query": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE \"%son%\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List all the subject names.", + "SpiderSynQuestion": "List all the subject names.", + "query": "SELECT subject_name FROM SUBJECTS" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the names of all the subjects.", + "SpiderSynQuestion": "What are the names of all the subjects.", + "query": "SELECT subject_name FROM SUBJECTS" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List all the information about course authors and tutors in alphabetical order of the personal name.", + "SpiderSynQuestion": "List all the information about curriculum authors and teachers in alphabetical order of the personal name.", + "query": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Sort the information about course authors and tutors in alphabetical order of the personal name.", + "SpiderSynQuestion": "Sort the information about curriculum authors and teachers in alphabetical order of the personal name.", + "query": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List the personal names and family names of all the students in alphabetical order of family name.", + "SpiderSynQuestion": "List the personal names and last names of all the students in alphabetical order of last name.", + "query": "SELECT personal_name , family_name FROM Students ORDER BY family_name" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.", + "SpiderSynQuestion": "What are the personal names and last names of the students? Sort the result in alphabetical order of the last name.", + "query": "SELECT personal_name , family_name FROM Students ORDER BY family_name" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List each test result and its count in descending order of count.", + "SpiderSynQuestion": "List each test result and its count in descending order of count.", + "query": "SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "For each distinct test result, find the number of students who got the result.", + "SpiderSynQuestion": "For each different test outcome, find the number of students who got the outcome.", + "query": "SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the login name of the course author that teaches the course with name \"advanced database\".", + "SpiderSynQuestion": "Find the login name of the curriculum author that teaches the curriculum with name \"advanced database\".", + "query": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"advanced database\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Which course author teaches the \"advanced database\" course? Give me his or her login name.", + "SpiderSynQuestion": "Which curriculum author teaches the \"advanced database\" curriculum? Give me his or her login name.", + "query": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"advanced database\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the addresses of the course authors who teach the course with name \"operating system\" or \"data structure\".", + "SpiderSynQuestion": "Find the locations of the course authors who teach the course with name \"operating system\" or \"data structure\".", + "query": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"operating system\" OR T2.course_name = \"data structure\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the addresses of the course authors who teach either \"operating system\" or \"data structure\" course.", + "SpiderSynQuestion": "What are the locations of the course authors who teach either \"operating system\" or \"data structure\" course.", + "query": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"operating system\" OR T2.course_name = \"data structure\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the personal name, family name, and author ID of the course author that teaches the most courses.", + "SpiderSynQuestion": "Find the personal name, last name, and author ID of the course author that teaches the most courses.", + "query": "SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the personal name, family name, and author ID of the course author who teaches the most courses?", + "SpiderSynQuestion": "What are the personal name, last name, and author ID of the course author who teaches the most courses?", + "query": "SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the addresses and author IDs of the course authors that teach at least two courses.", + "SpiderSynQuestion": "Find the locations and author IDs of the course authors that teach at least two courses.", + "query": "SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Which course authors teach two or more courses? Give me their addresses and author IDs.", + "SpiderSynQuestion": "Which course authors teach two or more courses? Give me their locations and author IDs.", + "query": "SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the names of courses taught by the tutor who has personal name \"Julio\".", + "SpiderSynQuestion": "Find the names of curriculum taught by the teacher who has personal name \"Julio\".", + "query": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the names of the courses taught by the tutor whose personal name is \"Julio\"?", + "SpiderSynQuestion": "What are the names of the curriculum taught by the tutor whose personal name is \"Julio\"?", + "query": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the names and descriptions of courses that belong to the subject named \"Computer Science\".", + "SpiderSynQuestion": "Find the names and describing contents of curriculum that belong to the subject named \"Computer Science\".", + "query": "SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Computer Science\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the names and descriptions of the all courses under the \"Computer Science\" subject?", + "SpiderSynQuestion": "What are the names and describing contents of the all curriculum under the \"Computer Science\" subject?", + "query": "SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Computer Science\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the subject ID, subject name, and the corresponding number of available courses for each subject.", + "SpiderSynQuestion": "Find the subject ID, subject name, and the corresponding number of available curriculum for each subject.", + "query": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the subject ID, subject name, and the number of available courses for each subject?", + "SpiderSynQuestion": "What are the subject ID, subject name, and the number of available curriculum for each subject?", + "query": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.", + "SpiderSynQuestion": "Find the subject ID, name of subject and the corresponding number of curriculum for each subject, and sort by the curriculum count in ascending order.", + "query": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.", + "SpiderSynQuestion": "List the subject ID, name of subject and the number of curriculum available for each subject in ascending order of the curriculum counts.", + "query": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What is the date of enrollment of the course named \"Spanish\"?", + "SpiderSynQuestion": "What is the day of enrollment of the curriculum named \"Spanish\"?", + "query": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"Spanish\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the the date of enrollment of the \"Spanish\" course.", + "SpiderSynQuestion": "Find the the day of enrollment of the \"Spanish\" curriculum.", + "query": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"Spanish\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What is the name of the course that has the most student enrollment?", + "SpiderSynQuestion": "What is the name of the curriculum that has the most student enrollment?", + "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Which course is enrolled in by the most students? Give me the course name.", + "SpiderSynQuestion": "Which curriculum is enrolled in by the most students? Give me the curriculum name.", + "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the names of the courses that have exactly 1 student enrollment?", + "SpiderSynQuestion": "What are the names of the curriculum that have exactly 1 student enrollment?", + "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the names of the courses that have just one student enrollment.", + "SpiderSynQuestion": "Find the names of the curriculum that have just one student enrollment.", + "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the descriptions and names of the courses that have student enrollment bigger than 2?", + "SpiderSynQuestion": "What are the descriptions and names of the curriculum that have student enrollment bigger than 2?", + "query": "SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Return the descriptions and names of the courses that have more than two students enrolled in.", + "SpiderSynQuestion": "Return the describing contents and names of the curriculum that have more than two students enrolled in.", + "query": "SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What is the name of each course and the corresponding number of student enrollment?", + "SpiderSynQuestion": "What is the name of each curriculum and the corresponding number of student enrollment?", + "query": "SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List the name and the number of enrolled student for each course.", + "SpiderSynQuestion": "List the name and the number of enrolled student for each curriculum.", + "query": "SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the enrollment dates of all the tests that have result \"Pass\"?", + "SpiderSynQuestion": "What are the enrollment day of all the tests that have result \"Pass\"?", + "query": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Pass\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the enrollment date for all the tests that have \"Pass\" result.", + "SpiderSynQuestion": "Find the enrollment day for all the tests that have \"Pass\" result.", + "query": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Pass\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the completion dates of all the tests that have result \"Fail\"?", + "SpiderSynQuestion": "What are the completion day of all the tests that have result \"Fail\"?", + "query": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Fail\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Return the completion date for all the tests that have \"Fail\" result.", + "SpiderSynQuestion": "Return the completion day for all the tests that have \"Fail\" result.", + "query": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Fail\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List the dates of enrollment and completion of the student with personal name \"Karson\".", + "SpiderSynQuestion": "List the day of enrollment and completion of the student with personal name \"Karson\".", + "query": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = \"Karson\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "On what dates did the student whose personal name is \"Karson\" enroll in and complete the courses?", + "SpiderSynQuestion": "On what day did the student whose personal name is \"Karson\" enroll in and complete the courses?", + "query": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = \"Karson\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "List the dates of enrollment and completion of the student with family name \"Zieme\" and personal name \"Bernie\".", + "SpiderSynQuestion": "List the day of enrollment and completion of the student with family name \"Zieme\" and personal name \"Bernie\".", + "query": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = \"Zieme\" AND T2.personal_name = \"Bernie\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "On what dates did the student with family name \"Zieme\" and personal name \"Bernie\" enroll in and complete the courses?", + "SpiderSynQuestion": "On what day did the student with family name \"Zieme\" and personal name \"Bernie\" enroll in and complete the courses?", + "query": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = \"Zieme\" AND T2.personal_name = \"Bernie\"" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the student ID and login name of the student with the most course enrollments", + "SpiderSynQuestion": "Find the student ID and login name of the student with the most curriculum enrollments", + "query": "SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the student ID and login name of the student who are enrolled in the most courses?", + "SpiderSynQuestion": "What are the student ID and login name of the student who are enrolled in the most curriculum?", + "query": "SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the student ID and personal name of the student with at least two enrollments.", + "SpiderSynQuestion": "Find the student ID and personal name of the student with at least two enrollments.", + "query": "SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Which student are enrolled in at least two courses? Give me the student ID and personal name.", + "SpiderSynQuestion": "Which student are enrolled in at least two curriculum? Give me the student ID and personal name.", + "query": "SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the student ID and middle name for all the students with at most two enrollments.", + "SpiderSynQuestion": "Find the student ID and middle name for all the students with at most two enrollments.", + "query": "SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the student IDs and middle names of the students enrolled in at most two courses?", + "SpiderSynQuestion": "What are the student IDs and middle names of the students enrolled in at most two curriculum?", + "query": "SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the personal names of students not enrolled in any course.", + "SpiderSynQuestion": "Find the personal names of students not enrolled in any curriculum.", + "query": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Which students not enrolled in any course? Find their personal names.", + "SpiderSynQuestion": "Which students not enrolled in any curriculum? Find their personal names.", + "query": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "How many students did not have any course enrollment?", + "SpiderSynQuestion": "How many students did not have any curriculum enrollment?", + "query": "SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Count the number of students who did not enroll in any course.", + "SpiderSynQuestion": "Count the number of students who did not enroll in any curriculum.", + "query": "SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the common login name of course authors and students.", + "SpiderSynQuestion": "Find the common login name of curriculum authors and students.", + "query": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the login names used both by some course authors and some students?", + "SpiderSynQuestion": "What are the login names used both by some curriculum authors and some students?", + "query": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "Find the common personal name of course authors and students.", + "SpiderSynQuestion": "Find the common personal name of curriculum authors and students.", + "query": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students" + }, + { + "db_id": "e_learning", + "SpiderQuestion": "What are the personal names used both by some course authors and some students?", + "SpiderSynQuestion": "What are the personal names used both by some curriculum authors and some students?", + "query": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.", + "SpiderSynQuestion": "Which claims caused more than 2 settlements or have the maximum claim value? List the day of the claim was made and the claim id.", + "query": "SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amount_Claimed) FROM Claims )" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim.", + "SpiderSynQuestion": "Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the day of the claim was made and the id of the claim.", + "query": "SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amount_Claimed) FROM Claims )" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which customer had at least 2 policies but did not file any claims? List the customer details and id.", + "SpiderSynQuestion": "Which client had at least 2 policies but did not file any claims? List the client information and id.", + "query": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Give me the the customer details and id for the customers who had two or more policies but did not file any claims.", + "SpiderSynQuestion": "Give me the the client information and id for the client who had two or more policies but did not file any claims.", + "query": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "List the method, date and amount of all the payments, in ascending order of date.", + "SpiderSynQuestion": "List the type, day and amount of all the payments, in ascending order of day.", + "query": "SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What are the method, date and amount of each payment? Sort the list in ascending order of date.", + "SpiderSynQuestion": "What are the type, day and amount of each payment? Sort the list in ascending order of day.", + "query": "SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount.", + "SpiderSynQuestion": "Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount.", + "query": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.", + "SpiderSynQuestion": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.", + "query": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount.", + "SpiderSynQuestion": "Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount.", + "query": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.", + "SpiderSynQuestion": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.", + "query": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled.", + "SpiderSynQuestion": "Among all the claims, which claims have a claimed amount larger than the average? List the day of the claim was made and the day it was settled.", + "query": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.", + "SpiderSynQuestion": "Give me the day of claim , settlement for all the claims whose claimed amount is larger than the average.", + "query": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.", + "SpiderSynQuestion": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start day.", + "query": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Return the claim start date for the claims whose claimed amount is no more than the average", + "SpiderSynQuestion": "Return the claim start day for the claims whose claimed amount is no more than the average", + "query": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "How many settlements does each claim correspond to? List the claim id and the number of settlements.", + "SpiderSynQuestion": "How many settlements does each claim correspond to? List the claim id and the number of settlements.", + "query": "SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.", + "SpiderSynQuestion": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.", + "query": "SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.", + "SpiderSynQuestion": "Which claim incurred the most number of settlements? List the claim id, the day of the claim was made, and the number.", + "query": "SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.", + "SpiderSynQuestion": "Find the claim id and claim day of the claim that incurred the most settlement count. Also tell me the count.", + "query": "SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.", + "SpiderSynQuestion": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.", + "query": "SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.", + "SpiderSynQuestion": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.", + "query": "SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Of all the claims, what was the earliest date when any claim was made?", + "SpiderSynQuestion": "Of all the claims, what was the earliest day when any claim was made?", + "query": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Tell me the the date when the first claim was made.", + "SpiderSynQuestion": "Tell me the the day when the first claim was made.", + "query": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What is the total amount of settlement made for all the settlements?", + "SpiderSynQuestion": "What is the total amount of settlement made for all the settlements?", + "query": "SELECT sum(Amount_Settled) FROM Settlements" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Compute the total amount of settlement across all the settlements.", + "SpiderSynQuestion": "Compute the total amount of settlement across all the settlements.", + "query": "SELECT sum(Amount_Settled) FROM Settlements" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Who are the customers that had more than 1 policy? List the customer details and id.", + "SpiderSynQuestion": "Who are the clients that had more than 1 policy? List the client information and id.", + "query": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the the customer details and id for the customers who had more than one policy.", + "SpiderSynQuestion": "Find the the client information and id for the client who had more than one policy.", + "query": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What are the claim dates and settlement dates of all the settlements?", + "SpiderSynQuestion": "What are the day of claim and settlement of all the settlements?", + "query": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Tell me the the claim date and settlement date for each settlement case.", + "SpiderSynQuestion": "Tell me the day of claim and settlement for each settlement case.", + "query": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What is the most popular payment method?", + "SpiderSynQuestion": "What is the most popular payment type?", + "query": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which payment method is used the most often?", + "SpiderSynQuestion": "Which payment type is used the most often?", + "query": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "With which kind of payment method were the least number of payments processed?", + "SpiderSynQuestion": "With which kind of payment type were the least number of payments processed?", + "query": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What is the payment method that were used the least often?", + "SpiderSynQuestion": "What is the payment type that were used the least often?", + "query": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What is the total amount of payment?", + "SpiderSynQuestion": "What is the total amount of payment?", + "query": "SELECT sum(Amount_Payment) FROM Payments" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Compute the total amount of payment processed.", + "SpiderSynQuestion": "Compute the total amount of payment processed.", + "query": "SELECT sum(Amount_Payment) FROM Payments" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What are all the distinct details of the customers?", + "SpiderSynQuestion": "What are all the different information of the client?", + "query": "SELECT DISTINCT customer_details FROM Customers" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Return the distinct customer details.", + "SpiderSynQuestion": "Return the different client information.", + "query": "SELECT DISTINCT customer_details FROM Customers" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which kind of policy type was chosen by the most customers?", + "SpiderSynQuestion": "Which kind of insurance category was chosen by the most customers?", + "query": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the policy type the most customers choose.", + "SpiderSynQuestion": "Find the insurance category the most customers choose.", + "query": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "How many settlements are there in total?", + "SpiderSynQuestion": "How many settlements are there in total?", + "query": "SELECT count(*) FROM Settlements" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Count the total number of settlements made.", + "SpiderSynQuestion": "Count the total number of settlements made.", + "query": "SELECT count(*) FROM Settlements" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which Payments were processed with Visa? List the payment Id, the date and the amount.", + "SpiderSynQuestion": "Which Payments were processed with Visa? List the payment Id, the day and the amount.", + "query": "SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Give me the payment Id, the date and the amount for all the payments processed with Visa.", + "SpiderSynQuestion": "Give me the payment Id, the day and the amount for all the payments processed with Visa.", + "query": "SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "List the details of the customers who do not have any policies.", + "SpiderSynQuestion": "List the information of the client who do not have any policies.", + "query": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which customers do not have any policies? Find the details of these customers.", + "SpiderSynQuestion": "Which client do not have any policies? Find the information of these clients.", + "query": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.", + "SpiderSynQuestion": "List the day the claim was made, the day it was settled and the amount settled for all the claims which had exactly one settlement.", + "query": "SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled.", + "SpiderSynQuestion": "Which claims had exactly one settlement? For each, tell me the the day the claim was made, the day it was settled and the amount settled.", + "query": "SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "Find the total claimed amount of all the claims.", + "SpiderSynQuestion": "Find the total claimed amount of all the claims.", + "query": "SELECT sum(Amount_Claimed) FROM Claims" + }, + { + "db_id": "insurance_policies", + "SpiderQuestion": "What is total amount claimed summed across all the claims?", + "SpiderSynQuestion": "What is total amount claimed summed across all the claims?", + "query": "SELECT sum(Amount_Claimed) FROM Claims" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which department has the largest number of employees?", + "SpiderSynQuestion": "Which division has the largest number of staffs?", + "query": "SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the department with the most employees.", + "SpiderSynQuestion": "Find the division with the most staffs.", + "query": "SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the employee id of the head whose department has the least number of employees?", + "SpiderSynQuestion": "What is the staff id of the leader whose division has the least number of staffs?", + "query": "SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Tell me the employee id of the head of the department with the least employees.", + "SpiderSynQuestion": "Tell me the employee id of the leader of the division with the least employees.", + "query": "SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "what is the name and position of the head whose department has least number of employees?", + "SpiderSynQuestion": "what is the name and post of the head whose division has least number of employees?", + "query": "SELECT T2.name , T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name and position of the head of the department with the least employees.", + "SpiderSynQuestion": "Find the name and post of the head of the division with the least employees.", + "query": "SELECT T2.name , T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are names of patients who made an appointment?", + "SpiderSynQuestion": "What are names of patients who made an reservation?", + "query": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the names of patients who have made appointments.", + "SpiderSynQuestion": "List the names of patients who have made reservation.", + "query": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "what are name and phone number of patients who had more than one appointment?", + "SpiderSynQuestion": "what are name and telephone number of patients who had more than one appointment?", + "query": "SELECT name , phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING count(*) > 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which patients made more than one appointment? Tell me the name and phone number of these patients.", + "SpiderSynQuestion": "Which patients made more than one reservation? Tell me the name and telephone number of these patients.", + "query": "SELECT name , phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING count(*) > 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the id of the appointment with the most recent start date?", + "SpiderSynQuestion": "Find the id of the reservation with the most recent start date?", + "query": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the id of the appointment that started most recently?", + "SpiderSynQuestion": "What is the id of the reservation that started most recently?", + "query": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the name of physicians who took some appointment.", + "SpiderSynQuestion": "List the name of doctor who took some reservation.", + "query": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the names of all the physicians who took appointments.", + "SpiderSynQuestion": "What are the names of all the doctor who took reservation.", + "query": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the name of physicians who never took any appointment.", + "SpiderSynQuestion": "List the name of doctor who never took any reservation.", + "query": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which physicians have never taken any appointment? Find their names.", + "SpiderSynQuestion": "Which doctor have never taken any reservation? Find their names.", + "query": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of all physicians and their primary affiliated departments' names.", + "SpiderSynQuestion": "Find the names of all doctor and their primary affiliated departments' names.", + "query": "SELECT T1.name , T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the name and primarily affiliated department name of each physician?", + "SpiderSynQuestion": "What are the name and primarily affiliated department name of each doctor?", + "query": "SELECT T1.name , T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the name of the patient who made the most recent appointment?", + "SpiderSynQuestion": "What is the name of the patient who made the most recent reservation?", + "query": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name of the patient who made the appointment with the most recent start date.", + "SpiderSynQuestion": "Find the name of the sick people who made the reservation with the most recent start date.", + "query": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many patients stay in room 112?", + "SpiderSynQuestion": "How many sick people stay in room 112?", + "query": "SELECT count(distinct patient) FROM stay WHERE room = 112" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Count the number of patients who stayed in room 112.", + "SpiderSynQuestion": "Count the number of sick people who stayed in room 112.", + "query": "SELECT count(distinct patient) FROM stay WHERE room = 112" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many patients' prescriptions are made by physician John Dorian?", + "SpiderSynQuestion": "How many patients' prescriptions are made by physician John Dorian?", + "query": "SELECT count(distinct T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = \"John Dorian\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the number of patients' prescriptions physician John Dorian made.", + "SpiderSynQuestion": "Find the number of patients' prescriptions physician John Dorian made.", + "query": "SELECT count(distinct T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = \"John Dorian\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name of medication used on the patient who stays in room 111?", + "SpiderSynQuestion": "Find the name of medication used on the sick people who stays in room 111?", + "query": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the name of the medication used for the patient staying in room 111?", + "SpiderSynQuestion": "What is the name of the medication used for the sick people staying in room 111?", + "query": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the patient who most recently stayed in room 111.", + "SpiderSynQuestion": "Find the sick people who most recently stayed in room 111.", + "query": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the id of the patient who stayed in room 111 most recently?", + "SpiderSynQuestion": "What is the id of the sick people who stayed in room 111 most recently?", + "query": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the name of the nurse has the most appointments?", + "SpiderSynQuestion": "What is the name of the nurse has the most reservation?", + "query": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name of the nurse who has the largest number of appointments.", + "SpiderSynQuestion": "Find the name of the nurse who has the largest number of reservation.", + "query": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many patients do each physician take care of? List their names and number of patients they take care of.", + "SpiderSynQuestion": "How many sick people do each doctor take care of? List their names and number of sick people they take care of.", + "query": "SELECT T1.name , count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Return the name of each physician and the number of patients he or she treats.", + "SpiderSynQuestion": "Return the name of each doctor and the number of patients he or she treats.", + "query": "SELECT T1.name , count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name of physicians who are in charge of more than one patient.", + "SpiderSynQuestion": "Find the name of doctor who are in charge of more than one patient.", + "query": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING count(*) > 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which physicians are in charge of more than one patient? Give me their names.", + "SpiderSynQuestion": "Which doctor are in charge of more than one patient? Give me their names.", + "query": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING count(*) > 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the number of rooms located on each block floor.", + "SpiderSynQuestion": "Find the number of rooms located on each block floor.", + "query": "SELECT count(*) , T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many rooms does each block floor have?", + "SpiderSynQuestion": "How many rooms does each block floor have?", + "query": "SELECT count(*) , T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the number of rooms for different block code?", + "SpiderSynQuestion": "Find the number of rooms for different block code?", + "query": "SELECT count(*) , T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many rooms are located for each block code?", + "SpiderSynQuestion": "How many rooms are located for each block code?", + "query": "SELECT count(*) , T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the unique block codes that have available rooms?", + "SpiderSynQuestion": "What are the unique block codes that have available rooms?", + "query": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Tell me the distinct block codes where some rooms are available.", + "SpiderSynQuestion": "Tell me the different block codes where some rooms are available.", + "query": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many different types of rooms are there?", + "SpiderSynQuestion": "How many different categories of rooms are there?", + "query": "SELECT count(DISTINCT roomtype) FROM room" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the number of distinct room types available.", + "SpiderSynQuestion": "Find the number of different room categories available.", + "query": "SELECT count(DISTINCT roomtype) FROM room" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the names of the physicians who prescribe medication Thesisin?", + "SpiderSynQuestion": "What is the names of the doctor who prescribe medication Thesisin?", + "query": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = \"Thesisin\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the names of all the physicians who prescribe Thesisin as medication.", + "SpiderSynQuestion": "List the names of all the doctor who prescribe Thesisin as medication.", + "query": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = \"Thesisin\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name and position of physicians who prescribe some medication whose brand is X?", + "SpiderSynQuestion": "Find the name and post of doctor who prescribe some medication whose brand is X?", + "query": "SELECT DISTINCT T1.name , T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = \"X\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.", + "SpiderSynQuestion": "Which doctor prescribe a medication of brand X? Tell me the name and post of those doctor.", + "query": "SELECT DISTINCT T1.name , T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = \"X\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the number of medications prescribed for each brand.", + "SpiderSynQuestion": "Find the number of medications prescribed for each brand.", + "query": "SELECT count(*) , T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many medications are prescribed for each brand?", + "SpiderSynQuestion": "How many medications are prescribed for each brand?", + "query": "SELECT count(*) , T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name of physicians whose position title contains the word 'senior'.", + "SpiderSynQuestion": "Find the name of doctor whose post title contains the word 'senior'.", + "query": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the names of the physicians who have 'senior' in their titles.", + "SpiderSynQuestion": "What are the names of the doctor who have 'senior' in their titles.", + "query": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the patient who has the most recent undergoing treatment?", + "SpiderSynQuestion": "Find the sick people who has the most recent undergoing treatment?", + "query": "SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which patient is undergoing the most recent treatment?", + "SpiderSynQuestion": "Which sick people is undergoing the most recent treatment?", + "query": "SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of all patients who have an undergoing treatment and are staying in room 111.", + "SpiderSynQuestion": "Find the names of all sick people who have an undergoing treatment and are staying in room 111.", + "query": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the names of patients who are staying in room 111 and have an undergoing treatment?", + "SpiderSynQuestion": "What are the names of sick people who are staying in room 111 and have an undergoing treatment?", + "query": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the names of all distinct nurses ordered by alphabetical order?", + "SpiderSynQuestion": "List the names of all different nurses ordered by alphabetical order?", + "query": "SELECT DISTINCT name FROM nurse ORDER BY name" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the alphabetically ordered list of all the distinct names of nurses?", + "SpiderSynQuestion": "What is the alphabetically ordered list of all the different names of nurses?", + "query": "SELECT DISTINCT name FROM nurse ORDER BY name" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of nurses who are nursing an undergoing treatment.", + "SpiderSynQuestion": "Find the names of nurses who are nursing an undergoing treatment.", + "query": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which nurses are in charge of patients undergoing treatments?", + "SpiderSynQuestion": "Which nurses are in charge of sick people undergoing treatments?", + "query": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the names of all distinct medications, ordered in an alphabetical order.", + "SpiderSynQuestion": "List the names of all different medications, ordered in an alphabetical order.", + "query": "SELECT DISTINCT name FROM medication ORDER BY name" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the alphabetically ordered list of all distinct medications?", + "SpiderSynQuestion": "What is the alphabetically ordered list of all different medications?", + "query": "SELECT DISTINCT name FROM medication ORDER BY name" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the names of the physician who prescribed the highest dose?", + "SpiderSynQuestion": "What are the names of the doctor who prescribed the highest dose?", + "query": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the physician who prescribed the highest dose. What is his or her name?", + "SpiderSynQuestion": "Find the doctor who prescribed the highest dose. What is his or her name?", + "query": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the physicians' employee ids together with their primary affiliation departments' ids.", + "SpiderSynQuestion": "List the doctor' employee ids together with their primary affiliation departments' ids.", + "query": "SELECT physician , department FROM affiliated_with WHERE primaryaffiliation = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are each physician's employee id and department id primarily affiliated.", + "SpiderSynQuestion": "What are each doctor's employee id and department id primarily affiliated.", + "query": "SELECT physician , department FROM affiliated_with WHERE primaryaffiliation = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the names of departments where some physicians are primarily affiliated with.", + "SpiderSynQuestion": "List the names of divisions where some doctor are primarily affiliated with.", + "query": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the names of departments that have primarily affiliated physicians.", + "SpiderSynQuestion": "What are the names of divisions that have primarily affiliated doctor.", + "query": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What nurses are on call with block floor 1 and block code 1? Tell me their names.", + "SpiderSynQuestion": "What nurses are on call with block floor 1 and block code 1? Tell me their names.", + "query": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the ids of the nurses who are on call in block floor 1 and block code 1.", + "SpiderSynQuestion": "Find the ids of the nurses who are on call in block floor 1 and block code 1.", + "query": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the highest cost, lowest cost and average cost of procedures?", + "SpiderSynQuestion": "What are the highest price, lowest price and average price of procedures?", + "query": "SELECT MAX(cost) , MIN(cost) , AVG(cost) FROM procedures" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Tell me the highest, lowest, and average cost of procedures.", + "SpiderSynQuestion": "Tell me the highest, lowest, and average price of procedures.", + "query": "SELECT MAX(cost) , MIN(cost) , AVG(cost) FROM procedures" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "List the name and cost of all procedures sorted by the cost from the highest to the lowest.", + "SpiderSynQuestion": "List the name and price of all procedures sorted by the price from the highest to the lowest.", + "query": "SELECT name , cost FROM procedures ORDER BY cost DESC" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Sort the list of names and costs of all procedures in the descending order of cost.", + "SpiderSynQuestion": "Sort the list of names and price of all procedures in the descending order of price.", + "query": "SELECT name , cost FROM procedures ORDER BY cost DESC" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the three most expensive procedures.", + "SpiderSynQuestion": "Find the three most expensive procedures.", + "query": "SELECT name FROM procedures ORDER BY cost LIMIT 3" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the three most costly procedures?", + "SpiderSynQuestion": "What are the three most costly procedures?", + "query": "SELECT name FROM procedures ORDER BY cost LIMIT 3" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the physicians who are trained in a procedure that costs more than 5000.", + "SpiderSynQuestion": "Find the doctor who are trained in a procedure that costs more than 5000.", + "query": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which physicians are trained in procedures that are more expensive than 5000?", + "SpiderSynQuestion": "Which doctor are trained in procedures that are more expensive than 5000?", + "query": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the physician who was trained in the most expensive procedure?", + "SpiderSynQuestion": "Find the doctor who was trained in the most expensive procedure?", + "query": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which physician was trained in the procedure that costs the most.", + "SpiderSynQuestion": "Which doctor was trained in the procedure that costs the most.", + "query": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What is the average cost of procedures that physician John Wen was trained in?", + "SpiderSynQuestion": "What is the average price of procedures that doctor John Wen was trained in?", + "query": "SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Compute the mean price of procedures physician John Wen was trained in.", + "SpiderSynQuestion": "Compute the mean price of procedures doctor John Wen was trained in.", + "query": "SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of procedures which physician John Wen was trained in.", + "SpiderSynQuestion": "Find the names of procedures which doctor John Wen was trained in.", + "query": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the names of procedures physician John Wen was trained in?", + "SpiderSynQuestion": "What are the names of procedures doctor John Wen was trained in?", + "query": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.", + "SpiderSynQuestion": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.", + "query": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the procedures that cost more than 1000 or are specialized in by physician John Wen?", + "SpiderSynQuestion": "What are the procedures that price more than 1000 or are specialized in by physician John Wen?", + "query": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?", + "SpiderSynQuestion": "Find the names of all procedures which price more than 1000 but which physician John Wen was not trained in?", + "query": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?", + "SpiderSynQuestion": "Among the procedures that price more than 1000, which were not specialized in by physician John Wen?", + "query": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.", + "SpiderSynQuestion": "Find the names of all procedures such that the price is less than 5000 and physician John Wen was trained in.", + "query": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What procedures cost less than 5000 and have John Wen as a trained physician?", + "SpiderSynQuestion": "What procedures price less than 5000 and have John Wen as a trained physician?", + "query": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.", + "SpiderSynQuestion": "Find the name of doctor who are affiliated with both Surgery and Psychiatry divisions.", + "query": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.", + "SpiderSynQuestion": "Which doctor are affiliated with both Surgery and Psychiatry divisions? Tell me their names.", + "query": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the name of physicians who are affiliated with Surgery or Psychiatry department.", + "SpiderSynQuestion": "Find the name of doctor who are affiliated with Surgery or Psychiatry division.", + "query": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.", + "SpiderSynQuestion": "Which doctor are affiliated with either Surgery or Psychiatry department? Give me their names.", + "query": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of patients who are not using the medication of Procrastin-X.", + "SpiderSynQuestion": "Find the names of sick people who are not using the medication of Procrastin-X.", + "query": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the names of patients who are not taking the medication of Procrastin-X.", + "SpiderSynQuestion": "What are the names of sick people who are not taking the medication of Procrastin-X.", + "query": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the number of patients who are not using the medication of Procrastin-X.", + "SpiderSynQuestion": "Find the number of sick people who are not using the medication of Procrastin-X.", + "query": "SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X' )" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many patients are not using Procrastin-X as medication?", + "SpiderSynQuestion": "How many sick people are not using Procrastin-X as medication?", + "query": "SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X' )" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "How many appointments are there?", + "SpiderSynQuestion": "How many reservation are there?", + "query": "SELECT count(*) FROM appointment" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Count how many appointments have been made in total.", + "SpiderSynQuestion": "Count how many reservation have been made in total.", + "query": "SELECT count(*) FROM appointment" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "Find the names of nurses who are on call.", + "SpiderSynQuestion": "Find the names of nurses who are on call.", + "query": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse" + }, + { + "db_id": "hospital_1", + "SpiderQuestion": "What are the distinct names of nurses on call?", + "SpiderSynQuestion": "What are the different names of nurses on call?", + "query": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "How many ships are there?", + "SpiderSynQuestion": "How many vessels are there?", + "query": "SELECT count(*) FROM ship" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What is the number of ships?", + "SpiderSynQuestion": "What is the number of vessels?", + "query": "SELECT count(*) FROM ship" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "List the name of ships in ascending order of tonnage.", + "SpiderSynQuestion": "List the name of vessels in ascending order of tonnage.", + "query": "SELECT Name FROM ship ORDER BY Tonnage ASC" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "what are the names of the ships ordered by ascending tonnage?", + "SpiderSynQuestion": "what are the names of the vessels ordered by ascending tonnage?", + "query": "SELECT Name FROM ship ORDER BY Tonnage ASC" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the type and nationality of ships?", + "SpiderSynQuestion": "What are the category and nation of vessels?", + "query": "SELECT TYPE , Nationality FROM ship" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the types and nationalities of every ship?", + "SpiderSynQuestion": "What are the categories and nation of every vessel?", + "query": "SELECT TYPE , Nationality FROM ship" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "List the name of ships whose nationality is not \"United States\".", + "SpiderSynQuestion": "List the name of vessels whose nation is not \"United States\".", + "query": "SELECT Name FROM ship WHERE Nationality != \"United States\"" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the names of the ships that are not from the United States?", + "SpiderSynQuestion": "What are the names of the vessels that are not from the United States?", + "query": "SELECT Name FROM ship WHERE Nationality != \"United States\"" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Show the name of ships whose nationality is either United States or United Kingdom.", + "SpiderSynQuestion": "Show the name of vessels whose nation is either United States or United Kingdom.", + "query": "SELECT Name FROM ship WHERE Nationality = \"United States\" OR Nationality = \"United Kingdom\"" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the names of the ships that are from either the US or the UK?", + "SpiderSynQuestion": "What are the names of the vessels that are from either the US or the UK?", + "query": "SELECT Name FROM ship WHERE Nationality = \"United States\" OR Nationality = \"United Kingdom\"" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What is the name of the ship with the largest tonnage?", + "SpiderSynQuestion": "What is the name of the vessel with the largest tonnage?", + "query": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What is the ship with the largest amount of tonnage called?", + "SpiderSynQuestion": "What is the vessel with the largest amount of tonnage called?", + "query": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Show different types of ships and the number of ships of each type.", + "SpiderSynQuestion": "Show different categories of vessels and the number of vessels of each category.", + "query": "SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "For each type, how many ships are there?", + "SpiderSynQuestion": "For each category, how many vessels are there?", + "query": "SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Please show the most common type of ships.", + "SpiderSynQuestion": "Please show the most common category of vessels.", + "query": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What is the most common type of ships?", + "SpiderSynQuestion": "What is the most common category of vessels?", + "query": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "List the nations that have more than two ships.", + "SpiderSynQuestion": "List the nations that have more than two vessels.", + "query": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the nations that have more than two ships?", + "SpiderSynQuestion": "What are the nations that have more than two vessels?", + "query": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Show different types of ships and the average tonnage of ships of each type.", + "SpiderSynQuestion": "Show different categories of vessels and the average tonnage of vessels of each category.", + "query": "SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "For each type, what is the average tonnage?", + "SpiderSynQuestion": "For each category, what is the average tonnage?", + "query": "SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Show codes and fates of missions, and names of ships involved.", + "SpiderSynQuestion": "Show codes and destiny of missions, and names of ships involved.", + "query": "SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the mission codes, fates, and names of the ships involved?", + "SpiderSynQuestion": "What are the mission codes, destiny, and names of the ships involved?", + "query": "SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Show names of ships involved in a mission launched after 1928.", + "SpiderSynQuestion": "Show names of vessels involved in a mission launched after 1928.", + "query": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the names of ships that were involved in a mission launched after 1928?", + "SpiderSynQuestion": "What are the names of vessels that were involved in a mission launched after 1928?", + "query": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Show the distinct fate of missions that involve ships with nationality \"United States\"", + "SpiderSynQuestion": "Show the different destiny of missions that involve ships with nationality \"United States\"", + "query": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = \"United States\"" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the different fates of the mission that involved ships from the United States?", + "SpiderSynQuestion": "What are the different destiny of the mission that involved ships from the United States?", + "query": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = \"United States\"" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "List the name of ships that are not involved in any mission", + "SpiderSynQuestion": "List the name of vessel that are not involved in any mission", + "query": "SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the names of the ships that are not involved in any missions?", + "SpiderSynQuestion": "What are the names of the vessel that are not involved in any missions?", + "query": "SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.", + "SpiderSynQuestion": "Show the categories of vessel that have both vessel with tonnage larger than 6000 and vessel with tonnage smaller than 4000.", + "query": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000" + }, + { + "db_id": "ship_mission", + "SpiderQuestion": "What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?", + "SpiderSynQuestion": "What are the categories of the vessel that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?", + "query": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the number of students in total.", + "SpiderSynQuestion": "Find the number of students in total.", + "query": "SELECT count(*) FROM list" + }, + { + "db_id": "student_1", + "SpiderQuestion": "How many students are there?", + "SpiderSynQuestion": "How many students are there?", + "query": "SELECT count(*) FROM list" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the last names of students studying in room 111.", + "SpiderSynQuestion": "Find the family names of students studying in room 111.", + "query": "SELECT lastname FROM list WHERE classroom = 111" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the last names of students in room 111?", + "SpiderSynQuestion": "What are the family names of students in room 111?", + "query": "SELECT lastname FROM list WHERE classroom = 111" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the first names of students studying in room 108.", + "SpiderSynQuestion": "Find the forenames of students studying in room 108.", + "query": "SELECT firstname FROM list WHERE classroom = 108" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the first names of students in room 108?", + "SpiderSynQuestion": "What are the forenames of students in room 108?", + "query": "SELECT firstname FROM list WHERE classroom = 108" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the first names of students studying in room 107?", + "SpiderSynQuestion": "What are the forenames of students studying in room 107?", + "query": "SELECT DISTINCT firstname FROM list WHERE classroom = 107" + }, + { + "db_id": "student_1", + "SpiderQuestion": "List the first names of all the students in room 107.", + "SpiderSynQuestion": "List the forenames of all the students in room 107.", + "query": "SELECT DISTINCT firstname FROM list WHERE classroom = 107" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.", + "SpiderSynQuestion": "For each class room report the grade that is taught in it. Report just the class room number and the grade number.", + "query": "SELECT DISTINCT classroom , grade FROM list" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the grade number and classroom number of each class in the list?", + "SpiderSynQuestion": "What are the grade number and class room number of each class in the list?", + "query": "SELECT DISTINCT classroom , grade FROM list" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which grade is studying in classroom 103?", + "SpiderSynQuestion": "Which grade is studying in class room 103?", + "query": "SELECT DISTINCT grade FROM list WHERE classroom = 103" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the grade taught in classroom 103.", + "SpiderSynQuestion": "Find the grade taught in class room 103.", + "query": "SELECT DISTINCT grade FROM list WHERE classroom = 103" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the grade studying in room 105.", + "SpiderSynQuestion": "Find the grade studying in room 105.", + "query": "SELECT DISTINCT grade FROM list WHERE classroom = 105" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which grade is studying in room 105?", + "SpiderSynQuestion": "Which grade is studying in room 105?", + "query": "SELECT DISTINCT grade FROM list WHERE classroom = 105" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which classrooms are used by grade 4?", + "SpiderSynQuestion": "Which schoolrooms are used by grade 4?", + "query": "SELECT DISTINCT classroom FROM list WHERE grade = 4" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the classrooms in which grade 4 is studying.", + "SpiderSynQuestion": "Find the schoolrooms in which grade 4 is studying.", + "query": "SELECT DISTINCT classroom FROM list WHERE grade = 4" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which classrooms are used by grade 5?", + "SpiderSynQuestion": "Which schoolrooms are used by grade 5?", + "query": "SELECT DISTINCT classroom FROM list WHERE grade = 5" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Show me the classrooms grade 5 is using.", + "SpiderSynQuestion": "Show me the schoolrooms grade 5 is using.", + "query": "SELECT DISTINCT classroom FROM list WHERE grade = 5" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the last names of the teachers that teach fifth grade.", + "SpiderSynQuestion": "Find the family names of the teachers that teach fifth grade.", + "query": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5" + }, + { + "db_id": "student_1", + "SpiderQuestion": "what are the last names of the teachers who teach grade 5?", + "SpiderSynQuestion": "what are the family names of the teachers who teach grade 5?", + "query": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the first names of the teachers that teach first grade.", + "SpiderSynQuestion": "Find the forenames of the teachers that teach first grade.", + "query": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the first names of the teachers who teach grade 1?", + "SpiderSynQuestion": "What are the forenames of the teachers who teach grade 1?", + "query": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the first names of all the teachers that teach in classroom 110.", + "SpiderSynQuestion": "Find the forenames of all the teachers that teach in classroom 110.", + "query": "SELECT firstname FROM teachers WHERE classroom = 110" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which teachers teach in classroom 110? Give me their first names.", + "SpiderSynQuestion": "Which teachers teach in classroom 110? Give me their forenames.", + "query": "SELECT firstname FROM teachers WHERE classroom = 110" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the last names of teachers teaching in classroom 109.", + "SpiderSynQuestion": "Find the family names of teachers teaching in classroom 109.", + "query": "SELECT lastname FROM teachers WHERE classroom = 109" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which teachers teach in classroom 109? Give me their last names.", + "SpiderSynQuestion": "Which teachers teach in classroom 109? Give me their family names.", + "query": "SELECT lastname FROM teachers WHERE classroom = 109" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Report the first name and last name of all the teachers.", + "SpiderSynQuestion": "Report the forename and surname of all the teachers.", + "query": "SELECT DISTINCT firstname , lastname FROM teachers" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the first name and last name of all the teachers?", + "SpiderSynQuestion": "What are the forename and surname of all the teachers?", + "query": "SELECT DISTINCT firstname , lastname FROM teachers" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Report the first name and last name of all the students.", + "SpiderSynQuestion": "Report the forename and family name of all the students.", + "query": "SELECT DISTINCT firstname , lastname FROM list" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Show each student's first name and last name.", + "SpiderSynQuestion": "Show each student's forename and family name.", + "query": "SELECT DISTINCT firstname , lastname FROM list" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find all students taught by OTHA MOYER. Output the first and last names of the students.", + "SpiderSynQuestion": "Find all students taught by OTHA MOYER. Output the full names of the students.", + "query": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.", + "SpiderSynQuestion": "Which students study under the teacher named OTHA MOYER? Give me the full names of the students.", + "query": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find all students taught by MARROTTE KIRK. Output first and last names of students.", + "SpiderSynQuestion": "Find all students taught by MARROTTE KIRK. Output forename and surname of students.", + "query": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"MARROTTE\" AND T2.lastname = \"KIRK\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which are the first and last names of the students taught by MARROTTE KIRK?", + "SpiderSynQuestion": "Which are the forename and surname of the students taught by MARROTTE KIRK?", + "query": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"MARROTTE\" AND T2.lastname = \"KIRK\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the first and last name of all the teachers that teach EVELINA BROMLEY.", + "SpiderSynQuestion": "Find the forename and surname of all the teachers that teach EVELINA BROMLEY.", + "query": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"EVELINA\" AND T1.lastname = \"BROMLEY\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.", + "SpiderSynQuestion": "Which teachers teach the student named EVELINA BROMLEY? Give me the forename and surname of the teachers.", + "query": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"EVELINA\" AND T1.lastname = \"BROMLEY\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the last names of all the teachers that teach GELL TAMI.", + "SpiderSynQuestion": "Find the surnames of all the teachers that teach GELL TAMI.", + "query": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"GELL\" AND T1.lastname = \"TAMI\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the last names of the teachers who teach the student called GELL TAMI?", + "SpiderSynQuestion": "What are the surnames of the teachers who teach the student called GELL TAMI?", + "query": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"GELL\" AND T1.lastname = \"TAMI\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "How many students does LORIA ONDERSMA teaches?", + "SpiderSynQuestion": "How many students does LORIA ONDERSMA teaches?", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"LORIA\" AND T2.lastname = \"ONDERSMA\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Count the number of students the teacher LORIA ONDERSMA teaches.", + "SpiderSynQuestion": "Count the number of students the teacher LORIA ONDERSMA teaches.", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"LORIA\" AND T2.lastname = \"ONDERSMA\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "How many students does KAWA GORDON teaches?", + "SpiderSynQuestion": "How many students does KAWA GORDON teaches?", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"KAWA\" AND T2.lastname = \"GORDON\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the number of students taught by the teacher KAWA GORDON.", + "SpiderSynQuestion": "Find the number of students taught by the teacher KAWA GORDON.", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"KAWA\" AND T2.lastname = \"GORDON\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the number of students taught by TARRING LEIA.", + "SpiderSynQuestion": "Find the number of students taught by TARRING LEIA.", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"TARRING\" AND T2.lastname = \"LEIA\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "How many students are taught by teacher TARRING LEIA?", + "SpiderSynQuestion": "How many students are taught by teacher TARRING LEIA?", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"TARRING\" AND T2.lastname = \"LEIA\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "How many teachers does the student named CHRISSY NABOZNY have?", + "SpiderSynQuestion": "How many teachers does the student named CHRISSY NABOZNY have?", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"CHRISSY\" AND T1.lastname = \"NABOZNY\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the number of teachers who teach the student called CHRISSY NABOZNY.", + "SpiderSynQuestion": "Find the number of teachers who teach the student called CHRISSY NABOZNY.", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"CHRISSY\" AND T1.lastname = \"NABOZNY\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "How many teachers does the student named MADLOCK RAY have?", + "SpiderSynQuestion": "How many teachers does the student named MADLOCK RAY have?", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"MADLOCK\" AND T1.lastname = \"RAY\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the number of teachers who teach the student called MADLOCK RAY.", + "SpiderSynQuestion": "Find the number of teachers who teach the student called MADLOCK RAY.", + "query": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"MADLOCK\" AND T1.lastname = \"RAY\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.", + "SpiderSynQuestion": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their forename and surname.", + "query": "SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?", + "SpiderSynQuestion": "What are the forename and surname of the first-grade students who are NOT taught by teacher OTHA MOYER?", + "query": "SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the last names of the students in third grade that are not taught by COVIN JEROME.", + "SpiderSynQuestion": "Find the family names of the students in third grade that are not taught by COVIN JEROME.", + "query": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != \"COVIN\" AND T2.lastname != \"JEROME\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.", + "SpiderSynQuestion": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the family names of the students.", + "query": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != \"COVIN\" AND T2.lastname != \"JEROME\"" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.", + "SpiderSynQuestion": "For each grade, report the grade, the number of schoolrooms in which it is taught and the total number of students in the grade.", + "query": "SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade.", + "SpiderSynQuestion": "For each grade, return the grade number, the number of schoolrooms used for the grade, and the total number of students enrolled in the grade.", + "query": "SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each classroom, report the classroom number and the number of grades using it.", + "SpiderSynQuestion": "For each class room, report the class room number and the number of grades using it.", + "query": "SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each classroom, show the classroom number and count the number of distinct grades that use the room.", + "SpiderSynQuestion": "For each class room, show the class room number and count the number of different grades that use the room.", + "query": "SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which classroom has the most students?", + "SpiderSynQuestion": "Which class room has the most students?", + "query": "SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the classroom that the most students use.", + "SpiderSynQuestion": "Find the class room that the most students use.", + "query": "SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Report the number of students in each classroom.", + "SpiderSynQuestion": "Report the number of students in each class room.", + "query": "SELECT classroom , count(*) FROM list GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each classroom, show the classroom number and find how many students are using it.", + "SpiderSynQuestion": "For each class room, show the class room number and find how many students are using it.", + "query": "SELECT classroom , count(*) FROM list GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each grade 0 classroom, report the total number of students.", + "SpiderSynQuestion": "For each grade 0 class room, report the total number of students.", + "query": "SELECT classroom , count(*) FROM list WHERE grade = \"0\" GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each grade 0 classroom, return the classroom number and the count of students.", + "SpiderSynQuestion": "For each grade 0 class room, return the class room number and the count of students.", + "query": "SELECT classroom , count(*) FROM list WHERE grade = \"0\" GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Report the total number of students for each fourth-grade classroom.", + "SpiderSynQuestion": "Report the total number of students for each fourth-grade class room.", + "query": "SELECT classroom , count(*) FROM list WHERE grade = \"4\" GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "For each fourth-grade classroom, show the classroom number and the total number of students using it.", + "SpiderSynQuestion": "For each fourth-grade class room, show the class room number and the total number of students using it.", + "query": "SELECT classroom , count(*) FROM list WHERE grade = \"4\" GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the name of the teacher who teaches the largest number of students.", + "SpiderSynQuestion": "Find the name of the teacher who teaches the largest number of students.", + "query": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Which teacher teaches the most students? Give me the first name and last name of the teacher.", + "SpiderSynQuestion": "Which teacher teaches the most students? Give me the forename and surname of the teacher.", + "query": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "student_1", + "SpiderQuestion": "Find the number of students in one classroom.", + "SpiderSynQuestion": "Find the number of students in one class room.", + "query": "SELECT count(*) , classroom FROM list GROUP BY classroom" + }, + { + "db_id": "student_1", + "SpiderQuestion": "How many students does one classroom have?", + "SpiderSynQuestion": "How many students does one class room have?", + "query": "SELECT count(*) , classroom FROM list GROUP BY classroom" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "How many companies are headquartered in the US?", + "SpiderSynQuestion": "How many enterprise are headquartered in the US?", + "query": "SELECT count(*) FROM company WHERE Headquarters = 'USA'" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "List the names of companies by ascending number of sales.", + "SpiderSynQuestion": "List the names of enterprise by ascending number of sales.", + "query": "SELECT Name FROM company ORDER BY Sales_in_Billion ASC" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "What are the headquarters and industries of all companies?", + "SpiderSynQuestion": "What are the head office and industries of all enterprises?", + "query": "SELECT Headquarters , Industry FROM company" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the names of companies in the banking or retailing industry?", + "SpiderSynQuestion": "Show the names of enterprises in the banking or retailing industry?", + "query": "SELECT Name FROM company WHERE Industry = \"Banking\" OR Industry = \"Retailing\"" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "What is the maximum and minimum market value of companies?", + "SpiderSynQuestion": "What is the maximum and minimum market value of enterprises?", + "query": "SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "What is the headquarter of the company with the largest sales?", + "SpiderSynQuestion": "What is the head office of the enterprise with the largest sales?", + "query": "SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the different headquarters and number of companies at each headquarter.", + "SpiderSynQuestion": "Show the different head office and number of enterprises at each head office.", + "query": "SELECT Headquarters , COUNT(*) FROM company GROUP BY Headquarters" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the most common headquarter for companies.", + "SpiderSynQuestion": "Show the most common head office for enterprises.", + "query": "SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the headquarters that have at least two companies.", + "SpiderSynQuestion": "Show the head office that have at least two enterprises.", + "query": "SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the headquarters that have both companies in banking industry and companies in oil and gas industry.", + "SpiderSynQuestion": "Show the head office that have both companies in banking industry and companies in oil and gas industry.", + "query": "SELECT Headquarters FROM company WHERE Industry = \"Banking\" INTERSECT SELECT Headquarters FROM company WHERE Industry = \"Oil and gas\"" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the names of companies and of employees.", + "SpiderSynQuestion": "Show the names of enterprises and of staffs.", + "query": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show names of companies and that of employees in descending order of number of years working for that employee.", + "SpiderSynQuestion": "Show names of companies and that of staffs in descending order of number of years working for that staff.", + "query": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the names of employees that work for companies with sales bigger than 200.", + "SpiderSynQuestion": "Show the names of staffs that work for companies with sales bigger than 200.", + "query": "SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "Show the names of companies and the number of employees they have", + "SpiderSynQuestion": "Show the names of enterprises and the number of staffs they have", + "query": "SELECT T3.Name , COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "List the names of people that are not employed by any company", + "SpiderSynQuestion": "List the names of people that are not employed by any company", + "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment)" + }, + { + "db_id": "company_employee", + "SpiderQuestion": "list the names of the companies with more than 200 sales in the descending order of sales and profits.", + "SpiderSynQuestion": "list the names of the enterprises with more than 200 sales in the descending order of sales and profits.", + "query": "SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion DESC" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "How many film are there?", + "SpiderSynQuestion": "How many movie are there?", + "query": "SELECT count(*) FROM film" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Count the number of films.", + "SpiderSynQuestion": "Count the number of movies.", + "query": "SELECT count(*) FROM film" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List the distinct director of all films.", + "SpiderSynQuestion": "List the different director of all movies.", + "query": "SELECT DISTINCT Director FROM film" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the different film Directors?", + "SpiderSynQuestion": "What are the different movie Directors?", + "query": "SELECT DISTINCT Director FROM film" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What is the average ticket sales gross in dollars of films?", + "SpiderSynQuestion": "What is the average ticket sales gross in dollars of movies?", + "query": "SELECT avg(Gross_in_dollar) FROM film" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Return the average gross sales in dollars across all films.", + "SpiderSynQuestion": "Return the average gross sales in dollars across all movies.", + "query": "SELECT avg(Gross_in_dollar) FROM film" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the low and high estimates of film markets?", + "SpiderSynQuestion": "What are the low and high estimates of film markets?", + "query": "SELECT Low_Estimate , High_Estimate FROM film_market_estimation" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Return the low and high estimates for all film markets.", + "SpiderSynQuestion": "Return the low and high estimates for all film markets.", + "query": "SELECT Low_Estimate , High_Estimate FROM film_market_estimation" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the types of film market estimations in year 1995?", + "SpiderSynQuestion": "What are the categories of film market estimates in year 1995?", + "query": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Return the types of film market estimations in 1995.", + "SpiderSynQuestion": "Return the categories of film market estimates in 1995.", + "query": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the maximum and minimum number of cities in all markets.", + "SpiderSynQuestion": "What are the maximum and minimum number of towns in all markets.", + "query": "SELECT max(Number_cities) , min(Number_cities) FROM market" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Return the maximum and minimum number of cities across all markets.", + "SpiderSynQuestion": "Return the maximum and minimum number of towns across all markets.", + "query": "SELECT max(Number_cities) , min(Number_cities) FROM market" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "How many markets have number of cities smaller than 300?", + "SpiderSynQuestion": "How many markets have number of towns smaller than 300?", + "query": "SELECT count(*) FROM market WHERE Number_cities < 300" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Count the number of markets that have a number of cities lower than 300.", + "SpiderSynQuestion": "Count the number of markets that have a number of towns lower than 300.", + "query": "SELECT count(*) FROM market WHERE Number_cities < 300" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List all countries of markets in ascending alphabetical order.", + "SpiderSynQuestion": "List all nations of markets in ascending alphabetical order.", + "query": "SELECT Country FROM market ORDER BY Country ASC" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the countries for each market, ordered alphabetically?", + "SpiderSynQuestion": "What are the nations for each market, ordered alphabetically?", + "query": "SELECT Country FROM market ORDER BY Country ASC" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List all countries of markets in descending order of number of cities.", + "SpiderSynQuestion": "List all nations of markets in descending order of number of towns.", + "query": "SELECT Country FROM market ORDER BY Number_cities DESC" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the countries for each market ordered by decreasing number of cities?", + "SpiderSynQuestion": "What are the nations for each market ordered by decreasing number of cities?", + "query": "SELECT Country FROM market ORDER BY Number_cities DESC" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Please show the titles of films and the types of market estimations.", + "SpiderSynQuestion": "Please show the names of movies and the types of market estimations.", + "query": "SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the titles of films and corresponding types of market estimations?", + "SpiderSynQuestion": "What are the names of movies and corresponding types of market estimations?", + "query": "SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Show the distinct director of films with market estimation in the year of 1995.", + "SpiderSynQuestion": "Show the different director of movies with market estimation in the year of 1995.", + "query": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Who are the different directors of films which had market estimation in 1995?", + "SpiderSynQuestion": "Who are the different directors of movies which had market estimation in 1995?", + "query": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What is the average number of cities of markets with low film market estimate bigger than 10000?", + "SpiderSynQuestion": "What is the average number of towns of markets with low film market estimate bigger than 10000?", + "query": "SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Give the average number of cities within markets that had a low market estimation larger than 10000?", + "SpiderSynQuestion": "Give the average number of towns within markets that had a low market estimation larger than 10000?", + "query": "SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Please list the countries and years of film market estimations.", + "SpiderSynQuestion": "Please list the nations and years of movie market estimations.", + "query": "SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the countries of markets and their corresponding years of market estimation?", + "SpiderSynQuestion": "What are the nations of markets and their corresponding years of market estimation?", + "query": "SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Please list the years of film market estimations when the market is in country \"Japan\" in descending order.", + "SpiderSynQuestion": "Please list the years of movie market estimations when the market is in country \"Japan\" in descending order.", + "query": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = \"Japan\" ORDER BY T1.Year DESC" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the years of film market estimation for the market of Japan, ordered by year descending?", + "SpiderSynQuestion": "What are the years of movie market estimation for the market of Japan, ordered by year descending?", + "query": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = \"Japan\" ORDER BY T1.Year DESC" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List the studios of each film and the number of films produced by that studio.", + "SpiderSynQuestion": "List the studios of each movie and the number of movies produced by that studio.", + "query": "SELECT Studio , COUNT(*) FROM film GROUP BY Studio" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "How films are produced by each studio?", + "SpiderSynQuestion": "How movies are produced by each studio?", + "query": "SELECT Studio , COUNT(*) FROM film GROUP BY Studio" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List the name of film studio that have the most number of films.", + "SpiderSynQuestion": "List the name of movie studio that have the most number of movies.", + "query": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What is the name of teh studio that created the most films?", + "SpiderSynQuestion": "What is the name of teh studio that created the most movies?", + "query": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List the names of studios that have at least two films.", + "SpiderSynQuestion": "List the names of studios that have at least two movies.", + "query": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the names of studios that have made two or more films?", + "SpiderSynQuestion": "What are the names of studios that have made two or more movies?", + "query": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List the title of films that do not have any market estimation.", + "SpiderSynQuestion": "List the name of movies that do not have any market estimation.", + "query": "SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the titles of films that do not have a film market estimation?", + "SpiderSynQuestion": "What are the names of movies that do not have a movie market estimation?", + "query": "SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Show the studios that have produced films with director \"Nicholas Meyer\" and \"Walter Hill\".", + "SpiderSynQuestion": "Show the studios that have produced movies with director \"Nicholas Meyer\" and \"Walter Hill\".", + "query": "SELECT Studio FROM film WHERE Director = \"Nicholas Meyer\" INTERSECT SELECT Studio FROM film WHERE Director = \"Walter Hill\"" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?", + "SpiderSynQuestion": "What are the names of studios that have produced movies with both Nicholas Meyer and Walter Hill?", + "query": "SELECT Studio FROM film WHERE Director = \"Nicholas Meyer\" INTERSECT SELECT Studio FROM film WHERE Director = \"Walter Hill\"" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Find the titles and studios of the films that are produced by some film studios that contained the word \"Universal\".", + "SpiderSynQuestion": "Find the names and studios of the films that are produced by some movie studios that contained the word \"Universal\".", + "query": "SELECT title , Studio FROM film WHERE Studio LIKE \"%Universal%\"" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the titles and studios of films that have been produced by a studio whose name contains \"Universal\"?", + "SpiderSynQuestion": "What are the names and studios of movies that have been produced by a studio whose name contains \"Universal\"?", + "query": "SELECT title , Studio FROM film WHERE Studio LIKE \"%Universal%\"" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Show the studios that have not produced films with director \"Walter Hill\".", + "SpiderSynQuestion": "Show the studios that have not produced movies with director \"Walter Hill\".", + "query": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = \"Walter Hill\"" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Which studios have never worked with the director Walter Hill?", + "SpiderSynQuestion": "Which studios have never worked with the director Walter Hill?", + "query": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = \"Walter Hill\"" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "List the studios which average gross is above 4500000.", + "SpiderSynQuestion": "List the studios which average gross is above 4500000.", + "query": "SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Which studios have an average gross of over 4500000?", + "SpiderSynQuestion": "Which studios have an average gross of over 4500000?", + "query": "SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What is the title of the film that has the highest high market estimation.", + "SpiderSynQuestion": "What is the name of the movie that has the highest high market estimation.", + "query": "SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Return the title of the film with the highest high estimate?", + "SpiderSynQuestion": "Return the name of the movie with the highest high estimate?", + "query": "SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "What are the titles and directors of the films were never presented in China?", + "SpiderSynQuestion": "What are the names and directors of the movies were never presented in China?", + "query": "SELECT title , director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')" + }, + { + "db_id": "film_rank", + "SpiderQuestion": "Return the titles and directors of films that were never in the market of China.", + "SpiderSynQuestion": "Return the names and directors of movies that were never in the market of China.", + "query": "SELECT title , director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "How many calendar items do we have?", + "SpiderSynQuestion": "How many calendar items do we have?", + "query": "SELECT count(*) FROM Ref_calendar" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Count the number of all the calendar items.", + "SpiderSynQuestion": "Count the number of all the calendar items.", + "query": "SELECT count(*) FROM Ref_calendar" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show all calendar dates and day Numbers.", + "SpiderSynQuestion": "Show all calendar dates and day Numbers.", + "query": "SELECT calendar_date , day_Number FROM Ref_calendar" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are all the calendar dates and day Numbers?", + "SpiderSynQuestion": "What are all the calendar dates and day Numbers?", + "query": "SELECT calendar_date , day_Number FROM Ref_calendar" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the number of document types.", + "SpiderSynQuestion": "Show the number of file categories.", + "query": "SELECT count(*) FROM Ref_document_types" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "How many document types are there?", + "SpiderSynQuestion": "How many file categories are there?", + "query": "SELECT count(*) FROM Ref_document_types" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "List all document type codes and document type names.", + "SpiderSynQuestion": "List all file category codes and file category names.", + "query": "SELECT document_type_code , document_type_name FROM Ref_document_types" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are all the document type codes and document type names?", + "SpiderSynQuestion": "What are all the file category codes and file category names?", + "query": "SELECT document_type_code , document_type_name FROM Ref_document_types" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the name and description for document type code RV?", + "SpiderSynQuestion": "What is the name and describing content for file category code RV?", + "query": "SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = \"RV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Give me the name and description of the document type code RV.", + "SpiderSynQuestion": "Give me the name and describing content of the file category code RV.", + "query": "SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = \"RV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the document type code for document type \"Paper\"?", + "SpiderSynQuestion": "What is the file category code for file category \"Paper\"?", + "query": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = \"Paper\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the code of the document type \"Paper\".", + "SpiderSynQuestion": "Find the code of the file category \"Paper\".", + "query": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = \"Paper\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the number of documents with document type code CV or BK.", + "SpiderSynQuestion": "Show the number of files with file category code CV or BK.", + "query": "SELECT count(*) FROM All_documents WHERE document_type_code = \"CV\" OR document_type_code = \"BK\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "How many documents have document type code CV or BK?", + "SpiderSynQuestion": "How many files have file category code CV or BK?", + "query": "SELECT count(*) FROM All_documents WHERE document_type_code = \"CV\" OR document_type_code = \"BK\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the date when the document \"Marry CV\" was stored?", + "SpiderSynQuestion": "What is the day when the file \"Marry CV\" was stored?", + "query": "SELECT date_stored FROM All_documents WHERE Document_name = \"Marry CV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "When was the document named \"Marry CV\" stored? Give me the date.", + "SpiderSynQuestion": "When was the file named \"Marry CV\" stored? Give me the day.", + "query": "SELECT date_stored FROM All_documents WHERE Document_name = \"Marry CV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the day Number and date of all the documents?", + "SpiderSynQuestion": "What is the day Number and date of all the files?", + "query": "SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Return the day Number and stored date for all the documents.", + "SpiderSynQuestion": "Return the day Number and stored date for all the files.", + "query": "SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the document type name for the document with name \"How to read a book\"?", + "SpiderSynQuestion": "What is the file category name for the file with name \"How to read a book\"?", + "query": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = \"How to read a book\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the document type name of the document named \"How to read a book\".", + "SpiderSynQuestion": "Find the file category name of the file named \"How to read a book\".", + "query": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = \"How to read a book\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the number of locations.", + "SpiderSynQuestion": "Show the number of cities.", + "query": "SELECT count(*) FROM Ref_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "How many locations are listed in the database?", + "SpiderSynQuestion": "How many cities are listed in the database?", + "query": "SELECT count(*) FROM Ref_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "List all location codes and location names.", + "SpiderSynQuestion": "List all city codes and city names.", + "query": "SELECT location_code , location_name FROM Ref_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are all the location codes and location names?", + "SpiderSynQuestion": "What are all the city codes and city names?", + "query": "SELECT location_code , location_name FROM Ref_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the name and description for location code x?", + "SpiderSynQuestion": "What are the name and describing content for city code x?", + "query": "SELECT location_name , location_description FROM Ref_locations WHERE location_code = \"x\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Give me the name and description of the location with code x.", + "SpiderSynQuestion": "Give me the name and describing content of the city with code x.", + "query": "SELECT location_name , location_description FROM Ref_locations WHERE location_code = \"x\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the location code for the country \"Canada\"?", + "SpiderSynQuestion": "What is the city code for the country \"Canada\"?", + "query": "SELECT location_code FROM Ref_locations WHERE location_name = \"Canada\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the location code of the country \"Canada\".", + "SpiderSynQuestion": "Show the city code of the country \"Canada\".", + "query": "SELECT location_code FROM Ref_locations WHERE location_name = \"Canada\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "How many roles are there?", + "SpiderSynQuestion": "How many roles are there?", + "query": "SELECT count(*) FROM ROLES" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Count the total number of roles listed.", + "SpiderSynQuestion": "Count the total number of roles listed.", + "query": "SELECT count(*) FROM ROLES" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "List all role codes, role names, and role descriptions.", + "SpiderSynQuestion": "List all role codes, role names, and role describing contents.", + "query": "SELECT role_code , role_name , role_description FROM ROLES" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are all the role codes, role names, and role descriptions?", + "SpiderSynQuestion": "What are all the role codes, role names, and role describing contents?", + "query": "SELECT role_code , role_name , role_description FROM ROLES" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the name and description for role code \"MG\"?", + "SpiderSynQuestion": "What are the name and describing content for role code \"MG\"?", + "query": "SELECT role_name , role_description FROM ROLES WHERE role_code = \"MG\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the name and description of the role with code \"MG\".", + "SpiderSynQuestion": "Find the name and describing content of the role with code \"MG\".", + "query": "SELECT role_name , role_description FROM ROLES WHERE role_code = \"MG\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the description for role name \"Proof Reader\".", + "SpiderSynQuestion": "Show the describing content for role name \"Proof Reader\".", + "query": "SELECT role_description FROM ROLES WHERE role_name = \"Proof Reader\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the description of the role named \"Proof Reader\"?", + "SpiderSynQuestion": "What is the describing content of the role named \"Proof Reader\"?", + "query": "SELECT role_description FROM ROLES WHERE role_name = \"Proof Reader\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "How many employees do we have?", + "SpiderSynQuestion": "How many staffs do we have?", + "query": "SELECT count(*) FROM Employees" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the number of employees we have.", + "SpiderSynQuestion": "Find the number of staffs we have.", + "query": "SELECT count(*) FROM Employees" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the name, role code, and date of birth for the employee with name 'Armani'.", + "SpiderSynQuestion": "Show the name, role code, and birthday for the staff with name 'Armani'.", + "query": "SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the name, role code, and date of birth of the employee named 'Armani'?", + "SpiderSynQuestion": "What are the name, role code, and birthday of the staff named 'Armani'?", + "query": "SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the id for the employee called Ebba?", + "SpiderSynQuestion": "What is the id for the staff called Ebba?", + "query": "SELECT employee_ID FROM Employees WHERE employee_name = \"Ebba\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the id of the employee named Ebba.", + "SpiderSynQuestion": "Show the id of the staff named Ebba.", + "query": "SELECT employee_ID FROM Employees WHERE employee_name = \"Ebba\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the names of all the employees with role \"HR\".", + "SpiderSynQuestion": "Show the names of all the staffs with role \"HR\".", + "query": "SELECT employee_name FROM Employees WHERE role_code = \"HR\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Which employees have the role with code \"HR\"? Find their names.", + "SpiderSynQuestion": "Which staffs have the role with code \"HR\"? Find their names.", + "query": "SELECT employee_name FROM Employees WHERE role_code = \"HR\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show all role codes and the number of employees in each role.", + "SpiderSynQuestion": "Show all role codes and the number of staffs in each role.", + "query": "SELECT role_code , count(*) FROM Employees GROUP BY role_code" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the code of each role and the number of employees in each role?", + "SpiderSynQuestion": "What is the code of each role and the number of staffs in each role?", + "query": "SELECT role_code , count(*) FROM Employees GROUP BY role_code" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the role code with the largest number of employees?", + "SpiderSynQuestion": "What is the role code with the largest number of staffs?", + "query": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the code of the role that have the most employees.", + "SpiderSynQuestion": "Find the code of the role that have the most staffs.", + "query": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show all role codes with at least 3 employees.", + "SpiderSynQuestion": "Show all role codes with at least 3 staffs.", + "query": "SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the roles with three or more employees? Give me the role codes.", + "SpiderSynQuestion": "What are the roles with three or more staffs? Give me the role codes.", + "query": "SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the role code with the least employees.", + "SpiderSynQuestion": "Show the role code with the least staffs.", + "query": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the role with the smallest number of employees? Find the role codes.", + "SpiderSynQuestion": "What is the role with the smallest number of staffs? Find the role codes.", + "query": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the role name and role description for employee called Ebba?", + "SpiderSynQuestion": "What is the role name and role describing content for staff called Ebba?", + "query": "SELECT T2.role_name , T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = \"Ebba\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the name and description of the role played by the employee named Ebba.", + "SpiderSynQuestion": "Show the name and describing content of the role played by the staff named Ebba.", + "query": "SELECT T2.role_name , T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = \"Ebba\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the names of employees with role name Editor.", + "SpiderSynQuestion": "Show the names of staffs with role name Editor.", + "query": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Editor\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the names of all the employees whose the role name is \"Editor\".", + "SpiderSynQuestion": "Find the names of all the staffs whose the role name is \"Editor\".", + "query": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Editor\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the employee ids for all employees with role name \"Human Resource\" or \"Manager\".", + "SpiderSynQuestion": "Show the staff ids for all staffs with role name \"Human Resource\" or \"Manager\".", + "query": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Human Resource\" OR T2.role_name = \"Manager\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the employee ids of the employees whose role name is \"Human Resource\" or \"Manager\"?", + "SpiderSynQuestion": "What are the staff ids of the staffs whose role name is \"Human Resource\" or \"Manager\"?", + "query": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Human Resource\" OR T2.role_name = \"Manager\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the different location codes for documents?", + "SpiderSynQuestion": "What are the different city codes for files?", + "query": "SELECT DISTINCT location_code FROM Document_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Give me all the distinct location codes for documents.", + "SpiderSynQuestion": "Give me all the different city codes for files.", + "query": "SELECT DISTINCT location_code FROM Document_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the location name for document \"Robin CV\".", + "SpiderSynQuestion": "Show the city name for file \"Robin CV\".", + "query": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = \"Robin CV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the location name of the document \"Robin CV\"?", + "SpiderSynQuestion": "What is the city name of the file \"Robin CV\"?", + "query": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = \"Robin CV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the location code, the starting date and ending data in that location for all the documents.", + "SpiderSynQuestion": "Show the city code, the starting day and ending data in that city for all the files.", + "query": "SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are each document's location code, and starting date and ending data in that location?", + "SpiderSynQuestion": "What are each document's city code, and starting day and ending data in that city?", + "query": "SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is \"the date in location from\" and \"the date in location to\" for the document with name \"Robin CV\"?", + "SpiderSynQuestion": "What is \"the date in city from\" and \"the date in city to\" for the document with name \"Robin CV\"?", + "query": "SELECT T1.date_in_location_from , T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Robin CV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the starting date and ending data in location for the document named \"Robin CV\".", + "SpiderSynQuestion": "Find the starting day and ending data in city for the document named \"Robin CV\".", + "query": "SELECT T1.date_in_location_from , T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Robin CV\"" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the location codes and the number of documents in each location.", + "SpiderSynQuestion": "Show the city codes and the number of documents in each city.", + "query": "SELECT location_code , count(*) FROM Document_locations GROUP BY location_code" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the code of each location and the number of documents in that location?", + "SpiderSynQuestion": "What is the code of each city and the number of documents in that city?", + "query": "SELECT location_code , count(*) FROM Document_locations GROUP BY location_code" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What is the location code with the most documents?", + "SpiderSynQuestion": "What is the city code with the most files?", + "query": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Find the code of the location with the largest number of documents.", + "SpiderSynQuestion": "Find the code of the city with the largest number of files.", + "query": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the location codes with at least 3 documents.", + "SpiderSynQuestion": "Show the city codes with at least 3 files.", + "query": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the codes of the locations with at least three documents?", + "SpiderSynQuestion": "What are the codes of the cities with at least three files?", + "query": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the location name and code with the least documents.", + "SpiderSynQuestion": "Show the city name and code with the least files.", + "query": "SELECT T2.location_name , T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the name and code of the location with the smallest number of documents?", + "SpiderSynQuestion": "What are the name and code of the city with the smallest number of files?", + "query": "SELECT T2.location_name , T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?", + "SpiderSynQuestion": "What are the names of the staffs who authorised the destruction and the staffs who destroyed the corresponding documents?", + "query": "SELECT T2.employee_name , T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.", + "SpiderSynQuestion": "List the names of the staffs who authorized the destruction of documents and the staffs who destroyed the corresponding documents.", + "query": "SELECT T2.employee_name , T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the id of each employee and the number of document destruction authorised by that employee.", + "SpiderSynQuestion": "Show the id of each staff and the number of document destruction authorised by that staff.", + "query": "SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the id of each employee and the number of document destruction authorised by that employee?", + "SpiderSynQuestion": "What are the id of each staff and the number of document destruction authorised by that staff?", + "query": "SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the employee ids and the number of documents destroyed by each employee.", + "SpiderSynQuestion": "Show the staff ids and the number of documents destroyed by each staff.", + "query": "SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the id of each employee and the number of document destroyed by that employee?", + "SpiderSynQuestion": "What are the id of each staff and the number of document destroyed by that staff?", + "query": "SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the ids of the employees who don't authorize destruction for any document.", + "SpiderSynQuestion": "Show the ids of the staffs who don't authorize destruction for any document.", + "query": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Which employees do not authorize destruction for any document? Give me their employee ids.", + "SpiderSynQuestion": "Which staffs do not authorize destruction for any document? Give me their staff ids.", + "query": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the ids of all employees who have authorized destruction.", + "SpiderSynQuestion": "Show the ids of all staffs who have authorized destruction.", + "query": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the ids of all the employees who authorize document destruction?", + "SpiderSynQuestion": "What are the ids of all the staffs who authorize document destruction?", + "query": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the ids of all employees who have destroyed a document.", + "SpiderSynQuestion": "Show the ids of all staffs who have destroyed a document.", + "query": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "What are the ids of all the employees who have destroyed documents?", + "SpiderSynQuestion": "What are the ids of all the staffs who have destroyed documents?", + "query": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the ids of all employees who don't destroy any document.", + "SpiderSynQuestion": "Show the ids of all staffs who don't destroy any document.", + "query": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Which employees do not destroy any document? Find their employee ids.", + "SpiderSynQuestion": "Which staff do not destroy any document? Find their staff ids.", + "query": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Show the ids of all employees who have either destroyed a document or made an authorization to do this.", + "SpiderSynQuestion": "Show the ids of all staffs who have either destroyed a document or made an authorization to do this.", + "query": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "cre_Doc_Tracking_DB", + "SpiderQuestion": "Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.", + "SpiderSynQuestion": "Which staffs have either destroyed a document or made an authorization to do so? Return their staff ids.", + "query": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many clubs are there?", + "SpiderSynQuestion": "How many clubs are there?", + "query": "SELECT count(*) FROM club" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the total number of clubs.", + "SpiderSynQuestion": "Count the total number of clubs.", + "query": "SELECT count(*) FROM club" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What are the names of all clubs?", + "SpiderSynQuestion": "What are the names of all clubs?", + "query": "SELECT clubname FROM club" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Give me the name of each club.", + "SpiderSynQuestion": "Give me the name of each club.", + "query": "SELECT clubname FROM club" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many students are there?", + "SpiderSynQuestion": "How many students are there?", + "query": "SELECT count(*) FROM student" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the total number of students.", + "SpiderSynQuestion": "Count the total number of students.", + "query": "SELECT count(*) FROM student" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What are the first names of all the students?", + "SpiderSynQuestion": "What are the forenames of all the students?", + "query": "SELECT DISTINCT fname FROM student" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find each student's first name.", + "SpiderSynQuestion": "Find each student's forename.", + "query": "SELECT DISTINCT fname FROM student" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the last names of the members of the club \"Bootup Baltimore\".", + "SpiderSynQuestion": "Find the family names of the members of the club \"Bootup Baltimore\".", + "query": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Who are the members of the club named \"Bootup Baltimore\"? Give me their last names.", + "SpiderSynQuestion": "Who are the members of the club named \"Bootup Baltimore\"? Give me their family names.", + "query": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Who are the members of the club named \"Hopkins Student Enterprises\"? Show the last name.", + "SpiderSynQuestion": "Who are the members of the club named \"Hopkins Student Enterprises\"? Show the family name.", + "query": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Return the last name for the members of the club named \"Hopkins Student Enterprises\".", + "SpiderSynQuestion": "Return the family name for the members of the club named \"Hopkins Student Enterprises\".", + "query": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many members does the club \"Tennis Club\" has?", + "SpiderSynQuestion": "How many members does the club \"Tennis Club\" has?", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the members of the club \"Tennis Club\".", + "SpiderSynQuestion": "Count the members of the club \"Tennis Club\".", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the number of members of club \"Pen and Paper Gaming\".", + "SpiderSynQuestion": "Find the number of members of club \"Pen and Paper Gaming\".", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Pen and Paper Gaming\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many people have membership in the club \"Pen and Paper Gaming\"?", + "SpiderSynQuestion": "How many people have membership in the club \"Pen and Paper Gaming\"?", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Pen and Paper Gaming\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many clubs does \"Linda Smith\" belong to?", + "SpiderSynQuestion": "How many clubs does \"Linda Smith\" belong to?", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Linda\" AND t3.lname = \"Smith\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many clubs does \"Linda Smith\" have membership for?", + "SpiderSynQuestion": "How many clubs does \"Linda Smith\" have membership for?", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Linda\" AND t3.lname = \"Smith\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the number of clubs where \"Tracy Kim\" is a member.", + "SpiderSynQuestion": "Find the number of clubs where \"Tracy Kim\" is a member.", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Tracy\" AND t3.lname = \"Kim\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "For how many clubs is \"Tracy Kim\" a member?", + "SpiderSynQuestion": "For how many clubs is \"Tracy Kim\" a member?", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Tracy\" AND t3.lname = \"Kim\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find all the female members of club \"Bootup Baltimore\". Show the first name and last name.", + "SpiderSynQuestion": "Find all the female members of club \"Bootup Baltimore\". Show the full name.", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.sex = \"F\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Give me the first name and last name for all the female members of the club \"Bootup Baltimore\".", + "SpiderSynQuestion": "Give me the forename and family name for all the female members of the club \"Bootup Baltimore\".", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.sex = \"F\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find all the male members of club \"Hopkins Student Enterprises\". Show the first name and last name.", + "SpiderSynQuestion": "Find all the male members of club \"Hopkins Student Enterprises\". Show the forename and family name.", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t3.sex = \"M\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What are the first name and last name of each male member in club \"Hopkins Student Enterprises\"?", + "SpiderSynQuestion": "What are the forename and family name of each male member in club \"Hopkins Student Enterprises\"?", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t3.sex = \"M\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find all members of \"Bootup Baltimore\" whose major is \"600\". Show the first name and last name.", + "SpiderSynQuestion": "Find all members of \"Bootup Baltimore\" whose major is \"600\". Show the forename and family name.", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.major = \"600\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Which members of \"Bootup Baltimore\" major in \"600\"? Give me their first names and last names.", + "SpiderSynQuestion": "Which members of \"Bootup Baltimore\" major in \"600\"? Give me their forename and family name.", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.major = \"600\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Which club has the most members majoring in \"600\"?", + "SpiderSynQuestion": "Which club has the most members majoring in \"600\"?", + "query": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = \"600\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the club which has the largest number of members majoring in \"600\".", + "SpiderSynQuestion": "Find the club which has the largest number of members majoring in \"600\".", + "query": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = \"600\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the name of the club that has the most female students.", + "SpiderSynQuestion": "Find the name of the club that has the most female students.", + "query": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = \"F\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Which club has the most female students as their members? Give me the name of the club.", + "SpiderSynQuestion": "Which club has the most female students as their members? Give me the name of the club.", + "query": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = \"F\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What is the description of the club named \"Tennis Club\"?", + "SpiderSynQuestion": "What is the describing content of the club named \"Tennis Club\"?", + "query": "SELECT clubdesc FROM club WHERE clubname = \"Tennis Club\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the description of the club called \"Tennis Club\".", + "SpiderSynQuestion": "Find the describing content of the club called \"Tennis Club\".", + "query": "SELECT clubdesc FROM club WHERE clubname = \"Tennis Club\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the description of the club \"Pen and Paper Gaming\".", + "SpiderSynQuestion": "Find the describing content of the club \"Pen and Paper Gaming\".", + "query": "SELECT clubdesc FROM club WHERE clubname = \"Pen and Paper Gaming\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What is the description of the club \"Pen and Paper Gaming\"?", + "SpiderSynQuestion": "What is the describing content of the club \"Pen and Paper Gaming\"?", + "query": "SELECT clubdesc FROM club WHERE clubname = \"Pen and Paper Gaming\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What is the location of the club named \"Tennis Club\"?", + "SpiderSynQuestion": "What is the location of the club named \"Tennis Club\"?", + "query": "SELECT clublocation FROM club WHERE clubname = \"Tennis Club\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Where us the club named \"Tennis Club\" located?", + "SpiderSynQuestion": "Where us the club named \"Tennis Club\" located?", + "query": "SELECT clublocation FROM club WHERE clubname = \"Tennis Club\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the location of the club \"Pen and Paper Gaming\".", + "SpiderSynQuestion": "Find the location of the club \"Pen and Paper Gaming\".", + "query": "SELECT clublocation FROM club WHERE clubname = \"Pen and Paper Gaming\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Where is the club \"Pen and Paper Gaming\" located?", + "SpiderSynQuestion": "Where is the club \"Pen and Paper Gaming\" located?", + "query": "SELECT clublocation FROM club WHERE clubname = \"Pen and Paper Gaming\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Where is the club \"Hopkins Student Enterprises\" located?", + "SpiderSynQuestion": "Where is the club \"Hopkins Student Enterprises\" located?", + "query": "SELECT clublocation FROM club WHERE clubname = \"Hopkins Student Enterprises\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Tell me the location of the club \"Hopkins Student Enterprises\".", + "SpiderSynQuestion": "Tell me the location of the club \"Hopkins Student Enterprises\".", + "query": "SELECT clublocation FROM club WHERE clubname = \"Hopkins Student Enterprises\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the name of all the clubs at \"AKW\".", + "SpiderSynQuestion": "Find the name of all the clubs at \"AKW\".", + "query": "SELECT clubname FROM club WHERE clublocation = \"AKW\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Which clubs are located at \"AKW\"? Return the club names.", + "SpiderSynQuestion": "Which clubs are located at \"AKW\"? Return the club names.", + "query": "SELECT clubname FROM club WHERE clublocation = \"AKW\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many clubs are located at \"HHH\"?", + "SpiderSynQuestion": "How many clubs are located at \"HHH\"?", + "query": "SELECT count(*) FROM club WHERE clublocation = \"HHH\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the number of clubs located at \"HHH\".", + "SpiderSynQuestion": "Count the number of clubs located at \"HHH\".", + "query": "SELECT count(*) FROM club WHERE clublocation = \"HHH\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What are the first and last name of the president of the club \"Bootup Baltimore\"?", + "SpiderSynQuestion": "What are the forename and family name of the president of the club \"Bootup Baltimore\"?", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t2.position = \"President\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Who is the president of the club \"Bootup Baltimore\"? Give me the first and last name.", + "SpiderSynQuestion": "Who is the president of the club \"Bootup Baltimore\"? Give me the forename and family name.", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t2.position = \"President\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the first name and last name.", + "SpiderSynQuestion": "Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the forename and family name.", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t2.position = \"CTO\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the first name and last name for the \"CTO\" of the club \"Hopkins Student Enterprises\"?", + "SpiderSynQuestion": "Find the forename and family name for the \"CTO\" of the club \"Hopkins Student Enterprises\"?", + "query": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t2.position = \"CTO\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many different roles are there in the club \"Bootup Baltimore\"?", + "SpiderSynQuestion": "How many different roles are there in the club \"Bootup Baltimore\"?", + "query": "SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = \"Bootup Baltimore\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the number of different positions in the club \"Bootup Baltimore\".", + "SpiderSynQuestion": "Count the number of different positions in the club \"Bootup Baltimore\".", + "query": "SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = \"Bootup Baltimore\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many members of \"Bootup Baltimore\" are older than 18?", + "SpiderSynQuestion": "How many members of \"Bootup Baltimore\" are older than 18?", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age > 18" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the number of members in club \"Bootup Baltimore\" whose age is above 18.", + "SpiderSynQuestion": "Count the number of members in club \"Bootup Baltimore\" whose age is above 18.", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age > 18" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many members of club \"Bootup Baltimore\" are younger than 18?", + "SpiderSynQuestion": "How many members of club \"Bootup Baltimore\" are younger than 18?", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age < 18" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the number of members in club \"Bootup Baltimore\" whose age is below 18.", + "SpiderSynQuestion": "Count the number of members in club \"Bootup Baltimore\" whose age is below 18.", + "query": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age < 18" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the names of all the clubs that have at least a member from the city with city code \"BAL\".", + "SpiderSynQuestion": "Find the names of all the clubs that have at least a member from the city with city code \"BAL\".", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"BAL\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Which clubs have one or more members from the city with code \"BAL\"? Give me the names of the clubs.", + "SpiderSynQuestion": "Which clubs have one or more members from the city with code \"BAL\"? Give me the names of the clubs.", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"BAL\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the names of the clubs that have at least a member from the city with city code \"HOU\".", + "SpiderSynQuestion": "Find the names of the clubs that have at least a member from the city with city code \"HOU\".", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"HOU\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Which clubs have one or more members from the city with code \"HOU\"? Give me the names of the clubs.", + "SpiderSynQuestion": "Which clubs have one or more members from the city with code \"HOU\"? Give me the names of the clubs.", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"HOU\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "How many clubs does the student named \"Eric Tai\" belong to?", + "SpiderSynQuestion": "How many clubs does the student named \"Eric Tai\" belong to?", + "query": "SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Eric\" AND t3.lname = \"Tai\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Count the number of clubs for which the student named \"Eric Tai\" is a member.", + "SpiderSynQuestion": "Count the number of clubs for which the student named \"Eric Tai\" is a member.", + "query": "SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Eric\" AND t3.lname = \"Tai\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "List the clubs having \"Davis Steven\" as a member.", + "SpiderSynQuestion": "List the clubs having \"Davis Steven\" as a member.", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Davis\" AND t3.lname = \"Steven\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What are the names of the clubs that have \"Davis Steven\" as a member?", + "SpiderSynQuestion": "What are the names of the clubs that have \"Davis Steven\" as a member?", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Davis\" AND t3.lname = \"Steven\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "List the clubs that have at least a member with advisor \"1121\".", + "SpiderSynQuestion": "List the clubs that have at least a member with advisor \"1121\".", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Which clubs have one or more members whose advisor is \"1121\"?", + "SpiderSynQuestion": "Which clubs have one or more members whose advisor is \"1121\"?", + "query": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121" + }, + { + "db_id": "club_1", + "SpiderQuestion": "What is the average age of the members of the club \"Bootup Baltimore\"?", + "SpiderSynQuestion": "What is the average age of the members of the club \"Bootup Baltimore\"?", + "query": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the average age of the members in the club \"Bootup Baltimore\".", + "SpiderSynQuestion": "Find the average age of the members in the club \"Bootup Baltimore\".", + "query": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Find the average age of members of the club \"Hopkins Student Enterprises\".", + "SpiderSynQuestion": "Find the average age of members of the club \"Hopkins Student Enterprises\".", + "query": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "On average, how old are the members in the club \"Hopkins Student Enterprises\"?", + "SpiderSynQuestion": "On average, how old are the members in the club \"Hopkins Student Enterprises\"?", + "query": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Retrieve the average age of members of the club \"Tennis Club\".", + "SpiderSynQuestion": "Retrieve the average age of members of the club \"Tennis Club\".", + "query": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"" + }, + { + "db_id": "club_1", + "SpiderQuestion": "Compute the average age of the members in the club \"Tennis Club\".", + "SpiderSynQuestion": "Compute the average age of the members in the club \"Tennis Club\".", + "query": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?", + "SpiderSynQuestion": "What are the distinct grant amount for the grants where the files were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?", + "query": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'?", + "SpiderSynQuestion": "What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'?", + "query": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List the project details of the project both producing patent and paper as outcomes.", + "SpiderSynQuestion": "List the project information of the project both producing patent and paper as outcomes.", + "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the details of the project that is producing both patents and papers as outcomes?", + "SpiderSynQuestion": "What are the information of the project that is producing both patents and papers as outcomes?", + "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the total grant amount of the organisations described as research?", + "SpiderSynQuestion": "What is the total grant amount of the organisations described as research?", + "query": "SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the total amount of grant money for research?", + "SpiderSynQuestion": "What is the total amount of grant money for research?", + "query": "SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List from which date and to which date these staff work: project staff of the project which hires the most staffs", + "SpiderSynQuestion": "List from which day and to which date these member work: project member of the project which hires the most employee", + "query": "SELECT date_from , date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?", + "SpiderSynQuestion": "From what day and to what day do the member work on a project that has the most employee and has member in a leader role?", + "query": "SELECT date_from , date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Find the organisation ids and details of the organisations which are involved in", + "SpiderSynQuestion": "Find the organisation ids and information of the organisations which are involved in", + "query": "SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the ids and details for all organizations that have grants of more than 6000 dollars?", + "SpiderSynQuestion": "What are the ids and information for all organizations that have grants of more than 6000 dollars?", + "query": "SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the organisation type and id of the organisation which has the most number of research staff?", + "SpiderSynQuestion": "What is the organisation type and id of the organisation which has the most number of research member?", + "query": "SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the type and id of the organization that has the most research staff?", + "SpiderSynQuestion": "What is the type and id of the organization that has the most research member?", + "query": "SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Which organisation type hires most research staff?", + "SpiderSynQuestion": "Which organisation type hires most research member?", + "query": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the type of the organization with the most research staff?", + "SpiderSynQuestion": "What is the type of the organization with the most research member?", + "query": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described", + "SpiderSynQuestion": "Find out the send day of the files with the grant amount of more than 5000 were granted by organisation type described", + "query": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?", + "SpiderSynQuestion": "What are the send day for all documents that have a grant amount of more than 5000 and are involved in research?", + "query": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the response received dates for the documents described as 'Regular' or granted with more than 100?", + "SpiderSynQuestion": "What are the response receipt day for the documents described as 'Regular' or granted with more than 100?", + "query": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the response received date for the document described as Regular that was granted more than 100 dollars?", + "SpiderSynQuestion": "What is the response receipt day for the document described as Regular that was granted more than 100 dollars?", + "query": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List the project details of the projects which did not hire any staff for a researcher role.", + "SpiderSynQuestion": "List the project information of the projects which did not hire any staff for a researcher role.", + "query": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' )" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the details for all projects that did not hire any staff in a research role?", + "SpiderSynQuestion": "What are the information for all projects that did not hire any staff in a research role?", + "query": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' )" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?", + "SpiderSynQuestion": "What are the task information, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?", + "query": "SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING count(*) > 2" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?", + "SpiderSynQuestion": "What are the task information, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?", + "query": "SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING count(*) > 2" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "When do all the researcher role staff start to work, and when do they stop working?", + "SpiderSynQuestion": "When do all the researcher role member start to work, and when do they stop working?", + "query": "SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'researcher'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "When did researchers start and stop working?", + "SpiderSynQuestion": "When did researchers start and stop working?", + "query": "SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'researcher'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many kinds of roles are there for the staff?", + "SpiderSynQuestion": "How many kinds of roles are there for the member?", + "query": "SELECT count(DISTINCT role_code) FROM Project_Staff" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many different roles are there on the project staff?", + "SpiderSynQuestion": "How many different roles are there on the project member?", + "query": "SELECT count(DISTINCT role_code) FROM Project_Staff" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the total amount of grants given by each organisations? Also list the organisation id.", + "SpiderSynQuestion": "What is the total amount of grants given by each organisations? Also list the organisation id.", + "query": "SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the total amount of grant money given to each organization and what is its id?", + "SpiderSynQuestion": "What is the total amount of grant money given to each organization and what is its id?", + "query": "SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List the project details of the projects with the research outcome described with the substring 'Published'.", + "SpiderSynQuestion": "List the project information of the projects with the research outcome described with the substring 'Published'.", + "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the details for the project whose research has been published?", + "SpiderSynQuestion": "What are the information for the project whose research has been published?", + "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many staff does each project has? List the project id and the number in an ascending order.", + "SpiderSynQuestion": "How many member does each project has? List the project id and the number in an ascending order.", + "query": "SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "For each project id, how many staff does it have? List them in increasing order.", + "SpiderSynQuestion": "For each project id, how many member does it have? List them in increasing order.", + "query": "SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the complete description of the researcher role.", + "SpiderSynQuestion": "What is the complete describing content of the researcher role.", + "query": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the complete description of the job of a researcher?", + "SpiderSynQuestion": "What is the complete describing content of the job of a researcher?", + "query": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "When did the first staff for the projects started working?", + "SpiderSynQuestion": "When did the first member for the projects started working?", + "query": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "When did the first staff member start working?", + "SpiderSynQuestion": "When did the first staff member start working?", + "query": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Which project made the most number of outcomes? List the project details and the project id.", + "SpiderSynQuestion": "Which project made the most number of outcomes? List the project information and the project id.", + "query": "SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the details and id of the project with the most outcomes?", + "SpiderSynQuestion": "What are the information and id of the project with the most outcomes?", + "query": "SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Which projects have no outcome? List the project details.", + "SpiderSynQuestion": "Which projects have no outcome? List the project information.", + "query": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the details of the project with no outcomes?", + "SpiderSynQuestion": "What are the information of the project with no outcomes?", + "query": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Which organisation hired the most number of research staff? List the organisation id, type and detail.", + "SpiderSynQuestion": "Which organisation hired the most number of research member? List the organisation id, type and information.", + "query": "SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the ids, types, and details of the organization with the most research staff?", + "SpiderSynQuestion": "What are the ids, types, and information of the organization with the most research staff?", + "query": "SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Show the role description and the id of the project staff involved in most number of project outcomes?", + "SpiderSynQuestion": "Show the role describing content and the id of the project employee involved in most number of project outcomes?", + "query": "SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "For each staff id, what is the description of the role that is involved with the most number of projects?", + "SpiderSynQuestion": "For each member id, what is the describing content of the role that is involved with the most number of projects?", + "query": "SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Which document type is described with the prefix 'Initial'?", + "SpiderSynQuestion": "Which file category is described with the prefix 'Initial'?", + "query": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the type of the document whose description starts with the word 'Initial'?", + "SpiderSynQuestion": "What is the category of the file whose describing content starts with the word 'Initial'?", + "query": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.", + "SpiderSynQuestion": "For grants with both files described as 'Regular' and files described as 'Initial Application', list its start day.", + "query": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "For grants that have descriptions of Regular and Initial Applications, what are their start dates?", + "SpiderSynQuestion": "For grants that have descriptions of Regular and Initial Applications, what are their start day?", + "query": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many documents can one grant have at most? List the grant id and number.", + "SpiderSynQuestion": "How many files can one grant have at most? List the grant id and number.", + "query": "SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "For each grant id, how many documents does it have, and which one has the most?", + "SpiderSynQuestion": "For each grant id, how many files does it have, and which one has the most?", + "query": "SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Find the organisation type description of the organisation detailed as 'quo'.", + "SpiderSynQuestion": "Find the organisation type description of the organisation detailed as 'quo'.", + "query": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the type description of the organization whose detail is listed as 'quo'?", + "SpiderSynQuestion": "What is the type description of the organization whose information is listed as 'quo'?", + "query": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.", + "SpiderSynQuestion": "What are all the information of the organisations described as 'Sponsor'? Sort the result in an ascending order.", + "query": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?", + "SpiderSynQuestion": "What are the information of all organizations that are described as Sponsors and sort the results in ascending order?", + "query": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many Patent outcomes are generated from all the projects?", + "SpiderSynQuestion": "How many Patent outcomes are generated from all the projects?", + "query": "SELECT count(*) FROM Project_outcomes WHERE outcome_code = 'Patent'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many patents outcomes were listed for all the projects?", + "SpiderSynQuestion": "How many patents outcomes were listed for all the projects?", + "query": "SELECT count(*) FROM Project_outcomes WHERE outcome_code = 'Patent'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?", + "SpiderSynQuestion": "How many project member worked as leaders or started working before '1989-04-24 23:51:54'?", + "query": "SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many project members were leaders or started working before '1989-04-24 23:51:54'?", + "SpiderSynQuestion": "How many project members were leaders or started working before '1989-04-24 23:51:54'?", + "query": "SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the last date of the staff leaving the projects?", + "SpiderSynQuestion": "What is the last date of the member leaving the projects?", + "query": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the last date that a staff member left a project?", + "SpiderSynQuestion": "What is the last date that a staff member left a project?", + "query": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the result description of the project whose detail is 'sint'?", + "SpiderSynQuestion": "What are the result describing content of the project whose detail is 'sint'?", + "query": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the description for the results whose project detail is 'sint'?", + "SpiderSynQuestion": "What is the describing content for the results whose project detail is 'sint'?", + "query": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List the organisation id with the maximum outcome count, and the count.", + "SpiderSynQuestion": "List the organisation id with the maximum result count, and the count.", + "query": "SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the id of the organization with the maximum number of outcomes and how many outcomes are there?", + "SpiderSynQuestion": "What is the id of the organization with the maximum number of result and how many result are there?", + "query": "SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List the project details of the projects launched by the organisation", + "SpiderSynQuestion": "List the project information of the projects launched by the organisation", + "query": "SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the details for the projects which were launched by the organization with the most projects?", + "SpiderSynQuestion": "What are the information for the projects which were launched by the organization with the most projects?", + "query": "SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List the research staff details, and order in ascending order.", + "SpiderSynQuestion": "List the research employee information, and order in ascending order.", + "query": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What details are there on the research staff? List the result in ascending alphabetical order.", + "SpiderSynQuestion": "What information are there on the research member? List the result in ascending alphabetical order.", + "query": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many tasks are there in total?", + "SpiderSynQuestion": "How many tasks are there in total?", + "query": "SELECT count(*) FROM Tasks" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many tasks are there?", + "SpiderSynQuestion": "How many mission are there?", + "query": "SELECT count(*) FROM Tasks" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "How many tasks does each project have? List the task count and the project detail.", + "SpiderSynQuestion": "How many mission does each project have? List the mission count and the project information.", + "query": "SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "For each project id, how many tasks are there?", + "SpiderSynQuestion": "For each project id, how many mission are there?", + "query": "SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the staff roles of the staff who", + "SpiderSynQuestion": "What are the member roles of the member who", + "query": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?", + "SpiderSynQuestion": "What roles did members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?", + "query": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What are the descriptions of all the project outcomes?", + "SpiderSynQuestion": "What are the describing contents of all the project results?", + "query": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "List the description of the outcomes for all projects.", + "SpiderSynQuestion": "List the describing content of the results for all projects.", + "query": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "Which role is most common for the staff?", + "SpiderSynQuestion": "Which role is most common for the member?", + "query": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_grants_for_research", + "SpiderQuestion": "What is the most common role for the staff?", + "SpiderSynQuestion": "What is the most common role for the member?", + "query": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many friends does Dan have?", + "SpiderSynQuestion": "How many friends does Dan have?", + "query": "SELECT count(distinct T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many friends does Dan have?", + "SpiderSynQuestion": "How many friends does Dan have?", + "query": "SELECT count(distinct T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many females does this network has?", + "SpiderSynQuestion": "How many women does this network has?", + "query": "SELECT count(*) FROM Person WHERE gender = 'female'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many females are in the network?", + "SpiderSynQuestion": "How many women are in the network?", + "query": "SELECT count(*) FROM Person WHERE gender = 'female'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the average age for all person?", + "SpiderSynQuestion": "What is the average age for all person?", + "query": "SELECT avg(age) FROM Person" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the average age for all people in the table?", + "SpiderSynQuestion": "What is the average age for all people in the table?", + "query": "SELECT avg(age) FROM Person" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many different cities are they from?", + "SpiderSynQuestion": "How many different towns are they from?", + "query": "SELECT count(DISTINCT city) FROM Person" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many different cities do people originate from?", + "SpiderSynQuestion": "How many different towns do people originate from?", + "query": "SELECT count(DISTINCT city) FROM Person" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many type of jobs do they have?", + "SpiderSynQuestion": "How many type of occupation do they have?", + "query": "SELECT count(DISTINCT job) FROM Person" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many different jobs are listed?", + "SpiderSynQuestion": "How many different occupation are listed?", + "query": "SELECT count(DISTINCT job) FROM Person" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who is the oldest person?", + "SpiderSynQuestion": "Who is the oldest person?", + "query": "SELECT name FROM Person WHERE age = (SELECT max(age) FROM person)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the name of the person who is the oldest?", + "SpiderSynQuestion": "What is the name of the person who is the oldest?", + "query": "SELECT name FROM Person WHERE age = (SELECT max(age) FROM person)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who is the oldest person whose job is student?", + "SpiderSynQuestion": "Who is the oldest person whose occupation is student?", + "query": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT max(age) FROM person WHERE job = 'student' )" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the name of the oldest student?", + "SpiderSynQuestion": "What is the name of the oldest student?", + "query": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT max(age) FROM person WHERE job = 'student' )" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who is the youngest male?", + "SpiderSynQuestion": "Who is the youngest male?", + "query": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the name of the youngest male?", + "SpiderSynQuestion": "What is the name of the youngest male?", + "query": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How old is the doctor named Zach?", + "SpiderSynQuestion": "How old is the physician named Zach?", + "query": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the age of the doctor named Zach?", + "SpiderSynQuestion": "What is the age of the physician named Zach?", + "query": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who is the person whose age is below 30?", + "SpiderSynQuestion": "Who is the person whose age is below 30?", + "query": "SELECT name FROM Person WHERE age < 30" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the name of the person whose age is below 30?", + "SpiderSynQuestion": "What is the name of the person whose age is below 30?", + "query": "SELECT name FROM Person WHERE age < 30" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many people whose age is greater 30 and job is engineer?", + "SpiderSynQuestion": "How many people whose age is greater 30 and job is engineer?", + "query": "SELECT count(*) FROM Person WHERE age > 30 AND job = 'engineer'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "HOw many engineers are older than 30?", + "SpiderSynQuestion": "HOw many engineers are older than 30?", + "query": "SELECT count(*) FROM Person WHERE age > 30 AND job = 'engineer'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the average age for each gender?", + "SpiderSynQuestion": "What is the average age for each sex?", + "query": "SELECT avg(age) , gender FROM Person GROUP BY gender" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How old is each gender, on average?", + "SpiderSynQuestion": "How old is each sex, on average?", + "query": "SELECT avg(age) , gender FROM Person GROUP BY gender" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is average age for different job title?", + "SpiderSynQuestion": "What is average age for different occupation name?", + "query": "SELECT avg(age) , job FROM Person GROUP BY job" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How old is the average person for each job?", + "SpiderSynQuestion": "How old is the average person for each occupation?", + "query": "SELECT avg(age) , job FROM Person GROUP BY job" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is average age of male for different job title?", + "SpiderSynQuestion": "What is average age of male for different occupation title?", + "query": "SELECT avg(age) , job FROM Person WHERE gender = 'male' GROUP BY job" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the average age for a male in each job?", + "SpiderSynQuestion": "What is the average age for a male in each occupation?", + "query": "SELECT avg(age) , job FROM Person WHERE gender = 'male' GROUP BY job" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is minimum age for different job title?", + "SpiderSynQuestion": "What is minimum age for different occupation title?", + "query": "SELECT min(age) , job FROM Person GROUP BY job" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How old is the youngest person for each job?", + "SpiderSynQuestion": "How old is the youngest person for each occupation?", + "query": "SELECT min(age) , job FROM Person GROUP BY job" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the number of people who is under 40 for each gender.", + "SpiderSynQuestion": "Find the number of people who is under 40 for each sex.", + "query": "SELECT count(*) , gender FROM Person WHERE age < 40 GROUP BY gender" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many people are under 40 for each gender?", + "SpiderSynQuestion": "How many people are under 40 for each sex?", + "query": "SELECT count(*) , gender FROM Person WHERE age < 40 GROUP BY gender" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name of people whose age is greater than any engineer sorted by their age.", + "SpiderSynQuestion": "Find the name of people whose age is greater than any engineer sorted by their age.", + "query": "SELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the name of all the people who are older than at least one engineer? Order them by age.", + "SpiderSynQuestion": "What is the name of all the people who are older than at least one engineer? Order them by age.", + "query": "SELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the number of people whose age is greater than all engineers.", + "SpiderSynQuestion": "Find the number of people whose age is greater than all engineers.", + "query": "SELECT count(*) FROM Person WHERE age > (SELECT max(age) FROM person WHERE job = 'engineer')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "How many people are older than every engineer?", + "SpiderSynQuestion": "How many people are older than every engineer?", + "query": "SELECT count(*) FROM Person WHERE age > (SELECT max(age) FROM person WHERE job = 'engineer')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "list the name, job title of all people ordered by their names.", + "SpiderSynQuestion": "list the name, occupation title of all people ordered by their names.", + "query": "SELECT name , job FROM Person ORDER BY name" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names and job titles of every person ordered alphabetically by name?", + "SpiderSynQuestion": "What are the names and occupation titles of every person ordered alphabetically by name?", + "query": "SELECT name , job FROM Person ORDER BY name" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the names of all person sorted in the descending order using age.", + "SpiderSynQuestion": "Find the names of all person sorted in the descending order using age.", + "query": "SELECT name FROM Person ORDER BY age DESC" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of everybody sorted by age in descending order?", + "SpiderSynQuestion": "What are the names of everybody sorted by age in descending order?", + "query": "SELECT name FROM Person ORDER BY age DESC" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name and age of all males in order of their age.", + "SpiderSynQuestion": "Find the name and age of all males in order of their age.", + "query": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the name and age of every male? Order the results by age.", + "SpiderSynQuestion": "What is the name and age of every male? Order the results by age.", + "query": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name and age of the person who is a friend of both Dan and Alice.", + "SpiderSynQuestion": "Find the name and age of the people who is a friend of both Dan and Alice.", + "query": "SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names and ages of every person who is a friend of both Dan and Alice?", + "SpiderSynQuestion": "What are the names and ages of every people who is a friend of both Dan and Alice?", + "query": "SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name and age of the person who is a friend of Dan or Alice.", + "SpiderSynQuestion": "Find the name and age of the people who is a friend of Dan or Alice.", + "query": "SELECT DISTINCT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the different names and ages of every friend of either Dan or alice?", + "SpiderSynQuestion": "What are the different names and ages of every friend of either Dan or alice?", + "query": "SELECT DISTINCT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name of the person who has friends with age above 40 and under age 30?", + "SpiderSynQuestion": "Find the name of the people who has friends with age above 40 and under age 30?", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of every person who has a friend over 40 and under 30?", + "SpiderSynQuestion": "What are the names of every people who has a friend over 40 and under 30?", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name of the person who has friends with age above 40 but not under age 30?", + "SpiderSynQuestion": "Find the name of the people who has friends with age above 40 but not under age 30?", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of the people who are older 40 but no friends under age 30?", + "SpiderSynQuestion": "What are the names of the people who are older 40 but no friends under age 30?", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name of the person who has no student friends.", + "SpiderSynQuestion": "Find the name of the people who has no student friends.", + "query": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of the people who have no friends who are students?", + "SpiderSynQuestion": "What are the names of the people who have no friends who are students?", + "query": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the person who has exactly one friend.", + "SpiderSynQuestion": "Find the people who has exactly one friend.", + "query": "SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of everybody who has exactly one friend?", + "SpiderSynQuestion": "What are the names of everybody who has exactly one friend?", + "query": "SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who are the friends of Bob?", + "SpiderSynQuestion": "Who are the friends of Bob?", + "query": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who are Bob's friends?", + "SpiderSynQuestion": "Who are Bob's friends?", + "query": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name of persons who are friends with Bob.", + "SpiderSynQuestion": "Find the name of people who are friends with Bob.", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of all of Bob's friends?", + "SpiderSynQuestion": "What are the names of all of Bob's friends?", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the names of females who are friends with Zach", + "SpiderSynQuestion": "Find the names of females who are friends with Zach", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of all females who are friends with Zach?", + "SpiderSynQuestion": "What are the names of all females who are friends with Zach?", + "query": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the female friends of Alice.", + "SpiderSynQuestion": "Find the female friends of Alice.", + "query": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are all the friends of Alice who are female?", + "SpiderSynQuestion": "What are all the friends of Alice who are female?", + "query": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the male friend of Alice whose job is a doctor?", + "SpiderSynQuestion": "Find the male friend of Alice whose occupation is a doctor?", + "query": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who are the friends of Alice that are doctors?", + "SpiderSynQuestion": "Who are the friends of Alice that are doctors?", + "query": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who has a friend that is from new york city?", + "SpiderSynQuestion": "Who has a friend that is from new york city?", + "query": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of all friends who are from New York?", + "SpiderSynQuestion": "What are the names of all friends who are from New York?", + "query": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who has friends that are younger than the average age?", + "SpiderSynQuestion": "Who has friends that are younger than the average age?", + "query": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT avg(age) FROM person)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the different names of friends who are younger than the average age for a friend?", + "SpiderSynQuestion": "What are the different names of friends who are younger than the average age for a friend?", + "query": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT avg(age) FROM person)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who has friends that are older than the average age? Print their friends and their ages as well", + "SpiderSynQuestion": "Who has friends that are older than the average age? Print their friends and their ages as well", + "query": "SELECT DISTINCT T2.name , T2.friend , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT avg(age) FROM person)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Whare the names, friends, and ages of all people who are older than the average age of a person?", + "SpiderSynQuestion": "Whare the names, friends, and ages of all people who are older than the average age of a person?", + "query": "SELECT DISTINCT T2.name , T2.friend , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT avg(age) FROM person)" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who is the friend of Zach with longest year relationship?", + "SpiderSynQuestion": "Who is the friend of Zach with longest year relationship?", + "query": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Which friend of Zach has the longest-lasting friendship?", + "SpiderSynQuestion": "Which friend of Zach has the longest-lasting friendship?", + "query": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the age of the friend of Zach with longest year relationship?", + "SpiderSynQuestion": "What is the age of the friend of Zach with longest year relationship?", + "query": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the ages of all of Zach's friends who are in the longest relationship?", + "SpiderSynQuestion": "What are the ages of all of Zach's friends who are in the longest relationship?", + "query": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name of persons who are friends with Alice for the shortest years.", + "SpiderSynQuestion": "Find the name of people who are friends with Alice for the shortest years.", + "query": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT min(YEAR) FROM PersonFriend WHERE friend = 'Alice')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of all people who are friends with Alice for the shortest amount of time?", + "SpiderSynQuestion": "What are the names of all people who are friends with Alice for the shortest amount of time?", + "query": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT min(YEAR) FROM PersonFriend WHERE friend = 'Alice')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find the name, age, and job title of persons who are friends with Alice for the longest years.", + "SpiderSynQuestion": "Find the name, age, and occupation title of people who are friends with Alice for the longest years.", + "query": "SELECT T1.name , T1.age , T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE friend = 'Alice')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?", + "SpiderSynQuestion": "What are the names, ages, and occupation of all people who are friends with Alice for the longest amount of time?", + "query": "SELECT T1.name , T1.age , T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE friend = 'Alice')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Who is the person that has no friend?", + "SpiderSynQuestion": "Who is the people that has no friend?", + "query": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of all people who do not have friends?", + "SpiderSynQuestion": "What are the names of all people who do not have friends?", + "query": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Which person whose friends have the oldest average age?", + "SpiderSynQuestion": "Which people whose friends have the oldest average age?", + "query": "SELECT T2.name , avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the name of the person who has the oldest average age for their friends, and what is that average age?", + "SpiderSynQuestion": "What is the name of the people who has the oldest average age for their friends, and what is that average age?", + "query": "SELECT T2.name , avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the total number of people who has no friend living in the city of Austin.", + "SpiderSynQuestion": "What is the total number of people who has no friend living in the city of Austin.", + "query": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What is the total number of people who have no friends living in Austin?", + "SpiderSynQuestion": "What is the total number of people who have no friends living in Austin?", + "query": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')" + }, + { + "db_id": "network_2", + "SpiderQuestion": "Find Alice's friends of friends.", + "SpiderSynQuestion": "Find Alice's friends of friends.", + "query": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name != 'Alice'" + }, + { + "db_id": "network_2", + "SpiderQuestion": "What are the names of all of Alice's friends of friends?", + "SpiderSynQuestion": "What are the names of all of Alice's friends of friends?", + "query": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name != 'Alice'" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "How many members are there?", + "SpiderSynQuestion": "How many members are there?", + "query": "SELECT count(*) FROM member" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "List the names of members in ascending alphabetical order.", + "SpiderSynQuestion": "List the names of members in ascending alphabetical order.", + "query": "SELECT Name FROM member ORDER BY Name ASC" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "What are the names and countries of members?", + "SpiderSynQuestion": "What are the names and nations of members?", + "query": "SELECT Name , Country FROM member" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the names of members whose country is \"United States\" or \"Canada\".", + "SpiderSynQuestion": "Show the names of members whose nation is \"United States\" or \"Canada\".", + "query": "SELECT Name FROM member WHERE Country = \"United States\" OR Country = \"Canada\"" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the different countries and the number of members from each.", + "SpiderSynQuestion": "Show the different nations and the number of members from each.", + "query": "SELECT Country , COUNT(*) FROM member GROUP BY Country" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the most common country across members.", + "SpiderSynQuestion": "Show the most common nation across members.", + "query": "SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Which countries have more than two members?", + "SpiderSynQuestion": "Which nations have more than two members?", + "query": "SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the leader names and locations of colleges.", + "SpiderSynQuestion": "Show the leader names and addresses of school.", + "query": "SELECT Leader_Name , College_Location FROM college" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the names of members and names of colleges they go to.", + "SpiderSynQuestion": "Show the names of members and names of school they go to.", + "query": "SELECT T2.Name , T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.", + "SpiderSynQuestion": "Show the names of members and the addresses of school they go to in ascending alphabetical order of member names.", + "query": "SELECT T2.Name , T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the distinct leader names of colleges associated with members from country \"Canada\".", + "SpiderSynQuestion": "Show the different leader names of school associated with members from country \"Canada\".", + "query": "SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = \"Canada\"" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the names of members and the decoration themes they have.", + "SpiderSynQuestion": "Show the names of members and the decoration topic they have.", + "query": "SELECT T1.Name , T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the names of members that have a rank in round higher than 3.", + "SpiderSynQuestion": "Show the names of members that have a rank in round higher than 3.", + "query": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "Show the names of members in ascending order of their rank in rounds.", + "SpiderSynQuestion": "Show the names of members in ascending order of their rank in rounds.", + "query": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC" + }, + { + "db_id": "decoration_competition", + "SpiderQuestion": "List the names of members who did not participate in any round.", + "SpiderSynQuestion": "List the names of members who did not participate in any round.", + "query": "SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round)" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the name and access counts of all documents, in alphabetic order of the document name.", + "SpiderSynQuestion": "Find the name and access counts of all files, in alphabetic order of the file name.", + "query": "SELECT document_name , access_count FROM documents ORDER BY document_name" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the names of all the documents, as well as the access counts of each, ordered alphabetically?", + "SpiderSynQuestion": "What are the names of all the files, as well as the access counts of each, ordered alphabetically?", + "query": "SELECT document_name , access_count FROM documents ORDER BY document_name" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?", + "SpiderSynQuestion": "Find the name of the file that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?", + "query": "SELECT document_name , access_count FROM documents ORDER BY access_count DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed?", + "SpiderSynQuestion": "What is the name of the file which has been accessed the most times, as well as the number of times it has been accessed?", + "query": "SELECT document_name , access_count FROM documents ORDER BY access_count DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the types of documents with more than 4 documents.", + "SpiderSynQuestion": "Find the types of files with more than 4 files.", + "query": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 4" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the codes of types of documents of which there are for or more?", + "SpiderSynQuestion": "What are the codes of categories of files of which there are for or more?", + "query": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 4" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the total access count of all documents in the most popular document type.", + "SpiderSynQuestion": "Find the total access count of all files in the most popular file category.", + "query": "SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the total access count of documents that are of the most common document type?", + "SpiderSynQuestion": "What is the total access count of files that are of the most common file category?", + "query": "SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the average access count of documents?", + "SpiderSynQuestion": "What is the average access count of files?", + "query": "SELECT avg(access_count) FROM documents" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the average access count across all documents?", + "SpiderSynQuestion": "Find the average access count across all files?", + "query": "SELECT avg(access_count) FROM documents" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the structure of the document with the least number of accesses?", + "SpiderSynQuestion": "What is the structure of the file with the least number of accesses?", + "query": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Return the structure description of the document that has been accessed the fewest number of times.", + "SpiderSynQuestion": "Return the structure describing content of the file that has been accessed the fewest number of times.", + "query": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the type of the document named \"David CV\"?", + "SpiderSynQuestion": "What is the category of the file named \"David CV\"?", + "query": "SELECT document_type_code FROM documents WHERE document_name = \"David CV\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Return the type code of the document named \"David CV\".", + "SpiderSynQuestion": "Return the category code of the file named \"David CV\".", + "query": "SELECT document_type_code FROM documents WHERE document_name = \"David CV\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the list of documents that are both in the most three popular type and have the most three popular structure.", + "SpiderSynQuestion": "Find the list of files that are both in the most three popular type and have the most three popular structure.", + "query": "SELECT document_name FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the names of documents that have both one of the three most common types and one of three most common structures?", + "SpiderSynQuestion": "What are the names of files that have both one of the three most common types and one of three most common structures?", + "query": "SELECT document_name FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What document types do have more than 10000 total access number.", + "SpiderSynQuestion": "What file categories do have more than 10000 total access number.", + "query": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count) > 10000" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Return the codes of the document types that do not have a total access count of over 10000.", + "SpiderSynQuestion": "Return the codes of the file categories that do not have a total access count of over 10000.", + "query": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count) > 10000" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are all the section titles of the document named \"David CV\"?", + "SpiderSynQuestion": "What are all the chapter names of the document named \"David CV\"?", + "query": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = \"David CV\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Give the section titles of the document with the name \"David CV\".", + "SpiderSynQuestion": "Give the chapter names of the document with the name \"David CV\".", + "query": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = \"David CV\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find all the name of documents without any sections.", + "SpiderSynQuestion": "Find all the name of files without any sections.", + "query": "SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the names of documents that do not have any sections?", + "SpiderSynQuestion": "What are the names of files that do not have any sections?", + "query": "SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)" + }, + { + "db_id": "document_management", + "SpiderQuestion": "List all the username and passwords of users with the most popular role.", + "SpiderSynQuestion": "List all the username and passwords of users with the most popular role.", + "query": "SELECT user_name , password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the usernames and passwords of users that have the most common role?", + "SpiderSynQuestion": "What are the usernames and passwords of users that have the most common role?", + "query": "SELECT user_name , password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the average access counts of documents with functional area \"Acknowledgement\".", + "SpiderSynQuestion": "Find the average access counts of files with functional area \"Acknowledgement\".", + "query": "SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = \"Acknowledgement\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the average access counts of documents that have the functional area description \"Acknowledgement\"?", + "SpiderSynQuestion": "What are the average access counts of files that have the functional area description \"Acknowledgement\"?", + "query": "SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = \"Acknowledgement\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find names of the document without any images.", + "SpiderSynQuestion": "Find names of the file without any images.", + "query": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the names of documents that do not have any images?", + "SpiderSynQuestion": "What are the names of files that do not have any images?", + "query": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the name of the document with the most number of sections?", + "SpiderSynQuestion": "What is the name of the file with the most number of sections?", + "query": "SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Return the name of the document that has the most sections.", + "SpiderSynQuestion": "Return the name of the file that has the most sections.", + "query": "SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "List all the document names which contains \"CV\".", + "SpiderSynQuestion": "List all the file names which contains \"CV\".", + "query": "SELECT document_name FROM documents WHERE document_name LIKE \"%CV%\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the names of documents that contain the substring \"CV\"?", + "SpiderSynQuestion": "What are the names of files that contain the substring \"CV\"?", + "query": "SELECT document_name FROM documents WHERE document_name LIKE \"%CV%\"" + }, + { + "db_id": "document_management", + "SpiderQuestion": "How many users are logged in?", + "SpiderSynQuestion": "How many users are logged in?", + "query": "SELECT count(*) FROM users WHERE user_login = 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Count the number of users that are logged in.", + "SpiderSynQuestion": "Count the number of users that are logged in.", + "query": "SELECT count(*) FROM users WHERE user_login = 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the description of the most popular role among the users that have logged in.", + "SpiderSynQuestion": "Find the describing content of the most popular role among the users that have logged in.", + "query": "SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the description of the most popular role among users that have logged in?", + "SpiderSynQuestion": "What is the describing content of the most popular role among users that have logged in?", + "query": "SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the average access count of documents with the least popular structure.", + "SpiderSynQuestion": "Find the average access count of documents with the least popular structure.", + "query": "SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What is the average access count of documents that have the least common structure?", + "SpiderSynQuestion": "What is the average access count of files that have the least common structure?", + "query": "SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "document_management", + "SpiderQuestion": "List all the image name and URLs in the order of their names.", + "SpiderSynQuestion": "List all the picture name and URLs in the order of their names.", + "query": "SELECT image_name , image_url FROM images ORDER BY image_name" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the names and urls of images, sorted alphabetically?", + "SpiderSynQuestion": "What are the names and urls of pictures, sorted alphabetically?", + "query": "SELECT image_name , image_url FROM images ORDER BY image_name" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Find the number of users in each role.", + "SpiderSynQuestion": "Find the number of users in each role.", + "query": "SELECT count(*) , role_code FROM users GROUP BY role_code" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What are the different role codes for users, and how many users have each?", + "SpiderSynQuestion": "What are the different role codes for users, and how many users have each?", + "query": "SELECT count(*) , role_code FROM users GROUP BY role_code" + }, + { + "db_id": "document_management", + "SpiderQuestion": "What document types have more than 2 corresponding documents?", + "SpiderSynQuestion": "What file categories have more than 2 corresponding files?", + "query": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 2" + }, + { + "db_id": "document_management", + "SpiderQuestion": "Give the codes of document types that have more than 2 corresponding documents.", + "SpiderSynQuestion": "Give the codes of file categories that have more than 2 corresponding files.", + "query": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 2" + }, + { + "db_id": "company_office", + "SpiderQuestion": "How many companies are there?", + "SpiderSynQuestion": "How many enterprises are there?", + "query": "SELECT count(*) FROM Companies" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Count the number of companies.", + "SpiderSynQuestion": "Count the number of enterprises.", + "query": "SELECT count(*) FROM Companies" + }, + { + "db_id": "company_office", + "SpiderQuestion": "List the names of companies in descending order of market value.", + "SpiderSynQuestion": "List the names of enterprises in descending order of market value.", + "query": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Sort the company names in descending order of the company's market value.", + "SpiderSynQuestion": "Sort the enterprise names in descending order of the enterprise's market value.", + "query": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "What are the names of companies whose headquarters are not \"USA\"?", + "SpiderSynQuestion": "What are the names of enterprises whose headquarters are not \"USA\"?", + "query": "SELECT name FROM Companies WHERE Headquarters != 'USA'" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Find the names of the companies whose headquarters are not located in \"USA\".", + "SpiderSynQuestion": "Find the names of the enterprises whose headquarters are not located in \"USA\".", + "query": "SELECT name FROM Companies WHERE Headquarters != 'USA'" + }, + { + "db_id": "company_office", + "SpiderQuestion": "What are the name and assets of each company, sorted in ascending order of company name?", + "SpiderSynQuestion": "What are the name and assets of each enterprise, sorted in ascending order of enterprise name?", + "query": "SELECT name , Assets_billion FROM Companies ORDER BY name ASC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "List the name and assets of each company in ascending order of company name.", + "SpiderSynQuestion": "List the name and assets of each enterprise in ascending order of enterprise name.", + "query": "SELECT name , Assets_billion FROM Companies ORDER BY name ASC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "What are the average profits of companies?", + "SpiderSynQuestion": "What are the average profits of enterprises?", + "query": "SELECT avg(Profits_billion) FROM Companies" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Compute the average profits companies make.", + "SpiderSynQuestion": "Compute the average profits enterprises make.", + "query": "SELECT avg(Profits_billion) FROM Companies" + }, + { + "db_id": "company_office", + "SpiderQuestion": "What are the maximum and minimum sales of the companies whose industries are not \"Banking\".", + "SpiderSynQuestion": "What are the maximum and minimum saleroom of the enterprises whose industries are not \"Banking\".", + "query": "SELECT max(Sales_billion) , min(Sales_billion) FROM Companies WHERE Industry != \"Banking\"" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Find the maximum and minimum sales of the companies that are not in the \"Banking\" industry.", + "SpiderSynQuestion": "Find the maximum and minimum saleroom of the enterprises that are not in the \"Banking\" industry.", + "query": "SELECT max(Sales_billion) , min(Sales_billion) FROM Companies WHERE Industry != \"Banking\"" + }, + { + "db_id": "company_office", + "SpiderQuestion": "How many different industries are the companies in?", + "SpiderSynQuestion": "How many different industries are the enterprises in?", + "query": "SELECT count(DISTINCT Industry) FROM Companies" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Count the number of distinct company industries.", + "SpiderSynQuestion": "Count the number of different enterprise industries.", + "query": "SELECT count(DISTINCT Industry) FROM Companies" + }, + { + "db_id": "company_office", + "SpiderQuestion": "List the names of buildings in descending order of building height.", + "SpiderSynQuestion": "List the names of buildings in descending order of building height.", + "query": "SELECT name FROM buildings ORDER BY Height DESC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "What are the names of buildings sorted in descending order of building height?", + "SpiderSynQuestion": "What are the names of buildings sorted in descending order of building height?", + "query": "SELECT name FROM buildings ORDER BY Height DESC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Find the stories of the building with the largest height.", + "SpiderSynQuestion": "Find the floor of the building with the largest height.", + "query": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "What is the stories of highest building?", + "SpiderSynQuestion": "What is the floor of highest building?", + "query": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "List the name of a building along with the name of a company whose office is in the building.", + "SpiderSynQuestion": "List the name of a building along with the name of a company whose office is in the building.", + "query": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id" + }, + { + "db_id": "company_office", + "SpiderQuestion": "For each company, return the company name and the name of the building its office is located in.", + "SpiderSynQuestion": "For each enterprise, return the enterprise name and the name of the building its office is located in.", + "query": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Show the names of the buildings that have more than one company offices.", + "SpiderSynQuestion": "Show the names of the buildings that have more than one company offices.", + "query": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Which buildings have more than one company offices? Give me the building names.", + "SpiderSynQuestion": "Which buildings have more than one company offices? Give me the building names.", + "query": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Show the name of the building that has the most company offices.", + "SpiderSynQuestion": "Show the name of the building that has the most company offices.", + "query": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Which building has the largest number of company offices? Give me the building name.", + "SpiderSynQuestion": "Which building has the largest number of company offices? Give me the building name.", + "query": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Please show the names of the buildings whose status is \"on-hold\", in ascending order of stories.", + "SpiderSynQuestion": "Please show the names of the buildings whose status is \"on-hold\", in ascending order of floor.", + "query": "SELECT name FROM buildings WHERE Status = \"on-hold\" ORDER BY Stories ASC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Find the names of the buildings in \"on-hold\" status, and sort them in ascending order of building stories.", + "SpiderSynQuestion": "Find the names of the buildings in \"on-hold\" status, and sort them in ascending order of building floor.", + "query": "SELECT name FROM buildings WHERE Status = \"on-hold\" ORDER BY Stories ASC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Please show each industry and the corresponding number of companies in that industry.", + "SpiderSynQuestion": "Please show each industry and the corresponding number of enterprise in that industry.", + "query": "SELECT Industry , COUNT(*) FROM Companies GROUP BY Industry" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Whah are the name of each industry and the number of companies in that industry?", + "SpiderSynQuestion": "Whah are the name of each industry and the number of enterprise in that industry?", + "query": "SELECT Industry , COUNT(*) FROM Companies GROUP BY Industry" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Please show the industries of companies in descending order of the number of companies.", + "SpiderSynQuestion": "Please show the industries of enterprise in descending order of the number of enterprises.", + "query": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Sort all the industries in descending order of the count of companies in each industry", + "SpiderSynQuestion": "Sort all the industries in descending order of the count of enterprises in each industry", + "query": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC" + }, + { + "db_id": "company_office", + "SpiderQuestion": "List the industry shared by the most companies.", + "SpiderSynQuestion": "List the industry shared by the most enterprises.", + "query": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Which industry has the most companies?", + "SpiderSynQuestion": "Which industry has the most enterprises?", + "query": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "company_office", + "SpiderQuestion": "List the names of buildings that have no company office.", + "SpiderSynQuestion": "List the names of buildings that have no enterprise office.", + "query": "SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Which buildings do not have any company office? Give me the building names.", + "SpiderSynQuestion": "Which buildings do not have any enterprise office? Give me the building names.", + "query": "SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Show the industries shared by companies whose headquarters are \"USA\" and companies whose headquarters are \"China\".", + "SpiderSynQuestion": "Show the industries shared by enterprises whose headquarters are \"USA\" and enterprises whose headquarters are \"China\".", + "query": "SELECT Industry FROM Companies WHERE Headquarters = \"USA\" INTERSECT SELECT Industry FROM Companies WHERE Headquarters = \"China\"" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Which industries have both companies with headquarter in \"USA\" and companies with headquarter in \"China\"?", + "SpiderSynQuestion": "Which industries have both enterprises with headquarter in \"USA\" and enterprises with headquarter in \"China\"?", + "query": "SELECT Industry FROM Companies WHERE Headquarters = \"USA\" INTERSECT SELECT Industry FROM Companies WHERE Headquarters = \"China\"" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Find the number of companies whose industry is \"Banking\" or \"Conglomerate\",", + "SpiderSynQuestion": "Find the number of enterprises whose industry is \"Banking\" or \"Conglomerate\",", + "query": "SELECT count(*) FROM Companies WHERE Industry = \"Banking\" OR Industry = \"Conglomerate\"" + }, + { + "db_id": "company_office", + "SpiderQuestion": "How many companies are in either \"Banking\" industry or \"Conglomerate\" industry?", + "SpiderSynQuestion": "How many enterprises are in either \"Banking\" industry or \"Conglomerate\" industry?", + "query": "SELECT count(*) FROM Companies WHERE Industry = \"Banking\" OR Industry = \"Conglomerate\"" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Show the headquarters shared by more than two companies.", + "SpiderSynQuestion": "Show the head office shared by more than two enterprises.", + "query": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2" + }, + { + "db_id": "company_office", + "SpiderQuestion": "Which headquarter locations are used by more than 2 companies?", + "SpiderSynQuestion": "Which head office locations are used by more than 2 companies?", + "query": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "How many products are there?", + "SpiderSynQuestion": "How many goods are there?", + "query": "SELECT count(*) FROM Products" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "List the name of products in ascending order of price.", + "SpiderSynQuestion": "List the name of goods in ascending order of price.", + "query": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "What are the names and type codes of products?", + "SpiderSynQuestion": "What are the names and type codes of goods?", + "query": "SELECT Product_Name , Product_Type_Code FROM Products" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the prices of the products named \"Dining\" or \"Trading Policy\".", + "SpiderSynQuestion": "Show the prices of the goods named \"Dining\" or \"Trading Policy\".", + "query": "SELECT Product_Price FROM Products WHERE Product_Name = \"Dining\" OR Product_Name = \"Trading Policy\"" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "What is the average price for products?", + "SpiderSynQuestion": "What is the average price for goods?", + "query": "SELECT avg(Product_Price) FROM Products" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "What is the name of the product with the highest price?", + "SpiderSynQuestion": "What is the name of the goods with the highest price?", + "query": "SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show different type codes of products and the number of products with each type code.", + "SpiderSynQuestion": "Show different type codes of goods and the number of goods with each type code.", + "query": "SELECT Product_Type_Code , COUNT(*) FROM Products GROUP BY Product_Type_Code" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the most common type code across products.", + "SpiderSynQuestion": "Show the most common type code across goods.", + "query": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the product type codes that have at least two products.", + "SpiderSynQuestion": "Show the goods type codes that have at least two goods.", + "query": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.", + "SpiderSynQuestion": "Show the goods type codes that have both goods with price higher than 4500 and goods with price lower than 3000.", + "query": "SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the names of products and the number of events they are in.", + "SpiderSynQuestion": "Show the names of goods and the number of events they are in.", + "query": "SELECT T1.Product_Name , COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the names of products and the number of events they are in, sorted by the number of events in descending order.", + "SpiderSynQuestion": "Show the names of goods and the number of events they are in, sorted by the number of events in descending order.", + "query": "SELECT T1.Product_Name , COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the names of products that are in at least two events.", + "SpiderSynQuestion": "Show the names of goods that are in at least two events.", + "query": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "Show the names of products that are in at least two events in ascending alphabetical order of product name.", + "SpiderSynQuestion": "Show the names of goods that are in at least two events in ascending alphabetical order of goods name.", + "query": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_Name" + }, + { + "db_id": "solvency_ii", + "SpiderQuestion": "List the names of products that are not in any event.", + "SpiderSynQuestion": "List the names of goods that are not in any event.", + "query": "SELECT Product_Name FROM Products WHERE Product_ID NOT IN (SELECT Product_ID FROM Products_in_Events)" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "How many artworks are there?", + "SpiderSynQuestion": "How many works of art are there?", + "query": "SELECT count(*) FROM artwork" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "List the name of artworks in ascending alphabetical order.", + "SpiderSynQuestion": "List the name of work of art in ascending alphabetical order.", + "query": "SELECT Name FROM artwork ORDER BY Name ASC" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "List the name of artworks whose type is not \"Program Talent Show\".", + "SpiderSynQuestion": "List the name of work of art whose type is not \"Program Talent Show\".", + "query": "SELECT Name FROM artwork WHERE TYPE != \"Program Talent Show\"" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "What are the names and locations of festivals?", + "SpiderSynQuestion": "What are the names and country of festivals?", + "query": "SELECT Festival_Name , LOCATION FROM festival_detail" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "What are the names of the chairs of festivals, sorted in ascending order of the year held?", + "SpiderSynQuestion": "What are the names of the chairs of festivals, sorted in ascending order of the year held?", + "query": "SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "What is the location of the festival with the largest number of audience?", + "SpiderSynQuestion": "What is the country of the festival with the largest number of audience?", + "query": "SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "What are the names of festivals held in year 2007?", + "SpiderSynQuestion": "What are the names of festivals held in year 2007?", + "query": "SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "What is the average number of audience for festivals?", + "SpiderSynQuestion": "What is the average number of attendees for festivals?", + "query": "SELECT avg(Num_of_Audience) FROM festival_detail" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Show the names of the three most recent festivals.", + "SpiderSynQuestion": "Show the names of the three most recent festivals.", + "query": "SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "For each nomination, show the name of the artwork and name of the festival where it is nominated.", + "SpiderSynQuestion": "For each nomination, show the name of the artwork and name of the festival where it is nominated.", + "query": "SELECT T2.Name , T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Show distinct types of artworks that are nominated in festivals in 2007.", + "SpiderSynQuestion": "Show different categories of artworks that are nominated in festivals in 2007.", + "query": "SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T3.Year = 2007" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Show the names of artworks in ascending order of the year they are nominated in.", + "SpiderSynQuestion": "Show the names of artworks in ascending order of the year they are nominated in.", + "query": "SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID ORDER BY T3.Year" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Show the names of festivals that have nominated artworks of type \"Program Talent Show\".", + "SpiderSynQuestion": "Show the names of festivals that have nominated artworks of type \"Program Talent Show\".", + "query": "SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T2.Type = \"Program Talent Show\"" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Show the ids and names of festivals that have at least two nominations for artworks.", + "SpiderSynQuestion": "Show the ids and names of festivals that have at least two nominations for artworks.", + "query": "SELECT T1.Festival_ID , T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*) >= 2" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Show the id, name of each festival and the number of artworks it has nominated.", + "SpiderSynQuestion": "Show the id, name of each festival and the number of artworks it has nominated.", + "query": "SELECT T1.Festival_ID , T3.Festival_Name , COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Please show different types of artworks with the corresponding number of artworks of each type.", + "SpiderSynQuestion": "Please show different categories of artworks with the corresponding number of work of art of each category.", + "query": "SELECT TYPE , COUNT(*) FROM artwork GROUP BY TYPE" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "List the most common type of artworks.", + "SpiderSynQuestion": "List the most common category of artworks.", + "query": "SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "List the year in which there are more than one festivals.", + "SpiderSynQuestion": "List the year in which there are more than one festivals.", + "query": "SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "List the name of artworks that are not nominated.", + "SpiderSynQuestion": "List the name of work of art that are not nominated.", + "query": "SELECT Name FROM Artwork WHERE Artwork_ID NOT IN (SELECT Artwork_ID FROM nomination)" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "Show the number of audience in year 2008 or 2010.", + "SpiderSynQuestion": "Show the number of attendees in year 2008 or 2010.", + "query": "SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "What are the total number of the audiences who visited any of the festivals?", + "SpiderSynQuestion": "What are the total number of the attendees who visited any of the festivals?", + "query": "SELECT sum(Num_of_Audience) FROM festival_detail" + }, + { + "db_id": "entertainment_awards", + "SpiderQuestion": "In which year are there festivals both inside the 'United States' and outside the 'United States'?", + "SpiderSynQuestion": "In which year are there festivals both inside the 'United States' and outside the 'United States'?", + "query": "SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION != 'United States'" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "How many premises are there?", + "SpiderSynQuestion": "How many premises are there?", + "query": "SELECT count(*) FROM premises" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "What are all the distinct premise types?", + "SpiderSynQuestion": "What are all the different premise categories?", + "query": "SELECT DISTINCT premises_type FROM premises" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Find the types and details for all premises and order by the premise type.", + "SpiderSynQuestion": "Find the categories and information for all premises and order by the premise category.", + "query": "SELECT premises_type , premise_details FROM premises ORDER BY premises_type" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show each premise type and the number of premises in that type.", + "SpiderSynQuestion": "Show each premise category and the number of premises in that category.", + "query": "SELECT premises_type , count(*) FROM premises GROUP BY premises_type" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show all distinct product categories along with the number of mailshots in each category.", + "SpiderSynQuestion": "Show all different goods type along with the number of mailshots in each type.", + "query": "SELECT product_category , count(*) FROM mailshot_campaigns GROUP BY product_category" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the name and phone of the customer without any mailshot.", + "SpiderSynQuestion": "Show the name and telephone of the client without any mailshot.", + "query": "SELECT customer_name , customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM mailshot_customers)" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the name and phone for customers with a mailshot with outcome code 'No Response'.", + "SpiderSynQuestion": "Show the name and telephone for clients with a mailshot with outcome code 'No Response'.", + "query": "SELECT T1.customer_name , T1.customer_phone FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.outcome_code = 'No Response'" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.", + "SpiderSynQuestion": "Show the result code of mailshots along with the number of mailshots in each result code.", + "query": "SELECT outcome_code , count(*) FROM mailshot_customers GROUP BY outcome_code" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the names of customers who have at least 2 mailshots with outcome code 'Order'.", + "SpiderSynQuestion": "Show the names of clients who have at least 2 mailshots with result code 'Order'.", + "query": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE outcome_code = 'Order' GROUP BY T1.customer_id HAVING count(*) >= 2" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the names of customers who have the most mailshots.", + "SpiderSynQuestion": "Show the names of clients who have the most mailshots.", + "query": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.", + "SpiderSynQuestion": "What are the name and payment method of clients who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.", + "query": "SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response'" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the premise type and address type code for all customer addresses.", + "SpiderSynQuestion": "Show the premise type and location type code for all client locations.", + "query": "SELECT T2.premises_type , T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "What are the distinct address type codes for all customer addresses?", + "SpiderSynQuestion": "What are the different location type codes for all client locations?", + "query": "SELECT DISTINCT address_type_code FROM customer_addresses" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.", + "SpiderSynQuestion": "Show the shipping charge and client id for client orders with order status Cancelled or Paid.", + "query": "SELECT order_shipping_charges , customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid'" + }, + { + "db_id": "customers_campaigns_ecommerce", + "SpiderQuestion": "Show the names of customers having an order with shipping method FedEx and order status Paid.", + "SpiderSynQuestion": "Show the names of clients having an order with shipping method FedEx and order status Paid.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid'" + }, + { + "db_id": "college_3", + "SpiderQuestion": "How many courses are there in total?", + "SpiderSynQuestion": "How many curriculum are there in total?", + "query": "SELECT count(*) FROM COURSE" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Count the number of courses.", + "SpiderSynQuestion": "Count the number of curriculum.", + "query": "SELECT count(*) FROM COURSE" + }, + { + "db_id": "college_3", + "SpiderQuestion": "How many courses have more than 2 credits?", + "SpiderSynQuestion": "How many curriculum have more than 2 credits?", + "query": "SELECT count(*) FROM COURSE WHERE Credits > 2" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Count the number of courses with more than 2 credits.", + "SpiderSynQuestion": "Count the number of curriculum with more than 2 credits.", + "query": "SELECT count(*) FROM COURSE WHERE Credits > 2" + }, + { + "db_id": "college_3", + "SpiderQuestion": "List all names of courses with 1 credit?", + "SpiderSynQuestion": "List all names of curriculum with 1 credit?", + "query": "SELECT CName FROM COURSE WHERE Credits = 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the names of courses with 1 credit?", + "SpiderSynQuestion": "What are the names of curriculum with 1 credit?", + "query": "SELECT CName FROM COURSE WHERE Credits = 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Which courses are taught on days MTW?", + "SpiderSynQuestion": "Which curriculum are taught on days MTW?", + "query": "SELECT CName FROM COURSE WHERE Days = \"MTW\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the course names for courses taught on MTW?", + "SpiderSynQuestion": "What are the curriculum names for curriculum taught on MTW?", + "query": "SELECT CName FROM COURSE WHERE Days = \"MTW\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the number of departments in Division \"AS\"?", + "SpiderSynQuestion": "What is the number of departments in Division \"AS\"?", + "query": "SELECT count(*) FROM DEPARTMENT WHERE Division = \"AS\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "How many departments are in the division AS?", + "SpiderSynQuestion": "How many departments are in the division AS?", + "query": "SELECT count(*) FROM DEPARTMENT WHERE Division = \"AS\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the phones of departments in Room 268?", + "SpiderSynQuestion": "What are the telephones of departments in Room 268?", + "query": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Give the phones for departments in room 268.", + "SpiderSynQuestion": "Give the telephones for departments in room 268.", + "query": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the number of students that have at least one grade \"B\".", + "SpiderSynQuestion": "Find the number of students that have at least one grade \"B\".", + "query": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = \"B\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "How many students have had at least one \"B\" grade?", + "SpiderSynQuestion": "How many students have had at least one \"B\" grade?", + "query": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = \"B\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the max and min grade point for all letter grade.", + "SpiderSynQuestion": "Find the max and min grade point for all letter grade.", + "query": "SELECT max(gradepoint) , min(gradepoint) FROM GRADECONVERSION" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the maximum and minumum grade points?", + "SpiderSynQuestion": "What are the maximum and minumum grade points?", + "query": "SELECT max(gradepoint) , min(gradepoint) FROM GRADECONVERSION" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the first names of students whose first names contain letter \"a\".", + "SpiderSynQuestion": "Find the forenames of students whose forenames contain letter \"a\".", + "query": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the first names for students who have an \"a\" in their first name?", + "SpiderSynQuestion": "What are the forenames for students who have an \"a\" in their forename?", + "query": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the first names and last names of male (sex is M) faculties who live in building NEB.", + "SpiderSynQuestion": "Find the forenames and surnames of male (sex is M) faculties who live in building NEB.", + "query": "SELECT Fname , Lname FROM FACULTY WHERE sex = \"M\" AND Building = \"NEB\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the full names of faculties with sex M and who live in building NEB?", + "SpiderSynQuestion": "What are the full names of faculties with sex M and who live in building NEB?", + "query": "SELECT Fname , Lname FROM FACULTY WHERE sex = \"M\" AND Building = \"NEB\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the rooms of faculties with rank professor who live in building NEB.", + "SpiderSynQuestion": "Find the rooms of faculties with rank professor who live in building NEB.", + "query": "SELECT Room FROM FACULTY WHERE Rank = \"Professor\" AND Building = \"NEB\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the rooms for members of the faculty who are professors and who live in building NEB?", + "SpiderSynQuestion": "What are the rooms for members of the faculty who are professors and who live in building NEB?", + "query": "SELECT Room FROM FACULTY WHERE Rank = \"Professor\" AND Building = \"NEB\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the department name that is in Building \"Mergenthaler\".", + "SpiderSynQuestion": "Find the department name that is in Building \"Mergenthaler\".", + "query": "SELECT DName FROM DEPARTMENT WHERE Building = \"Mergenthaler\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the name of the department in the Building Mergenthaler?", + "SpiderSynQuestion": "What is the name of the department in the Building Mergenthaler?", + "query": "SELECT DName FROM DEPARTMENT WHERE Building = \"Mergenthaler\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "List all information about courses sorted by credits in the ascending order.", + "SpiderSynQuestion": "List all detail about curriculum sorted by credits in the ascending order.", + "query": "SELECT * FROM COURSE ORDER BY Credits" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is all the information about courses, ordered by credits ascending?", + "SpiderSynQuestion": "What is all the detail about curriculum, ordered by credits ascending?", + "query": "SELECT * FROM COURSE ORDER BY Credits" + }, + { + "db_id": "college_3", + "SpiderQuestion": "List the course name of courses sorted by credits.", + "SpiderSynQuestion": "List the curriculum name of curriculum sorted by credits.", + "query": "SELECT CName FROM COURSE ORDER BY Credits" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the course names, ordered by credits?", + "SpiderSynQuestion": "What are the curriculum names, ordered by credits?", + "query": "SELECT CName FROM COURSE ORDER BY Credits" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the first name of students in the descending order of age.", + "SpiderSynQuestion": "Find the forename of students in the descending order of age.", + "query": "SELECT Fname FROM STUDENT ORDER BY Age DESC" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the first names of students, ordered by age from greatest to least?", + "SpiderSynQuestion": "What are the forenames of students, ordered by age from greatest to least?", + "query": "SELECT Fname FROM STUDENT ORDER BY Age DESC" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the last name of female (sex is F) students in the descending order of age.", + "SpiderSynQuestion": "Find the family name of female (sex is F) students in the descending order of age.", + "query": "SELECT LName FROM STUDENT WHERE Sex = \"F\" ORDER BY Age DESC" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the last names of female students, ordered by age descending?", + "SpiderSynQuestion": "What are the family names of female students, ordered by age descending?", + "query": "SELECT LName FROM STUDENT WHERE Sex = \"F\" ORDER BY Age DESC" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the last names of faculties in building Barton in alphabetic order.", + "SpiderSynQuestion": "Find the family names of faculties in building Barton in alphabetic order.", + "query": "SELECT Lname FROM FACULTY WHERE Building = \"Barton\" ORDER BY Lname" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the last names of faculty in building Barton, sorted by last name?", + "SpiderSynQuestion": "What are the family names of faculty in building Barton, sorted by family name?", + "query": "SELECT Lname FROM FACULTY WHERE Building = \"Barton\" ORDER BY Lname" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the first names of faculties of rank Professor in alphabetic order.", + "SpiderSynQuestion": "Find the forenames of faculties of rank Professor in alphabetic order.", + "query": "SELECT Fname FROM FACULTY WHERE Rank = \"Professor\" ORDER BY Fname" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the first names for all faculty professors, ordered by first name?", + "SpiderSynQuestion": "What are the forenames for all faculty professors, ordered by forename?", + "query": "SELECT Fname FROM FACULTY WHERE Rank = \"Professor\" ORDER BY Fname" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the name of the department that has the biggest number of students minored in?", + "SpiderSynQuestion": "Find the name of the department that has the biggest number of students minored in?", + "query": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the name of the department with the most students minoring in it?", + "SpiderSynQuestion": "What is the name of the department with the most students minoring in it?", + "query": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the name of the department that has no students minored in?", + "SpiderSynQuestion": "Find the name of the department that has no students minored in?", + "query": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the name of the department htat has no students minoring in it?", + "SpiderSynQuestion": "What is the name of the department htat has no students minoring in it?", + "query": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the name of the department that has the fewest members.", + "SpiderSynQuestion": "Find the name of the department that has the fewest members.", + "query": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the name of the department with the fewest members?", + "SpiderSynQuestion": "What is the name of the department with the fewest members?", + "query": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the rank of the faculty that the fewest faculties belong to.", + "SpiderSynQuestion": "Find the job title of the faculty that the fewest faculties belong to.", + "query": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the least common faculty rank?", + "SpiderSynQuestion": "What is the least common job title of teacher?", + "query": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the first and last names of the instructors who teach the top 3 number of courses?", + "SpiderSynQuestion": "What are the full names of the instructors who teach the top 3 number of courses?", + "query": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the full names of the 3 instructors who teach the most courses?", + "SpiderSynQuestion": "What are the full names of the 3 instructors who teach the most courses?", + "query": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Which building does the instructor who teaches the most number of courses live in?", + "SpiderSynQuestion": "Which building does the instructor who teaches the most number of curriculum live in?", + "query": "SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Give the building that the instructor who teaches the greatest number of courses lives in.", + "SpiderSynQuestion": "Give the building that the instructor who teaches the greatest number of curriculum lives in.", + "query": "SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the name of courses that have at least five enrollments?", + "SpiderSynQuestion": "What are the name of curriculum that have at least five enrollments?", + "query": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Give the names of the courses with at least five enrollments.", + "SpiderSynQuestion": "Give the names of the curriculum with at least five enrollments.", + "query": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the first name and last name of the instructor of course that has course name", + "SpiderSynQuestion": "Find the forename and surname of the instructor of course that has course name", + "query": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = \"COMPUTER LITERACY\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the full name of the instructor who has a course named COMPUTER LITERACY?", + "SpiderSynQuestion": "What is the full name of the instructor who has a course named COMPUTER LITERACY?", + "query": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = \"COMPUTER LITERACY\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.", + "SpiderSynQuestion": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.", + "query": "SELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = \"INTRODUCTION TO COMPUTER SCIENCE\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?", + "SpiderSynQuestion": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?", + "query": "SELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = \"INTRODUCTION TO COMPUTER SCIENCE\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the student first and last names and grade points of all enrollments.", + "SpiderSynQuestion": "Find the student full names and grade points of all enrollments.", + "query": "SELECT T3.Fname , T3.LName , T2.gradepoint FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the full names and gradepoints for all enrollments?", + "SpiderSynQuestion": "What are the full names and gradepoints for all enrollments?", + "query": "SELECT T3.Fname , T3.LName , T2.gradepoint FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the distinct student first names of all students that have grade point at least 3.8 in one course.", + "SpiderSynQuestion": "Find the different student forenames of all students that have grade point at least 3.8 in one course.", + "query": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the distinct first names for students with a grade point of 3.8 or above in at least one course?", + "SpiderSynQuestion": "What are the different forenames for students with a grade point of 3.8 or above in at least one course?", + "query": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the full names of faculties who are members of department with department number 520.", + "SpiderSynQuestion": "Find the full names of faculties who are members of department with department number 520.", + "query": "SELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the full names of faculty members who are a part of department 520?", + "SpiderSynQuestion": "What are the full names of faculty members who are a part of department 520?", + "query": "SELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the first names and last names of the students that minor in the department with DNO 140.", + "SpiderSynQuestion": "What are the forenames and family names of the students that minor in the department with DNO 140.", + "query": "SELECT T2.Fname , T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the full names of students minoring in department 140?", + "SpiderSynQuestion": "What are the full names of students minoring in department 140?", + "query": "SELECT T2.Fname , T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the last names of faculties who are members of computer science department.", + "SpiderSynQuestion": "Find the family names of faculties who are members of computer science department.", + "query": "SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = \"Computer Science\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the last names of faculty who are part of the computer science department?", + "SpiderSynQuestion": "What are the family names of teacher who are part of the computer science department?", + "query": "SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = \"Computer Science\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the average grade point of student whose last name is Smith.", + "SpiderSynQuestion": "Find the average grade point of student whose family name is Smith.", + "query": "SELECT avg(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = \"Smith\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the average gradepoint for students with the last name Smith?", + "SpiderSynQuestion": "What is the average gradepoint for students with the surname Smith?", + "query": "SELECT avg(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = \"Smith\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What is the maximum and minimum grade point of students who live in NYC?", + "SpiderSynQuestion": "What is the maximum and minimum grade point of students who live in NYC?", + "query": "SELECT max(T2.gradepoint) , min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = \"NYC\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Give the maximum and minimum gradepoints for students living in NYC?", + "SpiderSynQuestion": "Give the maximum and minimum gradepoints for students living in NYC?", + "query": "SELECT max(T2.gradepoint) , min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = \"NYC\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the names of courses that have either 3 credits or 1 credit but 4 hours.", + "SpiderSynQuestion": "Find the names of curriculum that have either 3 credits or 1 credit but 4 hours.", + "query": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the names of courses that give either 3 credits, or 1 credit and 4 hours?", + "SpiderSynQuestion": "What are the names of curriculum that give either 3 credits, or 1 credit and 4 hours?", + "query": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the names of departments that are either in division AS or in division EN and in Building NEB.", + "SpiderSynQuestion": "Find the names of departments that are either in division AS or in division EN and in Building NEB.", + "query": "SELECT DName FROM DEPARTMENT WHERE Division = \"AS\" UNION SELECT DName FROM DEPARTMENT WHERE Division = \"EN\" AND Building = \"NEB\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the names of departments either in division AS, or in division EN and in building NEB?", + "SpiderSynQuestion": "What are the names of departments either in division AS, or in division EN and in building NEB?", + "query": "SELECT DName FROM DEPARTMENT WHERE Division = \"AS\" UNION SELECT DName FROM DEPARTMENT WHERE Division = \"EN\" AND Building = \"NEB\"" + }, + { + "db_id": "college_3", + "SpiderQuestion": "Find the first name of students not enrolled in any course.", + "SpiderSynQuestion": "Find the forename of students not enrolled in any course.", + "query": "SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)" + }, + { + "db_id": "college_3", + "SpiderQuestion": "What are the first names of all students that are not enrolled in courses?", + "SpiderSynQuestion": "What are the forenames of all students that are not enrolled in courses?", + "query": "SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the ids of the top three products that were purchased in the largest amount?", + "SpiderSynQuestion": "What are the ids of the top three goods that were purchased in the largest amount?", + "query": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Give the ids of the three products purchased in the largest amounts.", + "SpiderSynQuestion": "Give the ids of the three goods purchased in the largest amounts.", + "query": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the product id and product type of the cheapest product?", + "SpiderSynQuestion": "What are the goods id and goods category of the cheapest goods?", + "query": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Give the id and product type of the product with the lowest price.", + "SpiderSynQuestion": "Give the id and goods category of the goods with the lowest price.", + "query": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the number of different product types.", + "SpiderSynQuestion": "Find the number of different goods categories.", + "query": "SELECT count(DISTINCT product_type_code) FROM products" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Count the number of distinct product types.", + "SpiderSynQuestion": "Count the number of different goods categories.", + "query": "SELECT count(DISTINCT product_type_code) FROM products" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the address of customer 10.", + "SpiderSynQuestion": "Return the location of customer 10.", + "query": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the address for the customer with id 10?", + "SpiderSynQuestion": "What is the location for the customer with id 10?", + "query": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the staff ids and genders of all staffs whose job title is Department Manager?", + "SpiderSynQuestion": "What are the employee ids and sex of all employees whose job title is Department Manager?", + "query": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the staff ids and genders for any staff with the title Department Manager.", + "SpiderSynQuestion": "Return the employee ids and sex for any employee with the title Department Manager.", + "query": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "For each payment method, return how many customers use it.", + "SpiderSynQuestion": "For each payment method, return how many clients use it.", + "query": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "How many customers use each payment method?", + "SpiderSynQuestion": "How many clients use each payment method?", + "query": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the id of the product that was ordered the most often?", + "SpiderSynQuestion": "What is the id of the goods that was ordered the most often?", + "query": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Give the product id for the product that was ordered most frequently.", + "SpiderSynQuestion": "Give the goods id for the goods that was ordered most frequently.", + "query": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the name, phone number and email address of the customer who made the largest number of orders?", + "SpiderSynQuestion": "What are the name, telephone number and email address of the client who made the largest number of orders?", + "query": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the name, phone number and email address for the customer with the most orders.", + "SpiderSynQuestion": "Return the name, telephone number and email address for the client with the most orders.", + "query": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the average price for each type of product?", + "SpiderSynQuestion": "What is the average price for each category of goods?", + "query": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the average price for each product type.", + "SpiderSynQuestion": "Return the average price for each goods category.", + "query": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "How many department stores does the store chain South have?", + "SpiderSynQuestion": "How many division stores does the store chain South have?", + "query": "SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Count the number of stores the chain South has.", + "SpiderSynQuestion": "Count the number of shops the chain South has.", + "query": "SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the name and job title of the staff who was assigned the latest?", + "SpiderSynQuestion": "What is the name and job title of the employee who was assigned the latest?", + "query": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the name and job title of the staff with the latest date assigned.", + "SpiderSynQuestion": "Return the name and job title of the employee with the latest date assigned.", + "query": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Give me the product type, name and price for all the products supplied by supplier id 3.", + "SpiderSynQuestion": "Give me the goods category, name and price for all the goods supplied by supplier id 3.", + "query": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the product type, name, and price for products supplied by supplier 3.", + "SpiderSynQuestion": "Return the goods category, name, and price for goods supplied by supplier 3.", + "query": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the distinct name of customers whose order status is Pending, in the order of customer id.", + "SpiderSynQuestion": "Return the different name of clients whose order status is Pending, in the order of client id.", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the distinct names of customers with an order status of Pending, sorted by customer id?", + "SpiderSynQuestion": "What are the different names of clients with an order status of Pending, sorted by client id?", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the name and address of the customers who have both New and Pending orders.", + "SpiderSynQuestion": "Find the name and location of the clients who have both New and Pending orders.", + "query": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the names and addressed of customers who have both New and Pending orders?", + "SpiderSynQuestion": "What are the names and addressed of clients who have both New and Pending orders?", + "query": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.", + "SpiderSynQuestion": "Return ids of all the goods that are supplied by supplier id 2 and are more expensive than the average price of all goods.", + "query": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", + "SpiderSynQuestion": "What are the ids of goods from the supplier with id 2, which are more expensive than the average price across all goods?", + "query": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the id and name of the department store that has both marketing and managing department?", + "SpiderSynQuestion": "What is the id and name of the division store that has both marketing and managing division?", + "query": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the ids and names of department stores with both marketing and managing departments?", + "SpiderSynQuestion": "What are the ids and names of division stores with both marketing and managing divisions?", + "query": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the ids of the two department store chains with the largest number of department stores?", + "SpiderSynQuestion": "What are the ids of the two division store chains with the largest number of division stores?", + "query": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the ids of the two department store chains with the most department stores.", + "SpiderSynQuestion": "Return the ids of the two division store chains with the most division stores.", + "query": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the id of the department with the least number of staff?", + "SpiderSynQuestion": "What is the id of the division with the least number of employee?", + "query": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the id of the department with the fewest staff assignments.", + "SpiderSynQuestion": "Return the id of the division with the fewest employee assignments.", + "query": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "For each product type, return the maximum and minimum price.", + "SpiderSynQuestion": "For each goods category, return the maximum and minimum price.", + "query": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the maximum and minimum product prices for each product type?", + "SpiderSynQuestion": "What are the maximum and minimum goods prices for each goods category?", + "query": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the product type whose average price is higher than the average price of all products.", + "SpiderSynQuestion": "Find the goods category whose average price is higher than the average price of all goods.", + "query": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the code of the product type with an average price higher than the average price of all products?", + "SpiderSynQuestion": "What is the code of the goods category with an average price higher than the average price of all goods?", + "query": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the id and name of the staff who has been assigned for the shortest period.", + "SpiderSynQuestion": "Find the id and name of the employee who has been assigned for the shortest period.", + "query": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the id and name of the staff who has been assigned for the least amount of time?", + "SpiderSynQuestion": "What is the id and name of the employee who has been assigned for the least amount of time?", + "query": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the names and ids of all products whose price is between 600 and 700.", + "SpiderSynQuestion": "Return the names and ids of all goods whose price is between 600 and 700.", + "query": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the names and ids of products costing between 600 and 700?", + "SpiderSynQuestion": "What are the names and ids of goods costing between 600 and 700?", + "query": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the ids of all distinct customers who made order after some orders that were Cancelled.", + "SpiderSynQuestion": "Find the ids of all different clients who made order after some orders that were Cancelled.", + "query": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the distinct ids of customers who made an order after any order that was Cancelled?", + "SpiderSynQuestion": "What are the different ids of clients who made an order after any order that was Cancelled?", + "query": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?", + "SpiderSynQuestion": "What is id of the employee who had a Staff Department Assignment earlier than any Clerical Staff?", + "query": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.", + "SpiderSynQuestion": "Return the id of the employee whose Staff Department Assignment was earlier than that of any Clerical Staff.", + "query": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the names and ids of customers whose address contains TN?", + "SpiderSynQuestion": "What are the names and ids of clients whose location contains TN?", + "query": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the names and ids of customers who have TN in their address.", + "SpiderSynQuestion": "Return the names and ids of clients who have TN in their location.", + "query": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the name and gender of the staff who was assigned in 2016.", + "SpiderSynQuestion": "Return the name and sex of the employee who was assigned in 2016.", + "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the names and genders of staff who were assigned in 2016?", + "SpiderSynQuestion": "What are the names and sex of employee who were assigned in 2016?", + "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "List the name of staff who has been assigned multiple jobs.", + "SpiderSynQuestion": "List the name of employee who has been assigned multiple jobs.", + "query": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the names of staff who have been assigned multiple jobs?", + "SpiderSynQuestion": "What are the names of employee who have been assigned multiple jobs?", + "query": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "List the name and phone number of all suppliers in the alphabetical order of their addresses.", + "SpiderSynQuestion": "List the name and telephone number of all suppliers in the alphabetical order of their locations.", + "query": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?", + "SpiderSynQuestion": "What are the names and telephone numbers for all suppliers, sorted in alphabetical order of their addressed?", + "query": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the phone numbers of all customers and suppliers.", + "SpiderSynQuestion": "What are the telephone numbers of all clients and suppliers.", + "query": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the phone numbers for all customers and suppliers.", + "SpiderSynQuestion": "Return the telephone numbers for all clients and suppliers.", + "query": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the ids of all products that were ordered more than three times or supplied more than 80000.", + "SpiderSynQuestion": "Return the ids of all goods that were ordered more than three times or supplied more than 80000.", + "query": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?", + "SpiderSynQuestion": "What are the ids of all goods that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?", + "query": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are id and name of the products whose price is lower than 600 or higher than 900?", + "SpiderSynQuestion": "What are id and name of the goods whose price is lower than 600 or higher than 900?", + "query": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Give the ids and names of products with price lower than 600 or higher than 900.", + "SpiderSynQuestion": "Give the ids and names of goods with price lower than 600 or higher than 900.", + "query": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.", + "SpiderSynQuestion": "Find the id of suppliers whose average amount purchased for each goods is above 50000 or below 30000.", + "query": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?", + "SpiderSynQuestion": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?", + "query": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the average amount purchased and value purchased for the supplier who supplies the most products.", + "SpiderSynQuestion": "What are the average amount purchased and value purchased for the supplier who supplies the most goods.", + "query": "SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.", + "SpiderSynQuestion": "Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of goods.", + "query": "SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the largest and smallest customer codes?", + "SpiderSynQuestion": "What is the largest and smallest client codes?", + "query": "SELECT max(customer_code) , min(customer_code) FROM Customers" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Return the maximum and minimum customer codes.", + "SpiderSynQuestion": "Return the maximum and minimum client codes.", + "query": "SELECT max(customer_code) , min(customer_code) FROM Customers" + }, + { + "db_id": "department_store", + "SpiderQuestion": "List the names of all the distinct customers who bought a keyboard.", + "SpiderSynQuestion": "List the names of all the different clients who bought a keyboard.", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the distinct names of customers who have purchased a keyboard?", + "SpiderSynQuestion": "What are the different names of clients who have purchased a keyboard?", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "List the names and phone numbers of all the distinct suppliers who supply red jeans.", + "SpiderSynQuestion": "List the names and telephone numbers of all the different suppliers who supply red jeans.", + "query": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the distinct names and phone numbers for suppliers who have red jeans?", + "SpiderSynQuestion": "What are the different names and telephone numbers for suppliers who have red jeans?", + "query": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?", + "SpiderSynQuestion": "What are the highest and lowest prices of goods, grouped by and alphabetically ordered by goods category?", + "query": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Give the maximum and minimum product prices for each product type, grouped and ordered by product type.", + "SpiderSynQuestion": "Give the maximum and minimum goods prices for each goods category, grouped and ordered by goods category.", + "query": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code" + }, + { + "db_id": "department_store", + "SpiderQuestion": "List the order id, customer id for orders in Cancelled status, ordered by their order dates.", + "SpiderSynQuestion": "List the order id, client id for orders in Cancelled status, ordered by their order dates.", + "query": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?", + "SpiderSynQuestion": "What are the order ids and client ids for orders that have been Cancelled, sorted by their order dates?", + "query": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the names of products that were bought by at least two distinct customers.", + "SpiderSynQuestion": "Find the names of goods that were bought by at least two different clients.", + "query": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the distinct names of products purchased by at least two different customers?", + "SpiderSynQuestion": "What are the different names of goods purchased by at least two different clients?", + "query": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the names of customers who have bought by at least three distinct products.", + "SpiderSynQuestion": "Find the names of clients who have bought by at least three different goods.", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the distinct names of customers who have purchased at least three different products?", + "SpiderSynQuestion": "What are the different names of clients who have purchased at least three different goods?", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.", + "SpiderSynQuestion": "Find the name and sex of the employee who has been assigned the job of Sales Person but never Clerical Staff.", + "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?", + "SpiderSynQuestion": "What are the names and sexs of employee who have held the title Sales Person, but never Clerical Staff?", + "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the id and name of customers whose address contains WY state and do not use credit card for payment.", + "SpiderSynQuestion": "Find the id and name of clients whose location contains WY state and do not use credit card for payment.", + "query": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?", + "SpiderSynQuestion": "What are the ids and names of clients with addressed that contain WY and who do not use a credit card for payment?", + "query": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the average price of all product clothes.", + "SpiderSynQuestion": "Find the average price of all goods clothes.", + "query": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the average price of clothes?", + "SpiderSynQuestion": "What is the average price of clothes?", + "query": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'" + }, + { + "db_id": "department_store", + "SpiderQuestion": "Find the name of the most expensive hardware product.", + "SpiderSynQuestion": "Find the name of the most expensive hardware goods.", + "query": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1" + }, + { + "db_id": "department_store", + "SpiderQuestion": "What is the name of the hardware product with the greatest price?", + "SpiderSynQuestion": "What is the name of the hardware goods with the greatest price?", + "query": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "How many aircrafts are there?", + "SpiderSynQuestion": "How many airplanes are there?", + "query": "SELECT count(*) FROM aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the number of aircraft?", + "SpiderSynQuestion": "What is the number of airplane?", + "query": "SELECT count(*) FROM aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List the description of all aircrafts.", + "SpiderSynQuestion": "List the describing content of all airplanes", + "query": "SELECT Description FROM aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the descriptions for the aircrafts?", + "SpiderSynQuestion": "What are the describing details for the airplanes?", + "query": "SELECT Description FROM aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the average number of international passengers of all airports?", + "SpiderSynQuestion": "What is the average number of different country passengers of all aerodromes?", + "query": "SELECT avg(International_Passengers) FROM airport" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the average number of international passengers for an airport?", + "SpiderSynQuestion": "What is the average number of different country passengers for an aerodrome?", + "query": "SELECT avg(International_Passengers) FROM airport" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the number of international and domestic passengers of the airport named London \"Heathrow\"?", + "SpiderSynQuestion": "What are the number of different country and domestic passengers of the aerodrome named London \"Heathrow\"?", + "query": "SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = \"London Heathrow\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "How many international and domestic passengers are there in the airport London Heathrow?", + "SpiderSynQuestion": "How many different country and domestic passengers are there in the aerodrome London Heathrow?", + "query": "SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = \"London Heathrow\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the total number of Domestic Passengers of airports that contain the word \"London\".", + "SpiderSynQuestion": "What are the total number of Domestic Passengers of aerodromes that contain the word \"London\".", + "query": "SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE \"%London%\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the total number of domestic passengers at all London airports?", + "SpiderSynQuestion": "What are the total number of domestic passengers at all London aerodromes?", + "query": "SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE \"%London%\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the maximum and minimum number of transit passengers of all aiports.", + "SpiderSynQuestion": "What are the maximum and minimum number of transit passengers of all aiports.", + "query": "SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the maximum and mininum number of transit passengers for all airports?", + "SpiderSynQuestion": "What is the maximum and mininum number of transit passengers for all aerodromes?", + "query": "SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the name of pilots aged 25 or older?", + "SpiderSynQuestion": "What are the name of aviators aged 25 or older?", + "query": "SELECT Name FROM pilot WHERE Age >= 25" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "what is the name of every pilot who is at least 25 years old?", + "SpiderSynQuestion": "what is the name of every aviator who is at least 25 years old?", + "query": "SELECT Name FROM pilot WHERE Age >= 25" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List all pilot names in ascending alphabetical order.", + "SpiderSynQuestion": "List all aviator names in ascending alphabetical order.", + "query": "SELECT Name FROM pilot ORDER BY Name ASC" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of the pilots in alphabetical order?", + "SpiderSynQuestion": "What are the names of the aviators in alphabetical order?", + "query": "SELECT Name FROM pilot ORDER BY Name ASC" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List names of all pilot aged 30 or younger in descending alphabetical order.", + "SpiderSynQuestion": "List names of all aviator aged 30 or younger in descending alphabetical order.", + "query": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of all pilots 30 years old or young in descending alphabetical order?", + "SpiderSynQuestion": "What are the names of all aviators 30 years old or young in descending alphabetical order?", + "query": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "Please show the names of aircrafts associated with airport with name \"London Gatwick\".", + "SpiderSynQuestion": "Please show the names of airplanes associated with aerodrome with name \"London Gatwick\".", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of all the aircrafts associated with London Gatwick airport?", + "SpiderSynQuestion": "What are the names of all the airplanes associated with London Gatwick aerodrome?", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.", + "SpiderSynQuestion": "Please show the names and describing details of airplanes associated with aerodromes that have a total number of passengers bigger than 10000000.", + "query": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", + "SpiderSynQuestion": "What are the names and describing details of airplanes associated with an aerodrome that has more total passengers than 10000000?", + "query": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?", + "SpiderSynQuestion": "What is the average total number of passengers of aerodromes that are associated with airplane \"Robinson R-22\"?", + "query": "SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = \"Robinson R-22\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the average total number of passengers for all airports that the aircraft \"Robinson R-22\" visits?", + "SpiderSynQuestion": "What is the average total number of passengers for all aerodromes that the airplane \"Robinson R-22\" visits?", + "query": "SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = \"Robinson R-22\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "Please list the location and the winning aircraft name.", + "SpiderSynQuestion": "Please list the address and the winning airplane name.", + "query": "SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the location and name of the winning aircraft?", + "SpiderSynQuestion": "What is the address and name of the winning airplane?", + "query": "SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List the name of the aircraft that has been named winning aircraft the most number of times.", + "SpiderSynQuestion": "List the name of the airplane that has been named winning aircraft the most number of times.", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the name of the aircraft that has won an award the most?", + "SpiderSynQuestion": "What is the name of the airplane that has won an award the most?", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List the names of aircrafts and the number of times it won matches.", + "SpiderSynQuestion": "List the names of airplanes and the number of times it won matches.", + "query": "SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "For each aircraft that has won an award, what is its name and how many time has it won?", + "SpiderSynQuestion": "For each airplane that has won an award, what is its name and how many time has it won?", + "query": "SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List names of all pilot in descending order of age.", + "SpiderSynQuestion": "List names of all aviator in descending order of age.", + "query": "SELECT Name FROM pilot ORDER BY Age DESC" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of all pilots listed by descending age?", + "SpiderSynQuestion": "What are the names of all aviators listed by descending age?", + "query": "SELECT Name FROM pilot ORDER BY Age DESC" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List the names of aircrafts and that won matches at least twice.", + "SpiderSynQuestion": "List the names of airplanes and that won matches at least twice.", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of all aircrafts that have won a match at least twice?", + "SpiderSynQuestion": "What are the names of all airplanes that have won a match at least twice?", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "List the names of aircrafts and that did not win any match.", + "SpiderSynQuestion": "List the names of airplanes and that did not win any match.", + "query": "SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of all aicrafts that have never won any match?", + "SpiderSynQuestion": "What are the names of all airplanes that have never won any match?", + "query": "SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "Show the names of aircrafts that are associated with both an airport named \"London Heathrow\" and an airport named \"London Gatwick\"", + "SpiderSynQuestion": "Show the names of airplanes that are associated with both an aerodrome named \"London Heathrow\" and an aerodrome named \"London Gatwick\"", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Heathrow\" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?", + "SpiderSynQuestion": "What are the names of all airplanes that are associated with both London Heathrow and Gatwick aerodromes?", + "query": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Heathrow\" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "Show all information on the airport that has the largest number of international passengers.", + "SpiderSynQuestion": "Show all information on the aerodrome that has the largest number of international passengers.", + "query": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is all the information on the airport with the largest number of international passengers?", + "SpiderSynQuestion": "What is all the information on the aerodrome with the largest number of international passengers?", + "query": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.", + "SpiderSynQuestion": "find the name and age of the aviator who has won the most number of times among the aviators who are younger than 30.", + "query": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What is the name and age of the pilot younger than 30 who has won the most number of times?", + "SpiderSynQuestion": "What is the name and age of the aviator younger than 30 who has won the most number of times?", + "query": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "what is the name and age of the youngest winning pilot?", + "SpiderSynQuestion": "what is the name and age of the youngest winning aviator?", + "query": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "How old is the youngest winning pilot and what is their name?", + "SpiderSynQuestion": "How old is the youngest winning aviator and what is their name?", + "query": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "find the name of pilots who did not win the matches held in the country of Australia.", + "SpiderSynQuestion": "find the name of aviators who did not win the matches held in the country of Australia.", + "query": "SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')" + }, + { + "db_id": "aircraft", + "SpiderQuestion": "What are the names of the pilots that have not won any matches in Australia?", + "SpiderSynQuestion": "What are the names of the aviators that have not won any matches in Australia?", + "query": "SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "How many residents does each property have? List property id and resident count.", + "SpiderSynQuestion": "How many inhabitants does each property have? List property id and inhabitant count.", + "query": "SELECT T1.property_id , count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?", + "SpiderSynQuestion": "What is the different categories of service that are provided by the organization which has detail 'Denesik and Sons Party'?", + "query": "SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count.", + "SpiderSynQuestion": "How many services has each inhabitant requested? List the inhabitant id, information, and the count in descending order of the count.", + "query": "SELECT T1.resident_id , T1.other_details , count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "What is the maximum number that a certain service is provided? List the service id, details and number.", + "SpiderSynQuestion": "What is the maximum number that a certain service is provided? List the service id, information and number.", + "query": "SELECT T1.service_id , T1.service_details , count(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "List the id and type of each thing, and the details of the organization that owns it.", + "SpiderSynQuestion": "List the id and category of each thing, and the information of the organization that owns it.", + "query": "SELECT T1.thing_id , T1.type_of_Thing_Code , T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "What are the id and details of the customers who have at least 3 events?", + "SpiderSynQuestion": "What are the id and information of the clients who have at least 3 events?", + "query": "SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "What is each customer's move in date, and the corresponding customer id and details?", + "SpiderSynQuestion": "What is each client's move in date, and the corresponding client id and information?", + "query": "SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "Which events have the number of notes between one and three? List the event id and the property id.", + "SpiderSynQuestion": "Which events have the number of notes between one and three? List the event id and the property id.", + "query": "SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'", + "SpiderSynQuestion": "What are the different id and category of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'", + "query": "SELECT DISTINCT T2.thing_id , T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?", + "SpiderSynQuestion": "How many different locations have the things with service information 'Unsatisfied' been located in?", + "query": "SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "How many different status codes of things are there?", + "SpiderSynQuestion": "How many different status codes of things are there?", + "query": "SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "Which organizations are not a parent organization of others? List the organization id.", + "SpiderSynQuestion": "Which organizations are not a parent organization of others? List the organization id.", + "query": "SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "When is the last day any resident moved in?", + "SpiderSynQuestion": "When is the last day any inhabitant moved in?", + "query": "SELECT max(date_moved_in) FROM Residents" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "What are the resident details containing the substring 'Miss'?", + "SpiderSynQuestion": "What are the inhabitant information containing the substring 'Miss'?", + "query": "SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "List the customer event id and the corresponding move in date and property id.", + "SpiderSynQuestion": "List the client event id and the corresponding move in date and property id.", + "query": "SELECT customer_event_id , date_moved_in , property_id FROM customer_events" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "How many customers did not have any event?", + "SpiderSynQuestion": "How many clients did not have any event?", + "query": "SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )" + }, + { + "db_id": "local_govt_and_lot", + "SpiderQuestion": "What are the distinct move in dates of the residents?", + "SpiderSynQuestion": "What are the different move in dates of the inhabitants?", + "query": "SELECT DISTINCT date_moved_in FROM residents" + }, + { + "db_id": "school_player", + "SpiderQuestion": "How many schools are there?", + "SpiderSynQuestion": "How many schools are there?", + "query": "SELECT count(*) FROM school" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Count the number of schools.", + "SpiderSynQuestion": "Count the number of schools.", + "query": "SELECT count(*) FROM school" + }, + { + "db_id": "school_player", + "SpiderQuestion": "List the locations of schools in ascending order of enrollment.", + "SpiderSynQuestion": "List the addresses of schools in ascending order of enrollment.", + "query": "SELECT LOCATION FROM school ORDER BY Enrollment ASC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What is the list of school locations sorted in ascending order of school enrollment?", + "SpiderSynQuestion": "What is the list of school addresses sorted in ascending order of school enrollment?", + "query": "SELECT LOCATION FROM school ORDER BY Enrollment ASC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "List the locations of schools in descending order of founded year.", + "SpiderSynQuestion": "List the addresses of schools in descending order of founded year.", + "query": "SELECT LOCATION FROM school ORDER BY Founded DESC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What is the list of school locations sorted in descending order of school foundation year?", + "SpiderSynQuestion": "What is the list of school addresses sorted in descending order of school foundation year?", + "query": "SELECT LOCATION FROM school ORDER BY Founded DESC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the enrollments of schools whose denomination is not \"Catholic\"?", + "SpiderSynQuestion": "How many students are enrolled in the schools whose denomination is not \"Catholic\"?", + "query": "SELECT Enrollment FROM school WHERE Denomination != \"Catholic\"" + }, + { + "db_id": "school_player", + "SpiderQuestion": "List the enrollment for each school that does not have \"Catholic\" as denomination.", + "SpiderSynQuestion": "List the number of students are enrolled in school that does not have \"Catholic\" as denomination.", + "query": "SELECT Enrollment FROM school WHERE Denomination != \"Catholic\"" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What is the average enrollment of schools?", + "SpiderSynQuestion": "What is the average number of students are enrolled in schools?", + "query": "SELECT avg(Enrollment) FROM school" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Take the average of the school enrollment.", + "SpiderSynQuestion": "Take the average number of students are enrolled in the schools.", + "query": "SELECT avg(Enrollment) FROM school" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the teams of the players, sorted in ascending alphabetical order?", + "SpiderSynQuestion": "What are the teams of the participants, sorted in ascending alphabetical order?", + "query": "SELECT Team FROM player ORDER BY Team ASC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Find the team of each player and sort them in ascending alphabetical order.", + "SpiderSynQuestion": "Find the team of each participant and sort them in ascending alphabetical order.", + "query": "SELECT Team FROM player ORDER BY Team ASC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "How many different positions of players are there?", + "SpiderSynQuestion": "How many different positions of participants are there?", + "query": "SELECT count(DISTINCT POSITION) FROM player" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Count the number of distinct player positions.", + "SpiderSynQuestion": "Count the number of different participant positions.", + "query": "SELECT count(DISTINCT POSITION) FROM player" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Find the team of the player of the highest age.", + "SpiderSynQuestion": "Find the team of the participant of the highest age.", + "query": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Which team has the oldest player?", + "SpiderSynQuestion": "Which team has the oldest participant?", + "query": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "List the teams of the players with the top 5 largest ages.", + "SpiderSynQuestion": "List the teams of the participants with the top 5 largest ages.", + "query": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the teams that have the 5 oldest players?", + "SpiderSynQuestion": "What are the teams that have the 5 oldest participants?", + "query": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5" + }, + { + "db_id": "school_player", + "SpiderQuestion": "For each player, show the team and the location of school they belong to.", + "SpiderSynQuestion": "For each participant, show the team and the address of school they belong to.", + "query": "SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the team and the location of school each player belongs to?", + "SpiderSynQuestion": "What are the team and the address of school each participant belongs to?", + "query": "SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Show the locations of schools that have more than 1 player.", + "SpiderSynQuestion": "Show the addresses of schools that have more than 1 player.", + "query": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Which schools have more than 1 player? Give me the school locations.", + "SpiderSynQuestion": "Which schools have more than 1 player? Give me the school addresses.", + "query": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Show the denomination of the school that has the most players.", + "SpiderSynQuestion": "Show the denomination of the school that has the most participants.", + "query": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What is the denomination of the school the most players belong to?", + "SpiderSynQuestion": "What is the denomination of the school the most participants belong to?", + "query": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Show locations and nicknames of schools.", + "SpiderSynQuestion": "Show addresses and monicker of schools.", + "query": "SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the location and nickname of each school?", + "SpiderSynQuestion": "What are the address and monicker of each school?", + "query": "SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Please show different denominations and the corresponding number of schools.", + "SpiderSynQuestion": "Please show different denominations and the corresponding number of schools.", + "query": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination" + }, + { + "db_id": "school_player", + "SpiderQuestion": "For each denomination, return the denomination and the count of schools with that denomination.", + "SpiderSynQuestion": "For each denomination, return the denomination and the count of schools with that denomination.", + "query": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Please show different denominations and the corresponding number of schools in descending order.", + "SpiderSynQuestion": "Please show different denominations and the corresponding number of schools in descending order.", + "query": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.", + "SpiderSynQuestion": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.", + "query": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC" + }, + { + "db_id": "school_player", + "SpiderQuestion": "List the school color of the school that has the largest enrollment.", + "SpiderSynQuestion": "List the school colour of the school that has the largest enrollment.", + "query": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What is the school color of the school with the largest enrollment?", + "SpiderSynQuestion": "What is the school colour of the school with the largest enrollment?", + "query": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "List the locations of schools that do not have any player.", + "SpiderSynQuestion": "List the addresses of schools that do not have any player.", + "query": "SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Which schools do not have any player? Give me the school locations.", + "SpiderSynQuestion": "Which schools do not have any player? Give me the school addresses.", + "query": "SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Show the denomination shared by schools founded before 1890 and schools founded after 1900", + "SpiderSynQuestion": "Show the denomination shared by schools founded before 1890 and schools founded after 1900", + "query": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?", + "SpiderSynQuestion": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?", + "query": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Show the nicknames of schools that are not in division 1.", + "SpiderSynQuestion": "Show the monicker of schools that are not in division 1.", + "query": "SELECT Nickname FROM school_details WHERE Division != \"Division 1\"" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the nicknames of schools whose division is not 1?", + "SpiderSynQuestion": "What are the monicker of schools whose division is not 1?", + "query": "SELECT Nickname FROM school_details WHERE Division != \"Division 1\"" + }, + { + "db_id": "school_player", + "SpiderQuestion": "Show the denomination shared by more than one school.", + "SpiderSynQuestion": "Show the denomination shared by more than one school.", + "query": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1" + }, + { + "db_id": "school_player", + "SpiderQuestion": "What are the denomination more than one school have?", + "SpiderSynQuestion": "What are the denomination more than one school have?", + "query": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find all the distinct district names ordered by city area in descending.", + "SpiderSynQuestion": "Find all the different region names ordered by city area in descending.", + "query": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the different district names in order of descending city area?", + "SpiderSynQuestion": "What are the different region names in order of descending city area?", + "query": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the list of page size which have more than 3 product listed", + "SpiderSynQuestion": "Find the list of page size which have more than 3 goods listed", + "query": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*) > 3" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the maximum page size for everything that has more than 3 products listed?", + "SpiderSynQuestion": "What is the maximum page size for everything that has more than 3 goods listed?", + "query": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*) > 3" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the name and population of district with population between 200000 and 2000000", + "SpiderSynQuestion": "Find the name and populace of region with populace between 200000 and 2000000", + "query": "SELECT District_name , City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?", + "SpiderSynQuestion": "What are the region names and city populace for all regions that between 200,000 and 2,000,000 residents?", + "query": "SELECT District_name , City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the name all districts with city area greater than 10 or population larger than 100000", + "SpiderSynQuestion": "Find the name all regions with city area greater than 10 or the number of people larger than 100000", + "query": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?", + "SpiderSynQuestion": "What are the names of all regions with a city area greater than 10 or have more than 100000 people living there?", + "query": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Which district has the largest population?", + "SpiderSynQuestion": "Which region has the largest population?", + "query": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the name of the district with the most residents?", + "SpiderSynQuestion": "What is the name of the region with the most residents?", + "query": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Which district has the least area?", + "SpiderSynQuestion": "Which region has the least area?", + "query": "SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the name of the district with the smallest area?", + "SpiderSynQuestion": "What is the name of the region with the smallest area?", + "query": "SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the total population of the top 3 districts with the largest area.", + "SpiderSynQuestion": "Find the total number of people of the top 3 districts with the largest area.", + "query": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the total number of residents for the districts with the 3 largest areas?", + "SpiderSynQuestion": "What is the total number of residents for the districts with the 3 largest areas?", + "query": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find all types of store and number of them.", + "SpiderSynQuestion": "Find all categories of store and number of them.", + "query": "SELECT TYPE , count(*) FROM store GROUP BY TYPE" + }, + { + "db_id": "store_product", + "SpiderQuestion": "For each type of store, how many of them are there?", + "SpiderSynQuestion": "For each category of store, how many of them are there?", + "query": "SELECT TYPE , count(*) FROM store GROUP BY TYPE" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the names of all stores in Khanewal District.", + "SpiderSynQuestion": "Find the names of all stores in Khanewal District.", + "query": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = \"Khanewal District\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the names of all the stores located in Khanewal District?", + "SpiderSynQuestion": "What are the names of all the stores located in Khanewal District?", + "query": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = \"Khanewal District\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find all the stores in the district with the most population.", + "SpiderSynQuestion": "Find all the stores in the district with the most populace.", + "query": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the names of all the stores in the largest district by population?", + "SpiderSynQuestion": "What are the names of all the stores in the largest district by the number of people?", + "query": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Which city is the headquarter of the store named \"Blackville\" in?", + "SpiderSynQuestion": "Which city is the head office of the store named \"Blackville\" in?", + "query": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = \"Blackville\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What city is the headquarter of the store Blackville?", + "SpiderSynQuestion": "What city is the head office of the store Blackville?", + "query": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = \"Blackville\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the number of stores in each city.", + "SpiderSynQuestion": "Find the number of stores in each city.", + "query": "SELECT t3.headquartered_city , count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city" + }, + { + "db_id": "store_product", + "SpiderQuestion": "How many stores are headquarted in each city?", + "SpiderSynQuestion": "How many stores are headquarted in each city?", + "query": "SELECT t3.headquartered_city , count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the city with the most number of stores.", + "SpiderSynQuestion": "Find the city with the most number of stores.", + "query": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the city with the most number of flagship stores?", + "SpiderSynQuestion": "What is the city with the most number of flagship stores?", + "query": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the average pages per minute color?", + "SpiderSynQuestion": "What is the average pages per minute colour?", + "query": "SELECT avg(pages_per_minute_color) FROM product" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the average number of pages per minute color?", + "SpiderSynQuestion": "What is the average number of pages per minute colour?", + "query": "SELECT avg(pages_per_minute_color) FROM product" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What products are available at store named \"Miramichi\"?", + "SpiderSynQuestion": "What goods are available at store named \"Miramichi\"?", + "query": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = \"Miramichi\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What products are sold at the store named Miramichi?", + "SpiderSynQuestion": "What goods are sold at the store named Miramichi?", + "query": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = \"Miramichi\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find products with max page size as \"A4\" and pages per minute color smaller than 5.", + "SpiderSynQuestion": "Find goods with max page size as \"A4\" and pages per minute color smaller than 5.", + "query": "SELECT product FROM product WHERE max_page_size = \"A4\" AND pages_per_minute_color < 5" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?", + "SpiderSynQuestion": "What are the goods with the maximum page size A4 that also have a pages per minute color smaller than 5?", + "query": "SELECT product FROM product WHERE max_page_size = \"A4\" AND pages_per_minute_color < 5" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find products with max page size as \"A4\" or pages per minute color smaller than 5.", + "SpiderSynQuestion": "Find goods with max page size as \"A4\" or pages per minute color smaller than 5.", + "query": "SELECT product FROM product WHERE max_page_size = \"A4\" OR pages_per_minute_color < 5" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?", + "SpiderSynQuestion": "What are the goods with the maximum page size eqal to A4 or a pages per minute color less than 5?", + "query": "SELECT product FROM product WHERE max_page_size = \"A4\" OR pages_per_minute_color < 5" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find all the product whose name contains the word \"Scanner\".", + "SpiderSynQuestion": "Find all the goods whose name contains the word \"Scanner\".", + "query": "SELECT product FROM product WHERE product LIKE \"%Scanner%\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are all of the products whose name includes the substring \"Scanner\"?", + "SpiderSynQuestion": "What are all of the goods whose name includes the substring \"Scanner\"?", + "query": "SELECT product FROM product WHERE product LIKE \"%Scanner%\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the most prominent max page size among all the products.", + "SpiderSynQuestion": "Find the most prominent max page size among all the goods.", + "query": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the most common maximum page size?", + "SpiderSynQuestion": "What is the most common maximum page size?", + "query": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the name of the products that are not using the most frequently-used max page size.", + "SpiderSynQuestion": "Find the name of the goods that are not using the most frequently-used max page size.", + "query": "SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the names of all products that are not the most frequently-used maximum page size?", + "SpiderSynQuestion": "What are the names of all goods that are not the most frequently-used maximum page size?", + "query": "SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the total population of the districts where the area is bigger than the average city area.", + "SpiderSynQuestion": "Find the total populace of the districts where the area is bigger than the average city area.", + "query": "SELECT sum(city_population) FROM district WHERE city_area > (SELECT avg(city_area) FROM district)" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What is the total population for all the districts that have an area larger tahn the average city area?", + "SpiderSynQuestion": "What is the total populace for all the districts that have an area larger tahn the average city area?", + "query": "SELECT sum(city_population) FROM district WHERE city_area > (SELECT avg(city_area) FROM district)" + }, + { + "db_id": "store_product", + "SpiderQuestion": "Find the names of districts where have both city mall and village store type stores.", + "SpiderSynQuestion": "Find the names of regions where have both city mall and village store type stores.", + "query": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"City Mall\" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"Village Store\"" + }, + { + "db_id": "store_product", + "SpiderQuestion": "What are the names of the districts that have both mall and village store style shops?", + "SpiderSynQuestion": "What are the names of the regions that have both mall and village store style stores?", + "query": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"City Mall\" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"Village Store\"" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the total enrollment number of all colleges?", + "SpiderSynQuestion": "What is the total number of students are enrolled in all colleges?", + "query": "SELECT sum(enr) FROM College" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many students are enrolled in college?", + "SpiderSynQuestion": "How many students are enrolled in college?", + "query": "SELECT sum(enr) FROM College" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the average enrollment number?", + "SpiderSynQuestion": "What is the average number of students are enrolled in college?", + "query": "SELECT avg(enr) FROM College" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many students, on average, does each college have enrolled?", + "SpiderSynQuestion": "How many students, on average, does each school have enrolled?", + "query": "SELECT avg(enr) FROM College" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many colleges in total?", + "SpiderSynQuestion": "How many schools in total?", + "query": "SELECT count(*) FROM College" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many different colleges are there?", + "SpiderSynQuestion": "How many different schools are there?", + "query": "SELECT count(*) FROM College" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many players have more than 1000 hours of training?", + "SpiderSynQuestion": "How many participants have more than 1000 hours of training?", + "query": "SELECT count(*) FROM Player WHERE HS > 1000" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many different players trained for more than 1000 hours?", + "SpiderSynQuestion": "How many different participants trained for more than 1000 hours?", + "query": "SELECT count(*) FROM Player WHERE HS > 1000" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many colleges has more than 15000 students?", + "SpiderSynQuestion": "How many schools has more than 15000 students?", + "query": "SELECT count(*) FROM College WHERE enr > 15000" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the number of colleges with a student population greater than 15000?", + "SpiderSynQuestion": "What is the number of schools with a student population greater than 15000?", + "query": "SELECT count(*) FROM College WHERE enr > 15000" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the average training hours of all players?", + "SpiderSynQuestion": "What is the average training hours of all participants?", + "query": "SELECT avg(HS) FROM Player" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many hours do the players train on average?", + "SpiderSynQuestion": "How many hours do the participants train on average?", + "query": "SELECT avg(HS) FROM Player" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name and training hours of players whose hours are below 1500.", + "SpiderSynQuestion": "Find the name and training hours of participants whose hours are below 1500.", + "query": "SELECT pName , HS FROM Player WHERE HS < 1500" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?", + "SpiderSynQuestion": "What are the names and number of hours spent training for each participant who trains for less than 1500 hours?", + "query": "SELECT pName , HS FROM Player WHERE HS < 1500" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many different colleges do attend the tryout test?", + "SpiderSynQuestion": "How many different schools do attend the tryout test?", + "query": "SELECT count(DISTINCT cName) FROM tryout" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many different colleges were represented at tryouts?", + "SpiderSynQuestion": "How many different schools were represented at tryouts?", + "query": "SELECT count(DISTINCT cName) FROM tryout" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the unique types of player positions in the tryout?", + "SpiderSynQuestion": "What are the unique types of player positions in the tryout?", + "query": "SELECT count(DISTINCT pPos) FROM tryout" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the different types of player positions?", + "SpiderSynQuestion": "What are the different types of player positions?", + "query": "SELECT count(DISTINCT pPos) FROM tryout" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many students got accepted after the tryout?", + "SpiderSynQuestion": "How many students got accepted after the tryout?", + "query": "SELECT count(*) FROM tryout WHERE decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many students received a yes from tryouts?", + "SpiderSynQuestion": "How many students received a yes from tryouts?", + "query": "SELECT count(*) FROM tryout WHERE decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many students whose are playing the role of goalie?", + "SpiderSynQuestion": "How many students whose are playing the role of goalie?", + "query": "SELECT count(*) FROM tryout WHERE pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the number of students playing as a goalie?", + "SpiderSynQuestion": "What is the number of students playing as a goalie?", + "query": "SELECT count(*) FROM tryout WHERE pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the max, average and min training hours of all players.", + "SpiderSynQuestion": "Find the max, average and min training hours of all participants.", + "query": "SELECT avg(HS) , max(HS) , min(HS) FROM Player" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the average, maximum, and minimum for the number of hours spent training?", + "SpiderSynQuestion": "What is the average, maximum, and minimum for the number of hours spent training?", + "query": "SELECT avg(HS) , max(HS) , min(HS) FROM Player" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is average enrollment of colleges in the state FL?", + "SpiderSynQuestion": "What is average number of students enrolled in colleges in the state FL?", + "query": "SELECT avg(enr) FROM College WHERE state = 'FL'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is average number of students enrolled in Florida colleges?", + "SpiderSynQuestion": "What is average number of students enrolled in Florida colleges?", + "query": "SELECT avg(enr) FROM College WHERE state = 'FL'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of players whose training hours is between 500 and 1500?", + "SpiderSynQuestion": "What are the names of participants whose training hours is between 500 and 1500?", + "query": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of players who train between 500 and 1500 hours?", + "SpiderSynQuestion": "What are the names of participants who train between 500 and 1500 hours?", + "query": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the players whose names contain letter 'a'.", + "SpiderSynQuestion": "Find the participants whose names contain letter 'a'.", + "query": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Who are the players that have names containing the letter a?", + "SpiderSynQuestion": "Who are the participants that have names containing the letter a?", + "query": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.", + "SpiderSynQuestion": "Find the name, number of students enrolled in colleges whose size is bigger than 10000 and location is in state LA.", + "query": "SELECT cName , enr FROM College WHERE enr > 10000 AND state = \"LA\"" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?", + "SpiderSynQuestion": "What are the names and number of students enrolled in colleges that have more than 10000 enrolled and are located in Louisiana?", + "query": "SELECT cName , enr FROM College WHERE enr > 10000 AND state = \"LA\"" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "List all information about college sorted by enrollment number in the ascending order.", + "SpiderSynQuestion": "List all detail about school sorted by enrollment number in the ascending order.", + "query": "SELECT * FROM College ORDER BY enr" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What information do you have on colleges sorted by increasing enrollment numbers?", + "SpiderSynQuestion": "What detail do you have on colleges sorted by increasing enrollment numbers?", + "query": "SELECT * FROM College ORDER BY enr" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.", + "SpiderSynQuestion": "List the name of the schools whose enrollment is greater 18000 sorted by the school's name.", + "query": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the name of every college in alphabetical order that has more than 18000 students enrolled?", + "SpiderSynQuestion": "What is the name of every school in alphabetical order that has more than 18000 students enrolled?", + "query": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name of players whose card is yes in the descending order of training hours.", + "SpiderSynQuestion": "Find the name of participants whose card is yes in the descending order of training hours.", + "query": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the name of the players who received a card in descending order of the hours of training?", + "SpiderSynQuestion": "What are the name of the participants who received a card in descending order of the hours of training?", + "query": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name of different colleges involved in the tryout in alphabetical order.", + "SpiderSynQuestion": "Find the name of different schools involved in the tryout in alphabetical order.", + "query": "SELECT DISTINCT cName FROM tryout ORDER BY cName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the different names of the colleges involved in the tryout in alphabetical order?", + "SpiderSynQuestion": "What are the different names of the schools involved in the tryout in alphabetical order?", + "query": "SELECT DISTINCT cName FROM tryout ORDER BY cName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Which position is most popular among players in the tryout?", + "SpiderSynQuestion": "Which position is most popular among players in the tryout?", + "query": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What was the most popular position at tryouts?", + "SpiderSynQuestion": "What was the most popular position at tryouts?", + "query": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the number of students who participate in the tryout for each college ordered by descending count.", + "SpiderSynQuestion": "Find the number of students who participate in the tryout for each college ordered by descending count.", + "query": "SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many students participated in tryouts for each college by descennding count?", + "SpiderSynQuestion": "How many students participated in tryouts for each college by descennding count?", + "query": "SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is minimum hours of the students playing in different position?", + "SpiderSynQuestion": "What is minimum hours of the students playing in different position?", + "query": "SELECT min(T2.HS) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "For each position, what is the minimum time students spent practicing?", + "SpiderSynQuestion": "For each position, what is the minimum time students spent practicing?", + "query": "SELECT min(T2.HS) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of schools with the top 3 largest size?", + "SpiderSynQuestion": "What are the names of schools with the top 3 largest size?", + "query": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of the schools with the top 3 largest class sizes?", + "SpiderSynQuestion": "What are the names of the schools with the top 3 largest class sizes?", + "query": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the name of school that has the smallest enrollment in each state?", + "SpiderSynQuestion": "What is the name of school that has the smallest enrollment in each state?", + "query": "SELECT cName , state , min(enr) FROM college GROUP BY state" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the name of the school with smallest enrollment size per state?", + "SpiderSynQuestion": "What is the name of the school with smallest enrollment size per state?", + "query": "SELECT cName , state , min(enr) FROM college GROUP BY state" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the states where have some college students in tryout.", + "SpiderSynQuestion": "Find the states where have some school students in tryout.", + "query": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the different states that have students trying out?", + "SpiderSynQuestion": "What are the different states that have students trying out?", + "query": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the states where have some college students in tryout and their decisions are yes.", + "SpiderSynQuestion": "Find the states where have some school students in tryout and their decisions are yes.", + "query": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the different states that had students successfully try out?", + "SpiderSynQuestion": "What are the different states that had students successfully try out?", + "query": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name and college of students whose decisions are yes in the tryout.", + "SpiderSynQuestion": "Find the name and school of students whose decisions are yes in the tryout.", + "query": "SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?", + "SpiderSynQuestion": "What are the names of all the participants who received a yes during tryouts, and also what are the names of their colleges?", + "query": "SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name of all students who were in the tryout sorted in alphabetic order.", + "SpiderSynQuestion": "Find the name of all students who were in the tryout sorted in alphabetic order.", + "query": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of all students who tried out in alphabetical order?", + "SpiderSynQuestion": "What are the names of all students who tried out in alphabetical order?", + "query": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name and hours of the students whose tryout decision is yes.", + "SpiderSynQuestion": "Find the name and hours of the students whose tryout decision is yes.", + "query": "SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names and hours spent practicing of every student who received a yes at tryouts?", + "SpiderSynQuestion": "What are the names and hours spent practicing of every student who received a yes at tryouts?", + "query": "SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the states of the colleges that have students in the tryout who played in striker position.", + "SpiderSynQuestion": "Find the states of the schools that have students in the tryout who played in striker position.", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the states of the colleges where students who tried out for the striker position attend?", + "SpiderSynQuestion": "What are the states of the schools where students who tried out for the striker position attend?", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the names of the students who are in the position of striker and got a yes tryout decision.", + "SpiderSynQuestion": "Find the names of the students who are in the position of striker and got a yes tryout decision.", + "query": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of all students who successfully tried out for the position of striker?", + "SpiderSynQuestion": "What are the names of all students who successfully tried out for the position of striker?", + "query": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the state of the college which player Charles is attending.", + "SpiderSynQuestion": "Find the state of the school which player Charles is attending.", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "In which state is the college that Charles attends?", + "SpiderSynQuestion": "In which state is the school that Charles attends?", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the average and maximum hours for the students whose tryout decision is yes.", + "SpiderSynQuestion": "Find the average and maximum hours for the students whose tryout decision is yes.", + "query": "SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the average and maximum number of hours students who made the team practiced?", + "SpiderSynQuestion": "What is the average and maximum number of hours students who made the team practiced?", + "query": "SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the average hours for the students whose tryout decision is no.", + "SpiderSynQuestion": "Find the average hours for the students whose tryout decision is no.", + "query": "SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the average number of hours spent practicing for students who got rejected?", + "SpiderSynQuestion": "What is the average number of hours spent practicing for students who got rejected?", + "query": "SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?", + "SpiderSynQuestion": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?", + "query": "SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?", + "SpiderSynQuestion": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?", + "query": "SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Which colleges do the tryout players whose name starts with letter D go to?", + "SpiderSynQuestion": "Which colleges do the tryout players whose name starts with letter D go to?", + "query": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Which colleges does each player with a name that starts with the letter D who tried out go to?", + "SpiderSynQuestion": "Which colleges does each player with a name that starts with the letter D who tried out go to?", + "query": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Which college has any student who is a goalie and succeeded in the tryout.", + "SpiderSynQuestion": "Which college has any student who is a goalie and succeeded in the tryout.", + "query": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What college has a student who successfully made the team in the role of a goalie?", + "SpiderSynQuestion": "What college has a student who successfully made the team in the role of a goalie?", + "query": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the name of the tryout players who are from the college with largest size.", + "SpiderSynQuestion": "Find the name of the tryout players who are from the college with largest size.", + "query": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of all tryout participants who are from the largest college?", + "SpiderSynQuestion": "What are the names of all tryout participants who are from the largest college?", + "query": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.", + "SpiderSynQuestion": "What is the state and number of student enrolled in colleges where have any students who got accepted in the tryout decision.", + "query": "SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?", + "SpiderSynQuestion": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?", + "query": "SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.", + "SpiderSynQuestion": "Find the names of either schools in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.", + "query": "SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\"" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?", + "SpiderSynQuestion": "What are the names of schools in LA that have more than 15,000 students and of schools in AZ with less than 13,000 students?", + "query": "SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\"" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the names of schools that have some students playing in goalie and mid positions.", + "SpiderSynQuestion": "Find the names of schools that have some students playing in goalie and mid positions.", + "query": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.", + "SpiderSynQuestion": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.", + "query": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the names of states that have some college students playing in goalie and mid positions.", + "SpiderSynQuestion": "Find the names of states that have some school students playing in goalie and mid positions.", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?", + "SpiderSynQuestion": "What are the names of the states that have some school students playing in the positions of goalie and mid-field?", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many schools have some students playing in goalie and mid positions.", + "SpiderSynQuestion": "How many schools have some students playing in goalie and mid positions.", + "query": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many schools have students playing in goalie and mid-field positions?", + "SpiderSynQuestion": "How many schools have students playing in goalie and mid-field positions?", + "query": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the names of schools that have some players in the mid position but not in the goalie position.", + "SpiderSynQuestion": "Find the names of schools that have some players in the mid position but not in the goalie position.", + "query": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of the schools with some players in the mid position but no goalies?", + "SpiderSynQuestion": "What are the names of the schools with some players in the mid position but no goalies?", + "query": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the names of states that have some college students playing in the mid position but not in the goalie position.", + "SpiderSynQuestion": "Find the names of states that have some school students playing in the mid position but not in the goalie position.", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of all the states with college students playing in the mid position but no goalies?", + "SpiderSynQuestion": "What are the names of all the states with school students playing in the mid position but no goalies?", + "query": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many states that have some college students playing in the mid position but not in the goalie position.", + "SpiderSynQuestion": "How many states that have some college students playing in the mid position but not in the goalie position.", + "query": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the count of states with college students playing in the mid position but not as goalies?", + "SpiderSynQuestion": "What is the count of states with school students playing in the mid position but not as goalies?", + "query": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find the states where have the colleges whose enrollments are less than the largest size.", + "SpiderSynQuestion": "Find the states where have the schools whose enrollments are less than the largest size.", + "query": "SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the states with colleges that have enrollments less than the some other college?", + "SpiderSynQuestion": "What are the states with schools that have enrollments less than the some other school?", + "query": "SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.", + "SpiderSynQuestion": "Find names of schools with enrollment greater than that of some (at least one) school in the FL state.", + "query": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of the colleges that are larger than at least one college in Florida?", + "SpiderSynQuestion": "What are the names of the schools that are larger than at least one school in Florida?", + "query": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.", + "SpiderSynQuestion": "Find names of all schools whose enrollment is greater than that of all schools in the FL state.", + "query": "SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What are the names of all colleges with a larger enrollment than the largest college in Florida?", + "SpiderSynQuestion": "What are the names of all schools with a larger enrollment than the largest school in Florida?", + "query": "SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the total number of enrollment of schools that do not have any goalie player?", + "SpiderSynQuestion": "What is the total number of student enrolled in schools that do not have any goalie player?", + "query": "SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the total number of students enrolled in schools without any goalies?", + "SpiderSynQuestion": "What is the total number of students enrolled in schools without any goalies?", + "query": "SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the number of states that has some college whose enrollment is larger than the average enrollment?", + "SpiderSynQuestion": "What is the number of states that has some school whose enrollment is larger than the average enrollment?", + "query": "SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many states have a college with more students than average?", + "SpiderSynQuestion": "How many states have a school with more students than average?", + "query": "SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?", + "SpiderSynQuestion": "What is the number of states that has some schools whose enrollment is smaller than the average enrollment?", + "query": "SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)" + }, + { + "db_id": "soccer_2", + "SpiderQuestion": "How many states have smaller colleges than average?", + "SpiderSynQuestion": "How many states have smaller schools than average?", + "query": "SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)" + }, + { + "db_id": "device", + "SpiderQuestion": "How many devices are there?", + "SpiderSynQuestion": "How many equipments are there?", + "query": "SELECT count(*) FROM device" + }, + { + "db_id": "device", + "SpiderQuestion": "Count the number of devices.", + "SpiderSynQuestion": "Count the number of equipments.", + "query": "SELECT count(*) FROM device" + }, + { + "db_id": "device", + "SpiderQuestion": "List the carriers of devices in ascending alphabetical order.", + "SpiderSynQuestion": "List the carriers of equipments in ascending alphabetical order.", + "query": "SELECT Carrier FROM device ORDER BY Carrier ASC" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the different carriers for devices, listed in alphabetical order?", + "SpiderSynQuestion": "What are the different carriers for equipments, listed in alphabetical order?", + "query": "SELECT Carrier FROM device ORDER BY Carrier ASC" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the carriers of devices whose software platforms are not \"Android\"?", + "SpiderSynQuestion": "What are the carriers of equipments whose software platforms are not \"Android\"?", + "query": "SELECT Carrier FROM device WHERE Software_Platform != 'Android'" + }, + { + "db_id": "device", + "SpiderQuestion": "Return the device carriers that do not have Android as their software platform.", + "SpiderSynQuestion": "Return the equipment carriers that do not have Android as their software platform.", + "query": "SELECT Carrier FROM device WHERE Software_Platform != 'Android'" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the names of shops in ascending order of open year?", + "SpiderSynQuestion": "What are the names of stores in ascending order of open year?", + "query": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC" + }, + { + "db_id": "device", + "SpiderQuestion": "Return the names of shops, ordered by year of opening ascending.", + "SpiderSynQuestion": "Return the names of stores, ordered by year of opening ascending.", + "query": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC" + }, + { + "db_id": "device", + "SpiderQuestion": "What is the average quantity of stocks?", + "SpiderSynQuestion": "What is the average amount of stocks?", + "query": "SELECT avg(Quantity) FROM stock" + }, + { + "db_id": "device", + "SpiderQuestion": "Give the average quantity of stocks.", + "SpiderSynQuestion": "Give the average amount of stocks.", + "query": "SELECT avg(Quantity) FROM stock" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the names and location of the shops in ascending alphabetical order of name.", + "SpiderSynQuestion": "What are the names and position of the stores in ascending alphabetical order of name.", + "query": "SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC" + }, + { + "db_id": "device", + "SpiderQuestion": "Return the names and locations of shops, ordered by name in alphabetical order.", + "SpiderSynQuestion": "Return the names and positions of stores, ordered by name in alphabetical order.", + "query": "SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC" + }, + { + "db_id": "device", + "SpiderQuestion": "How many different software platforms are there for devices?", + "SpiderSynQuestion": "How many different software platforms are there for equipments?", + "query": "SELECT count(DISTINCT Software_Platform) FROM device" + }, + { + "db_id": "device", + "SpiderQuestion": "Count the number of different software platforms.", + "SpiderSynQuestion": "Count the number of different software platforms.", + "query": "SELECT count(DISTINCT Software_Platform) FROM device" + }, + { + "db_id": "device", + "SpiderQuestion": "List the open date of open year of the shop named \"Apple\".", + "SpiderSynQuestion": "List the start day of start year of the store named \"Apple\".", + "query": "SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = \"Apple\"" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the open dates and years for the shop named Apple?", + "SpiderSynQuestion": "What are the start days and years for the store named Apple?", + "query": "SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = \"Apple\"" + }, + { + "db_id": "device", + "SpiderQuestion": "List the name of the shop with the latest open year.", + "SpiderSynQuestion": "List the name of the store with the latest start year.", + "query": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "What is the shop name corresponding to the shop that opened in the most recent year?", + "SpiderSynQuestion": "What is the store name corresponding to the shop that opened in the most recent year?", + "query": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "Show names of shops and the carriers of devices they have in stock.", + "SpiderSynQuestion": "Show names of stores and the carriers of devices they have in stock.", + "query": "SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the names of device shops, and what are the carriers that they carry devices in stock for?", + "SpiderSynQuestion": "What are the names of device stores, and what are the carriers that they carry devices in stock for?", + "query": "SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID" + }, + { + "db_id": "device", + "SpiderQuestion": "Show names of shops that have more than one kind of device in stock.", + "SpiderSynQuestion": "Show names of stores that have more than one kind of device in stock.", + "query": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the names of shops that have more than a single kind of device in stock?", + "SpiderSynQuestion": "What are the names of stores that have more than a single kind of device in stock?", + "query": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "device", + "SpiderQuestion": "Show the name of the shop that has the most kind of devices in stock.", + "SpiderSynQuestion": "Show the name of the store that has the most kind of devices in stock.", + "query": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "What is the name of the shop that has the most different kinds of devices in stock?", + "SpiderSynQuestion": "What is the name of the store that has the most different kinds of devices in stock?", + "query": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "Show the name of the shop that have the largest quantity of devices in stock.", + "SpiderSynQuestion": "Show the name of the store that have the largest quantity of devices in stock.", + "query": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "What is the name of the shop that has the greatest quantity of devices in stock?", + "SpiderSynQuestion": "What is the name of the store that has the greatest amount of devices in stock?", + "query": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "Please show different software platforms and the corresponding number of devices using each.", + "SpiderSynQuestion": "Please show different software platforms and the corresponding number of equipments using each.", + "query": "SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the different software platforms for devices, and how many devices have each?", + "SpiderSynQuestion": "What are the different software platforms for equipments, and how many equipments have each?", + "query": "SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform" + }, + { + "db_id": "device", + "SpiderQuestion": "Please show the software platforms of devices in descending order of the count.", + "SpiderSynQuestion": "Please show the software platforms of equipments in descending order of the count.", + "query": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the different software platforms for devices, ordered by frequency descending?", + "SpiderSynQuestion": "What are the different software platforms for equipments, ordered by frequency descending?", + "query": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC" + }, + { + "db_id": "device", + "SpiderQuestion": "List the software platform shared by the greatest number of devices.", + "SpiderSynQuestion": "List the software platform shared by the greatest number of equipments.", + "query": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "What is the software platform that is most common amongst all devices?", + "SpiderSynQuestion": "What is the software platform that is most common amongst all equipments?", + "query": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "device", + "SpiderQuestion": "List the names of shops that have no devices in stock.", + "SpiderSynQuestion": "List the names of stores that have no devices in stock.", + "query": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the names of shops that do not have any devices in stock?", + "SpiderSynQuestion": "What are the names of stores that do not have any devices in stock?", + "query": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)" + }, + { + "db_id": "device", + "SpiderQuestion": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.", + "SpiderSynQuestion": "Show the positions shared by stores with open year later than 2012 and stores with open year before 2008.", + "query": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008" + }, + { + "db_id": "device", + "SpiderQuestion": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?", + "SpiderSynQuestion": "Which positions contains both stores that opened after the year 2012 and stores that opened before 2008?", + "query": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008" + }, + { + "db_id": "device", + "SpiderQuestion": "List the carriers of devices that have no devices in stock.", + "SpiderSynQuestion": "List the carriers of equipments that have no equipments in stock.", + "query": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the carriers of devices that are not in stock anywhere?", + "SpiderSynQuestion": "What are the carriers of equipments that are not in stock anywhere?", + "query": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)" + }, + { + "db_id": "device", + "SpiderQuestion": "Show the carriers of devices in stock at more than one shop.", + "SpiderSynQuestion": "Show the carriers of equipments in stock at more than one shop.", + "query": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "device", + "SpiderQuestion": "What are the carriers of devices that are in stock in more than a single shop?", + "SpiderSynQuestion": "What are the carriers of equipments that are in stock in more than a single shop?", + "query": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "How many bookings do we have?", + "SpiderSynQuestion": "How many reservations do we have?", + "query": "SELECT count(*) FROM BOOKINGS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Count the total number of bookings made.", + "SpiderSynQuestion": "Count the total number of reservations made.", + "query": "SELECT count(*) FROM BOOKINGS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "List the order dates of all the bookings.", + "SpiderSynQuestion": "List the order dates of all the reservations.", + "query": "SELECT Order_Date FROM BOOKINGS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the order date of each booking?", + "SpiderSynQuestion": "What is the order date of each reservation?", + "query": "SELECT Order_Date FROM BOOKINGS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show all the planned delivery dates and actual delivery dates of bookings.", + "SpiderSynQuestion": "Show all the scheduled delivery days and actual delivery days of reservations.", + "query": "SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the planned delivery date and actual delivery date for each booking?", + "SpiderSynQuestion": "What are the scheduled delivery day and actual delivery day for each reservation?", + "query": "SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "How many customers do we have?", + "SpiderSynQuestion": "How many clients do we have?", + "query": "SELECT count(*) FROM CUSTOMERS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Count the number of customers recorded.", + "SpiderSynQuestion": "Count the number of clients recorded.", + "query": "SELECT count(*) FROM CUSTOMERS" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the phone and email for customer Harold?", + "SpiderSynQuestion": "What are the telephone and email for client Harold?", + "query": "SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = \"Harold\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the phone number and email address of customer \"Harold\".", + "SpiderSynQuestion": "Find the telephone number and email address of client \"Harold\".", + "query": "SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = \"Harold\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show all the Store_Name of drama workshop groups.", + "SpiderSynQuestion": "Show all the shop name of drama workshop groups.", + "query": "SELECT Store_Name FROM Drama_Workshop_Groups" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the store names of drama workshop groups?", + "SpiderSynQuestion": "What are the store names of drama workshop groups?", + "query": "SELECT Store_Name FROM Drama_Workshop_Groups" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show the minimum, average, maximum order quantity of all invoices.", + "SpiderSynQuestion": "Show the minimum, average, maximum number of order of all invoices.", + "query": "SELECT min(Order_Quantity) , avg(Order_Quantity) , max(Order_Quantity) FROM INVOICES" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.", + "SpiderSynQuestion": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.", + "query": "SELECT min(Order_Quantity) , avg(Order_Quantity) , max(Order_Quantity) FROM INVOICES" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the distinct payment method codes in all the invoices?", + "SpiderSynQuestion": "What are the different payment method codes in all the invoices?", + "query": "SELECT DISTINCT payment_method_code FROM INVOICES" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show me the distinct payment method codes from the invoice record.", + "SpiderSynQuestion": "Show me the different payment method codes from the invoice record.", + "query": "SELECT DISTINCT payment_method_code FROM INVOICES" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the description of the marketing region China?", + "SpiderSynQuestion": "What is the describing content of the China market district?", + "query": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = \"China\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the marketing region description of China?", + "SpiderSynQuestion": "Find the marketing district description of China?", + "query": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = \"China\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show all the distinct product names with price higher than the average.", + "SpiderSynQuestion": "Show all the different goods names with price higher than the average.", + "query": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT avg(Product_Price) FROM PRODUCTS)" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the distinct names of the products that cost more than the average?", + "SpiderSynQuestion": "What are the different names of the goods that cost more than the average?", + "query": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT avg(Product_Price) FROM PRODUCTS)" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the name of the most expensive product?", + "SpiderSynQuestion": "What is the name of the most expensive goods?", + "query": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Tell me the name of the most pricy product.", + "SpiderSynQuestion": "Tell me the name of the most pricy goods.", + "query": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "List all product names in ascending order of price.", + "SpiderSynQuestion": "List all goods names in ascending order of price.", + "query": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Sort the names of products in ascending order of their price.", + "SpiderSynQuestion": "Sort the names of goods in ascending order of their price.", + "query": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the phone number of the performer Ashley?", + "SpiderSynQuestion": "What is the telephone number of the performer Ashley?", + "query": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = \"Ashley\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the phone number of performer \"Ashley\".", + "SpiderSynQuestion": "Find the telephone number of performer \"Ashley\".", + "query": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = \"Ashley\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show all payment method codes and the number of orders for each code.", + "SpiderSynQuestion": "Show all payment method codes and the number of orders for each code.", + "query": "SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "List the distinct payment method codes with the number of orders made", + "SpiderSynQuestion": "List the distinct payment method codes with the number of orders made", + "query": "SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the payment method code used by the most orders?", + "SpiderSynQuestion": "What is the payment method code used by the most orders?", + "query": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the payment method that is used the most often in all the invoices. Give me its code.", + "SpiderSynQuestion": "Find the payment method that is used the most often in all the invoices. Give me its code.", + "query": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Which city is the address of the store named \"FJA Filming\" located in?", + "SpiderSynQuestion": "Which city is the location of the store named \"FJA Filming\" located in?", + "query": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = \"FJA Filming\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the city the store named \"FJA Filming\" is in.", + "SpiderSynQuestion": "Find the city the store named \"FJA Filming\" is in.", + "query": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = \"FJA Filming\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the states or counties of the address of the stores with marketing region code \"CA\"?", + "SpiderSynQuestion": "What are the states or counties of the location of the stores with marketing region code \"CA\"?", + "query": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = \"CA\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the states or counties where the stores with marketing region code \"CA\" are located.", + "SpiderSynQuestion": "Find the states or counties where the stores with marketing region code \"CA\" are located.", + "query": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = \"CA\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the name of the marketing region that the store Rob Dinning belongs to?", + "SpiderSynQuestion": "What is the name of the marketing district that the store Rob Dinning belongs to?", + "query": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = \"Rob Dinning\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Return the name of the marketing region the store Rob Dinning is located in.", + "SpiderSynQuestion": "Return the name of the marketing district the store Rob Dinning is located in.", + "query": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = \"Rob Dinning\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the descriptions of the service types with product price above 100?", + "SpiderSynQuestion": "What are the describing details of the service types with goods price above 100?", + "query": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Give me the descriptions of the service types that cost more than 100.", + "SpiderSynQuestion": "Give me the describing details of the service types that cost more than 100.", + "query": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the description, code and the corresponding count of each service type?", + "SpiderSynQuestion": "What is the describing content, code and the corresponding count of each service type?", + "query": "SELECT T1.Service_Type_Description , T2.Service_Type_Code , COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "List the description, code and the number of services for each service type.", + "SpiderSynQuestion": "List the describing content, code and the number of services for each service type.", + "query": "SELECT T1.Service_Type_Description , T2.Service_Type_Code , COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the description and code of the type of service that is performed the most often?", + "SpiderSynQuestion": "What is the describing content and code of the type of service that is performed the most often?", + "query": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the description and code of the service type that is performed the most times.", + "SpiderSynQuestion": "Find the describing content and code of the service type that is performed the most times.", + "query": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the phones and emails of workshop groups in which services are performed?", + "SpiderSynQuestion": "What are the telephones and emails of workshop groups in which services are performed?", + "query": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Give me all the phone numbers and email addresses of the workshop groups where services are performed.", + "SpiderSynQuestion": "Give me all the telephone numbers and email addresses of the workshop groups where services are performed.", + "query": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the names of workshop groups in which services with product name \"film\" are performed?", + "SpiderSynQuestion": "What are the names of workshop groups in which services with goods name \"film\" are performed?", + "query": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = \"film\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the names of the workshop groups where services with product name \"film\" are performed.", + "SpiderSynQuestion": "Find the names of the workshop groups where services with goods name \"film\" are performed.", + "query": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = \"film\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the different product names? What is the average product price for each of them?", + "SpiderSynQuestion": "What are the different goods names? What is the average goods price for each of them?", + "query": "SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "For each distinct product name, show its average product price.", + "SpiderSynQuestion": "For each different goods name, show its average goods price.", + "query": "SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the product names with average product price smaller than 1000000?", + "SpiderSynQuestion": "What are the goods names with average goods price smaller than 1000000?", + "query": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price) < 1000000" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the product names whose average product price is below 1000000.", + "SpiderSynQuestion": "Find the goods names whose average goods price is below 1000000.", + "query": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price) < 1000000" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the total order quantities of photo products?", + "SpiderSynQuestion": "What are the total number of order of photo goods?", + "query": "SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = \"photo\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Compute the total order quantities of the product \"photo\".", + "SpiderSynQuestion": "Compute the total number of order of the goods \"photo\".", + "query": "SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = \"photo\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the order details of the products with price higher than 2000?", + "SpiderSynQuestion": "What are the order information of the goods with price higher than 2000?", + "query": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the order detail for the products with price above 2000.", + "SpiderSynQuestion": "Find the order information for the goods with price above 2000.", + "query": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the actual delivery dates of orders with quantity 1?", + "SpiderSynQuestion": "What are the actual delivery dates of orders with quantity 1?", + "query": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "List the actual delivery date for all the orders with quantity 1", + "SpiderSynQuestion": "List the actual delivery date for all the orders with quantity 1", + "query": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the order dates of orders with price higher than 1000?", + "SpiderSynQuestion": "What are the order days of orders with price higher than 1000?", + "query": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the order dates of the orders with price above 1000.", + "SpiderSynQuestion": "Find the order days of the orders with price above 1000.", + "query": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "How many distinct currency codes are there for all drama workshop groups?", + "SpiderSynQuestion": "How many different currency codes are there for all drama workshop groups?", + "query": "SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the number of distinct currency codes used in drama workshop groups.", + "SpiderSynQuestion": "Find the number of different currency codes used in drama workshop groups.", + "query": "SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the names of the drama workshop groups with address in Feliciaberg city?", + "SpiderSynQuestion": "What are the names of the drama workshop groups with location in Feliciaberg city?", + "query": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = \"Feliciaberg\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Return the the names of the drama workshop groups that are located in Feliciaberg city.", + "SpiderSynQuestion": "Return the the names of the drama workshop groups that are located in Feliciaberg city.", + "query": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = \"Feliciaberg\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the email addresses of the drama workshop groups with address in Alaska state?", + "SpiderSynQuestion": "What are the email addresses of the drama workshop groups with address in Alaska state?", + "query": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = \"Alaska\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "List the email addresses of the drama workshop groups located in Alaska state.", + "SpiderSynQuestion": "List the email addresses of the drama workshop groups located in Alaska state.", + "query": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = \"Alaska\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show all cities along with the number of drama workshop groups in each city.", + "SpiderSynQuestion": "Show all cities along with the number of drama workshop groups in each city.", + "query": "SELECT T1.City_Town , count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "How many drama workshop groups are there in each city? Return both the city and the count.", + "SpiderSynQuestion": "How many drama workshop groups are there in each city? Return both the city and the count.", + "query": "SELECT T1.City_Town , count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the marketing region code that has the most drama workshop groups?", + "SpiderSynQuestion": "What is the marketing district code that has the most drama workshop groups?", + "query": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Which marketing region has the most drama workshop groups? Give me the region code.", + "SpiderSynQuestion": "Which marketing district has the most drama workshop groups? Give me the district code.", + "query": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show all cities where at least one customer lives in but no performer lives in.", + "SpiderSynQuestion": "Show all cities where at least one customer lives in but no performer lives in.", + "query": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Which cities have at least one customer but no performer?", + "SpiderSynQuestion": "Which cities have at least one customer but no performer?", + "query": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the most frequent status of bookings?", + "SpiderSynQuestion": "What is the most frequent status of reservations?", + "query": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Which status code is the most common of all the bookings?", + "SpiderSynQuestion": "Which status code is the most common of all the reservations?", + "query": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the names of the workshop groups that have bookings with status code \"stop\"?", + "SpiderSynQuestion": "What are the names of the workshop groups that have reservations with status code \"stop\"?", + "query": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = \"stop\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Which workshop groups have bookings with status code \"stop\"? Give me the names.", + "SpiderSynQuestion": "Which workshop groups have reservations with status code \"stop\"? Give me the names.", + "query": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = \"stop\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Show the names of all the clients with no booking.", + "SpiderSynQuestion": "Show the names of all the clients with no reservation.", + "query": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What are the names of the clients who do not have any booking?", + "SpiderSynQuestion": "What are the names of the clients who do not have any reservation?", + "query": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the average quantities ordered with payment method code \"MasterCard\" on invoices?", + "SpiderSynQuestion": "What is the average quantities ordered with payment method code \"MasterCard\" on invoices?", + "query": "SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code = \"MasterCard\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\".", + "SpiderSynQuestion": "Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\".", + "query": "SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code = \"MasterCard\"" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the product ID of the most frequently ordered item on invoices?", + "SpiderSynQuestion": "What is the goods ID of the most frequently ordered item on invoices?", + "query": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Find the id of the product ordered the most often on invoices.", + "SpiderSynQuestion": "Find the id of the goods ordered the most often on invoices.", + "query": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "What is the description of the service type which offers both the photo product and the film product?", + "SpiderSynQuestion": "What is the describing content of the service type which offers both the photo goods and the film goods?", + "query": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'" + }, + { + "db_id": "cre_Drama_Workshop_Groups", + "SpiderQuestion": "Give me the description of the service type that offers not only the photo product but also the film product.", + "SpiderSynQuestion": "Give me the describing content of the service type that offers not only the photo product but also the film product.", + "query": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many bands are there?", + "SpiderSynQuestion": "How many bands are there?", + "query": "SELECT count(*) FROM Band" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find the number of bands.", + "SpiderSynQuestion": "Find the number of bands.", + "query": "SELECT count(*) FROM Band" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are all the labels?", + "SpiderSynQuestion": "What are all the labels?", + "query": "SELECT DISTINCT label FROM Albums" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the different album labels listed?", + "SpiderSynQuestion": "What are the different album labels listed?", + "query": "SELECT DISTINCT label FROM Albums" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the albums in 2012.", + "SpiderSynQuestion": "Find all the albums in 2012.", + "query": "SELECT * FROM Albums WHERE YEAR = 2012" + }, + { + "db_id": "music_2", + "SpiderQuestion": "return all columns of the albums created in the year of 2012.", + "SpiderSynQuestion": "return all columns of the albums created in the year of 2012.", + "query": "SELECT * FROM Albums WHERE YEAR = 2012" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the stage positions of the musicians with first name \"Solveig\"", + "SpiderSynQuestion": "Find all the stage positions of the musicians with forename \"Solveig\"", + "query": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = \"Solveig\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the different stage positions for all musicians whose first name is \"Solveig\"?", + "SpiderSynQuestion": "What are the different stage positions for all musicians whose forename is \"Solveig\"?", + "query": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = \"Solveig\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many songs are there?", + "SpiderSynQuestion": "How many songs are there?", + "query": "SELECT count(*) FROM Songs" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Count the number of songs.", + "SpiderSynQuestion": "Count the number of songs.", + "query": "SELECT count(*) FROM Songs" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the songs performed by artist with last name \"Heilo\"", + "SpiderSynQuestion": "Find all the songs performed by artist with family name \"Heilo\"", + "query": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = \"Heilo\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the names of the songs by the artist whose last name is \"Heilo\"?", + "SpiderSynQuestion": "What are the names of the songs by the artist whose family name is \"Heilo\"?", + "query": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = \"Heilo\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Hom many musicians performed in the song \"Flash\"?", + "SpiderSynQuestion": "Hom many musicians performed in the song \"Flash\"?", + "query": "SELECT count(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = \"Flash\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many musicians play in the song \"Flash\"?", + "SpiderSynQuestion": "How many musicians play in the song \"Flash\"?", + "query": "SELECT count(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = \"Flash\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the songs produced by artists with first name \"Marianne\".", + "SpiderSynQuestion": "Find all the songs produced by artists with forename \"Marianne\".", + "query": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = \"Marianne\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the names of all songs produced by the artist with the first name \"Marianne\"?", + "SpiderSynQuestion": "What are the names of all songs produced by the artist with the forename \"Marianne\"?", + "query": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = \"Marianne\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Who performed the song named \"Badlands\"? Show the first name and the last name.", + "SpiderSynQuestion": "Who performed the song named \"Badlands\"? Show the full name.", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the first and last names of the artist who perfomed the song \"Badlands\"?", + "SpiderSynQuestion": "What are the forename and surnames of the artist who perfomed the song \"Badlands\"?", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Who is performing in the back stage position for the song \"Badlands\"? Show the first name and the last name.", + "SpiderSynQuestion": "Who is performing in the back stage position for the song \"Badlands\"? Show the forename and the family name.", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\" AND T1.StagePosition = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the first and last names of the performer who was in the back stage position for the song \"Badlands\"?", + "SpiderSynQuestion": "What are the full names of the performer who was in the back stage position for the song \"Badlands\"?", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\" AND T1.StagePosition = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many unique labels are there for albums?", + "SpiderSynQuestion": "How many unique labels are there for albums?", + "query": "SELECT count(DISTINCT label) FROM albums" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the unique labels for the albums?", + "SpiderSynQuestion": "What are the unique labels for the albums?", + "query": "SELECT count(DISTINCT label) FROM albums" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the label that has the most albums?", + "SpiderSynQuestion": "What is the label that has the most albums?", + "query": "SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the label with the most albums?", + "SpiderSynQuestion": "What is the label with the most albums?", + "query": "SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the last name of the musician that have produced the most number of songs?", + "SpiderSynQuestion": "What is the family name of the musician that have produced the most number of songs?", + "query": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the last name of the musician who was in the most songs?", + "SpiderSynQuestion": "What is the family name of the musician who was in the most songs?", + "query": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the last name of the musician that has been at the back position the most?", + "SpiderSynQuestion": "What is the family name of the musician that has been at the back position the most?", + "query": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = \"back\" GROUP BY lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the last name of the musicians who has played back position the most?", + "SpiderSynQuestion": "What is the family name of the musicians who has played back position the most?", + "query": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = \"back\" GROUP BY lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the songs whose name contains the word \"the\".", + "SpiderSynQuestion": "Find all the songs whose name contains the word \"the\".", + "query": "SELECT title FROM songs WHERE title LIKE '% the %'" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the names of the songs whose title has the word \"the\"?", + "SpiderSynQuestion": "What are the names of the songs whose name has the word \"the\"?", + "query": "SELECT title FROM songs WHERE title LIKE '% the %'" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are all the instruments used?", + "SpiderSynQuestion": "What are all the instruments used?", + "query": "SELECT DISTINCT instrument FROM Instruments" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the different instruments listed in the database?", + "SpiderSynQuestion": "What are the different instruments listed in the database?", + "query": "SELECT DISTINCT instrument FROM Instruments" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What instrument did the musician with last name \"Heilo\" use in the song \"Le Pop\"?", + "SpiderSynQuestion": "What instrument did the musician with family name \"Heilo\" use in the song \"Le Pop\"?", + "query": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What instruments did the musician with the last name \"Heilo\" play in the song \"Le Pop\"?", + "SpiderSynQuestion": "What instruments did the musician with the family name \"Heilo\" play in the song \"Le Pop\"?", + "query": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the most used instrument?", + "SpiderSynQuestion": "What is the most used instrument?", + "query": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What instrument is used the most?", + "SpiderSynQuestion": "What instrument is used the most?", + "query": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many songs have used the instrument \"drums\"?", + "SpiderSynQuestion": "How many songs have used the instrument \"drums\"?", + "query": "SELECT count(*) FROM instruments WHERE instrument = \"drums\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many songs use drums as an instrument?", + "SpiderSynQuestion": "How many songs use drums as an instrument?", + "query": "SELECT count(*) FROM instruments WHERE instrument = \"drums\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What instruments does the the song \"Le Pop\" use?", + "SpiderSynQuestion": "What instruments does the the song \"Le Pop\" use?", + "query": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the instruments are used in the song \"Le Pop\"?", + "SpiderSynQuestion": "What are the instruments are used in the song \"Le Pop\"?", + "query": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many instruments does the song \"Le Pop\" use?", + "SpiderSynQuestion": "How many instruments does the song \"Le Pop\" use?", + "query": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many different instruments are used in the song \"Le Pop\"?", + "SpiderSynQuestion": "How many different instruments are used in the song \"Le Pop\"?", + "query": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many instrument does the musician with last name \"Heilo\" use?", + "SpiderSynQuestion": "How many instrument does the musician with surname \"Heilo\" use?", + "query": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many different instruments does the musician with the last name \"Heilo\" use?", + "SpiderSynQuestion": "How many different instruments does the musician with the family name \"Heilo\" use?", + "query": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the instruments ever used by the musician with last name \"Heilo\"?", + "SpiderSynQuestion": "Find all the instruments ever used by the musician with family name \"Heilo\"?", + "query": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are all the instruments used by the musician with the last name \"Heilo\"?", + "SpiderSynQuestion": "What are all the instruments used by the musician with the surname \"Heilo\"?", + "query": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Which song has the most vocals?", + "SpiderSynQuestion": "Which song has the most vocals?", + "query": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the song with the most vocals?", + "SpiderSynQuestion": "What is the song with the most vocals?", + "query": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Which vocal type is the most frequently appearring type?", + "SpiderSynQuestion": "Which vocal category is the most frequently appearring category?", + "query": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the type of vocables that appears most frequently?", + "SpiderSynQuestion": "What is the category of vocables that appears most frequently?", + "query": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Which vocal type has the band mate with last name \"Heilo\" played the most?", + "SpiderSynQuestion": "Which vocal category has the band mate with family name \"Heilo\" played the most?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = \"Heilo\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the type of vocals that the band member with the last name \"Heilo\" played the most?", + "SpiderSynQuestion": "What is the category of vocals that the band member with the family name \"Heilo\" played the most?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = \"Heilo\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the vocal types used in song \"Le Pop\"?", + "SpiderSynQuestion": "What are the vocal categories used in song \"Le Pop\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the types of vocals used in the song \"Le Pop\"?", + "SpiderSynQuestion": "What are the categories of vocals used in the song \"Le Pop\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find the number of vocal types used in song \"Demon Kitty Rag\"?", + "SpiderSynQuestion": "Find the number of vocal types used in song \"Demon Kitty Rag\"?", + "query": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Demon Kitty Rag\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the types of vocals used in the song \"Demon Kitty Rag\"?", + "SpiderSynQuestion": "What are the types of vocals used in the song \"Demon Kitty Rag\"?", + "query": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Demon Kitty Rag\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many songs have a lead vocal?", + "SpiderSynQuestion": "How many songs have a lead vocal?", + "query": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"lead\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many songs have vocals of type lead?", + "SpiderSynQuestion": "How many songs have vocals of type lead?", + "query": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"lead\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Which vocal type did the musician with first name \"Solveig\" played in the song with title \"A Bar in Amsterdam\"?", + "SpiderSynQuestion": "Which vocal category did the musician with forename \"Solveig\" played in the song with title \"A Bar in Amsterdam\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = \"Solveig\" AND T2.title = \"A Bar In Amsterdam\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the types of vocals that the musician with the first name \"Solveig\" played in the song \"A Bar in Amsterdam\"?", + "SpiderSynQuestion": "What are the categories of vocals that the musician with the forename \"Solveig\" played in the song \"A Bar in Amsterdam\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = \"Solveig\" AND T2.title = \"A Bar In Amsterdam\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the songs that do not have a lead vocal.", + "SpiderSynQuestion": "Find all the songs that do not have a lead vocal.", + "query": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"lead\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the names of the songs without a lead vocal?", + "SpiderSynQuestion": "What are the names of the songs without a lead vocal?", + "query": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"lead\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the vocal types.", + "SpiderSynQuestion": "Find all the vocal categories.", + "query": "SELECT DISTINCT TYPE FROM vocals" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the different types of vocals?", + "SpiderSynQuestion": "What are the different categories of vocals?", + "query": "SELECT DISTINCT TYPE FROM vocals" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the albums produced in year 2010?", + "SpiderSynQuestion": "What are the albums produced in year 2010?", + "query": "SELECT * FROM Albums WHERE YEAR = 2010" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What information is there on albums from 2010?", + "SpiderSynQuestion": "What detail is there on albums from 2010?", + "query": "SELECT * FROM Albums WHERE YEAR = 2010" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Who performed the song named \"Le Pop\"?", + "SpiderSynQuestion": "Who performed the song named \"Le Pop\"?", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the first and last name of artist who performed \"Le Pop\"?", + "SpiderSynQuestion": "What is the full name of artist who performed \"Le Pop\"?", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the last name of the musician that have produced the most songs?", + "SpiderSynQuestion": "What is the family name of the musician that have produced the most songs?", + "query": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the last name of the artist who sang the most songs?", + "SpiderSynQuestion": "What is the surname of the artist who sang the most songs?", + "query": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What instrument did the musician with last name \"Heilo\" use in the song \"Badlands\"?", + "SpiderSynQuestion": "What instrument did the musician with family name \"Heilo\" use in the song \"Badlands\"?", + "query": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What instruments did the musician with the last name \"Heilo\" play in \"Badlands\"?", + "SpiderSynQuestion": "What instruments did the musician with the surname \"Heilo\" play in \"Badlands\"?", + "query": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many instruments does the song \"Badlands\" use?", + "SpiderSynQuestion": "How many instruments does the song \"Badlands\" use?", + "query": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many different instruments are used in the song \"Badlands\"?", + "SpiderSynQuestion": "How many different instruments are used in the song \"Badlands\"?", + "query": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the vocal types used in song \"Badlands\"?", + "SpiderSynQuestion": "What are the vocal categories used in song \"Badlands\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What types of vocals are used in the song \"Badlands\"?", + "SpiderSynQuestion": "What categories of vocals are used in the song \"Badlands\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find the number of vocal types used in song \"Le Pop\"", + "SpiderSynQuestion": "Find the number of vocal categories used in song \"Le Pop\"", + "query": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many vocal types are used in the song \"Le Pop\"?", + "SpiderSynQuestion": "How many vocal categories are used in the song \"Le Pop\"?", + "query": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many songs have a shared vocal?", + "SpiderSynQuestion": "How many songs have a shared vocal?", + "query": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"shared\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many different songs have shared vocals?", + "SpiderSynQuestion": "How many different songs have shared vocals?", + "query": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"shared\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find all the songs that do not have a back vocal.", + "SpiderSynQuestion": "Find all the songs that do not have a back vocal.", + "query": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the different names of all songs without back vocals?", + "SpiderSynQuestion": "What are the different names of all songs without back vocals?", + "query": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Which vocal type has the band mate with first name \"Solveig\" played the most?", + "SpiderSynQuestion": "Which vocal category has the band mate with forename \"Solveig\" played the most?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Solveig\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the types of vocals that the band member with the first name \"Solveig\" played the most?", + "SpiderSynQuestion": "What are the categories of vocals that the band member with the forename \"Solveig\" played the most?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Solveig\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Which vocal type did the musician with last name \"Heilo\" played in the song with title \"Der Kapitan\"?", + "SpiderSynQuestion": "Which vocal category did the musician with surname \"Heilo\" played in the song with title \"Der Kapitan\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = \"Heilo\" AND T2.title = \"Der Kapitan\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the types of vocals that the musician with the last name \"Heilo\" played in \"Der Kapitan\"?", + "SpiderSynQuestion": "What are the categories of vocals that the musician with the family name \"Heilo\" played in \"Der Kapitan\"?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = \"Heilo\" AND T2.title = \"Der Kapitan\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find the first name of the band mate that has performed in most songs.", + "SpiderSynQuestion": "Find the forename of the band mate that has performed in most songs.", + "query": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the first name of the band mate who perfomed in the most songs?", + "SpiderSynQuestion": "What is the forename of the band mate who perfomed in the most songs?", + "query": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Which vocal type has the band mate with first name \"Marianne\" played the most?", + "SpiderSynQuestion": "Which vocal category has the band mate with forename \"Marianne\" played the most?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Marianne\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the vocal type of the band mate whose first name is \"Marianne\" played the most?", + "SpiderSynQuestion": "What is the vocal category of the band mate whose forename is \"Marianne\" played the most?", + "query": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Marianne\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Who is performing in the back stage position for the song \"Der Kapitan\"? Show the first name and last name.", + "SpiderSynQuestion": "Who is performing in the back stage position for the song \"Der Kapitan\"? Show the full name.", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Der Kapitan\" AND T1.StagePosition = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What is the first and last name of the artist who performed back stage for the song \"Der Kapitan\"?", + "SpiderSynQuestion": "What is the full name of the artist who performed back stage for the song \"Der Kapitan\"?", + "query": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Der Kapitan\" AND T1.StagePosition = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find the name of songs that does not have a back vocal.", + "SpiderSynQuestion": "Find the name of songs that does not have a back vocal.", + "query": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the names of the songs that do not have back vocals?", + "SpiderSynQuestion": "What are the names of the songs that do not have back vocals?", + "query": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the songs in album \"A Kiss Before You Go: Live in Hamburg\"?", + "SpiderSynQuestion": "What are the songs in album \"A Kiss Before You Go: Live in Hamburg\"?", + "query": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = \"A Kiss Before You Go: Live in Hamburg\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the song titles on the album \"A Kiss Before You Go: Live in Hamburg\"?", + "SpiderSynQuestion": "What are the song names on the album \"A Kiss Before You Go: Live in Hamburg\"?", + "query": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = \"A Kiss Before You Go: Live in Hamburg\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are all the songs in albums under label \"Universal Music Group\"?", + "SpiderSynQuestion": "What are all the songs in albums under label \"Universal Music Group\"?", + "query": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = \"Universal Music Group\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "What are the names of all the songs whose album is under the label of \"Universal Music Group\"?", + "SpiderSynQuestion": "What are the names of all the songs whose album is under the label of \"Universal Music Group\"?", + "query": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = \"Universal Music Group\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "Find the number of songs in all the studio albums.", + "SpiderSynQuestion": "Find the number of songs in all the studio albums.", + "query": "SELECT count(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = \"Studio\"" + }, + { + "db_id": "music_2", + "SpiderQuestion": "How many songs appear in studio albums?", + "SpiderSynQuestion": "How many songs appear in studio albums?", + "query": "SELECT count(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = \"Studio\"" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Who is the founder of Sony?", + "SpiderSynQuestion": "Who is the establisher of Sony?", + "query": "SELECT founder FROM manufacturers WHERE name = 'Sony'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Return the founder of Sony.", + "SpiderSynQuestion": "Return the establisher of Sony.", + "query": "SELECT founder FROM manufacturers WHERE name = 'Sony'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Where is the headquarter of the company founded by James?", + "SpiderSynQuestion": "Where is the head office of the company founded by James?", + "query": "SELECT headquarter FROM manufacturers WHERE founder = 'James'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the headquarter of the company whose founder is James?", + "SpiderSynQuestion": "What is the head office of the company whose founder is James?", + "query": "SELECT headquarter FROM manufacturers WHERE founder = 'James'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", + "SpiderSynQuestion": "Find all manufacturers' names and their head office, sorted by the ones with highest revenue first.", + "query": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names and headquarters of all manufacturers, ordered by revenue descending?", + "SpiderSynQuestion": "What are the names and head office of all manufacturers, ordered by revenue descending?", + "query": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the average, maximum and total revenues of all companies?", + "SpiderSynQuestion": "What are the average, maximum and total amount of incomes of all companies?", + "query": "SELECT avg(revenue) , max(revenue) , sum(revenue) FROM manufacturers" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Return the average, maximum, and total revenues across all manufacturers.", + "SpiderSynQuestion": "Return the average, maximum, and total amount of incomes across all manufacturers.", + "query": "SELECT avg(revenue) , max(revenue) , sum(revenue) FROM manufacturers" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "How many companies were created by Andy?", + "SpiderSynQuestion": "How many enterprise were created by Andy?", + "query": "SELECT count(*) FROM manufacturers WHERE founder = 'Andy'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Return the number of companies created by Andy.", + "SpiderSynQuestion": "Return the number of enterprise created by Andy.", + "query": "SELECT count(*) FROM manufacturers WHERE founder = 'Andy'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the total revenue created by the companies whose headquarter is located at Austin.", + "SpiderSynQuestion": "Find the total amount of income created by the companies whose headquarter is located at Austin.", + "query": "SELECT sum(revenue) FROM manufacturers WHERE headquarter = 'Austin'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the sum of revenue from companies with headquarters in Austin?", + "SpiderSynQuestion": "What is the sum of income from enterprise with headquarters in Austin?", + "query": "SELECT sum(revenue) FROM manufacturers WHERE headquarter = 'Austin'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the different cities listed?", + "SpiderSynQuestion": "What are the different towns listed?", + "query": "SELECT DISTINCT headquarter FROM manufacturers" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Give the distinct headquarters of manufacturers.", + "SpiderSynQuestion": "Give the different head office of manufacturers.", + "query": "SELECT DISTINCT headquarter FROM manufacturers" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the number of manufactures that are based in Tokyo or Beijing.", + "SpiderSynQuestion": "Find the number of manufactures that are based in Tokyo or Beijing.", + "query": "SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "How many manufacturers have headquarters in either Tokyo or Beijing?", + "SpiderSynQuestion": "How many manufacturers have head office in either Tokyo or Beijing?", + "query": "SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the founder of the company whose name begins with the letter 'S'.", + "SpiderSynQuestion": "Find the establisher of the enterprise whose name begins with the letter 'S'.", + "query": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Who is the founders of companies whose first letter is S?", + "SpiderSynQuestion": "Who is the establishers of enterprise whose first letter is S?", + "query": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name of companies whose revenue is between 100 and 150.", + "SpiderSynQuestion": "Find the name of enterprise whose total amount of income is between 100 and 150.", + "query": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names of companies with revenue between 100 and 150?", + "SpiderSynQuestion": "What are the names of enterprise with total amount of income between 100 and 150?", + "query": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the total revenue of all companies whose main office is at Tokyo or Taiwan?", + "SpiderSynQuestion": "What is the total amount of income of all enterprise whose main office is at Tokyo or Taiwan?", + "query": "SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.", + "SpiderSynQuestion": "Return the total amount of income of enterprise with headquarters in Tokyo or Taiwan.", + "query": "SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name of product that is produced by both companies Creative Labs and Sony.", + "SpiderSynQuestion": "Find the name of goods that is produced by both enterprise Creative Labs and Sony.", + "query": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names of products produced by both Creative Labs and Sony?", + "SpiderSynQuestion": "What are the names of goods produced by both Creative Labs and Sony?", + "query": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name, headquarter and founder of the manufacturer that has the highest revenue.", + "SpiderSynQuestion": "Find the name, head office and establisher of the manufacturer that has the highest revenue.", + "query": "SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names, headquarters and founders of the company with the highest revenue?", + "SpiderSynQuestion": "What are the names, head office and establishers of the company with the highest revenue?", + "query": "SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.", + "SpiderSynQuestion": "Find the name, head office and total amount of income of all manufacturers sorted by their total amount of income in the descending order.", + "query": "SELECT name , headquarter , revenue FROM manufacturers ORDER BY revenue DESC" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?", + "SpiderSynQuestion": "What are the names, head office and total amount of incomes for manufacturers, sorted by total amount of income descending?", + "query": "SELECT name , headquarter , revenue FROM manufacturers ORDER BY revenue DESC" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name of companies whose revenue is greater than the average revenue of all companies.", + "SpiderSynQuestion": "Find the name of companies whose revenue is greater than the average revenue of all companies.", + "query": "SELECT name FROM manufacturers WHERE revenue > (SELECT avg(revenue) FROM manufacturers)" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names of manufacturers with revenue greater than the average of all revenues?", + "SpiderSynQuestion": "What are the names of manufacturers with total amount of income greater than the average of all total amount of incomes?", + "query": "SELECT name FROM manufacturers WHERE revenue > (SELECT avg(revenue) FROM manufacturers)" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.", + "SpiderSynQuestion": "Find the name of enterprise whose total amount of income is smaller than the revenue of all enterprise based in Austin.", + "query": "SELECT name FROM manufacturers WHERE revenue < (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?", + "SpiderSynQuestion": "What are the names of enterprise with total amount of income less than the lowest total amount of income of any manufacturer in Austin?", + "query": "SELECT name FROM manufacturers WHERE revenue < (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.", + "SpiderSynQuestion": "Find the total amount of income of enterprise whose total amount of income is larger than the total amount of income of some enterprise based in Austin.", + "query": "SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?", + "SpiderSynQuestion": "What is the total amount of income of enterprise with income greater than the lowest income of any manufacturer in Austin?", + "query": "SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the total revenue of companies of each founder.", + "SpiderSynQuestion": "Find the total amount of income of enterprise of each establisher.", + "query": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the total revenue of companies started by founder?", + "SpiderSynQuestion": "What is the total amount of income of enterprise started by establisher?", + "query": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name and revenue of the company that earns the highest revenue in each city.", + "SpiderSynQuestion": "Find the name and total amount of income of the enterprise that earns the highest total amount of income in each city.", + "query": "SELECT name , max(revenue) , Headquarter FROM manufacturers GROUP BY Headquarter" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names and revenues of the companies with the highest revenues in each headquarter city?", + "SpiderSynQuestion": "What are the names and total amount of incomes of the enterprise with the highest total amount of incomes in each head office city?", + "query": "SELECT name , max(revenue) , Headquarter FROM manufacturers GROUP BY Headquarter" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the total revenue for each manufacturer.", + "SpiderSynQuestion": "Find the total amount of income for each manufacturer.", + "query": "SELECT sum(revenue) , name FROM manufacturers GROUP BY name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the total revenue of each manufacturer?", + "SpiderSynQuestion": "What is the total amount of income of each manufacturer?", + "query": "SELECT sum(revenue) , name FROM manufacturers GROUP BY name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the average prices of all products from each manufacture, and list each company's name.", + "SpiderSynQuestion": "Find the average prices of all goods from each manufacture, and list each enterprise's name.", + "query": "SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the average prices of products for each manufacturer?", + "SpiderSynQuestion": "What are the average prices of goods for each manufacturer?", + "query": "SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the number of different products that are produced by companies at different headquarter cities.", + "SpiderSynQuestion": "Find the number of different goods that are produced by companies at different head office cities.", + "query": "SELECT count(DISTINCT T1.name) , T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "How many different products are produced in each headquarter city?", + "SpiderSynQuestion": "How many different goods are produced in each head office city?", + "query": "SELECT count(DISTINCT T1.name) , T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find number of products which Sony does not make.", + "SpiderSynQuestion": "Find number of goods which Sony does not make.", + "query": "SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "How many products are not made by Sony?", + "SpiderSynQuestion": "How many goods are not made by Sony?", + "query": "SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the name of companies that do not make DVD drive.", + "SpiderSynQuestion": "Find the name of enterprise that do not make DVD drive.", + "query": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names of companies that do not make DVD drives?", + "SpiderSynQuestion": "What are the names of enterprise that do not make DVD drives?", + "query": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive'" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find the number of products for each manufacturer, showing the name of each company.", + "SpiderSynQuestion": "Find the number of goods for each manufacturer, showing the name of each enterprise.", + "query": "SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "How many products are there for each manufacturer?", + "SpiderSynQuestion": "How many goods are there for each manufacturer?", + "query": "SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the names of all the products in the store.", + "SpiderSynQuestion": "Select the names of all the goods in the store.", + "query": "SELECT Name FROM Products" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names of all products?", + "SpiderSynQuestion": "What are the names of all goods?", + "query": "SELECT Name FROM Products" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the names and the prices of all the products in the store.", + "SpiderSynQuestion": "Select the names and the prices of all the goods in the store.", + "query": "SELECT name , price FROM products" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names and prices of all products in the store?", + "SpiderSynQuestion": "What are the names and prices of all goods in the store?", + "query": "SELECT name , price FROM products" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the name of the products with a price less than or equal to $200.", + "SpiderSynQuestion": "Select the name of the goods with a price less than or equal to $200.", + "query": "SELECT name FROM products WHERE price <= 200" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names of products with price at most 200?", + "SpiderSynQuestion": "What are the names of goods with price at most 200?", + "query": "SELECT name FROM products WHERE price <= 200" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Find all information of all the products with a price between $60 and $120.", + "SpiderSynQuestion": "Find all details of all the goods with a price between $60 and $120.", + "query": "SELECT * FROM products WHERE price BETWEEN 60 AND 120" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is all the information of all the products that have a price between 60 and 120?", + "SpiderSynQuestion": "What is all the details of all the goods that have a price between 60 and 120?", + "query": "SELECT * FROM products WHERE price BETWEEN 60 AND 120" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Compute the average price of all the products.", + "SpiderSynQuestion": "Compute the average price of all the goods.", + "query": "SELECT avg(price) FROM products" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the average price across all products?", + "SpiderSynQuestion": "What is the average price across all goods?", + "query": "SELECT avg(price) FROM products" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Compute the average price of all products with manufacturer code equal to 2.", + "SpiderSynQuestion": "Compute the average price of all goods with manufacturer code equal to 2.", + "query": "SELECT avg(price) FROM products WHERE Manufacturer = 2" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the average price of products with manufacturer codes equal to 2?", + "SpiderSynQuestion": "What is the average price of goods with manufacturer codes equal to 2?", + "query": "SELECT avg(price) FROM products WHERE Manufacturer = 2" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Compute the number of products with a price larger than or equal to $180.", + "SpiderSynQuestion": "Compute the number of goods with a price larger than or equal to $180.", + "query": "SELECT count(*) FROM products WHERE price >= 180" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "How many products have prices of at least 180?", + "SpiderSynQuestion": "How many goods have prices of at least 180?", + "query": "SELECT count(*) FROM products WHERE price >= 180" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order).", + "SpiderSynQuestion": "Select the name and price of all goods with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order).", + "query": "SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?", + "SpiderSynQuestion": "What are the names and prices of goods that cost at least 180, sorted by price decreasing and name ascending?", + "query": "SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select all the data from the products and each product's manufacturer.", + "SpiderSynQuestion": "Select all the data from the goods and each goods's manufacturer.", + "query": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is all the product data, as well as each product's manufacturer?", + "SpiderSynQuestion": "What is all the goods data, as well as each product's manufacturer?", + "query": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the average price of each manufacturer's products, showing only the manufacturer's code.", + "SpiderSynQuestion": "Select the average price of each manufacturer's goods, showing only the manufacturer's code.", + "query": "SELECT AVG(Price) , Manufacturer FROM Products GROUP BY Manufacturer" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the average prices of products, grouped by manufacturer code?", + "SpiderSynQuestion": "What are the average prices of goods, grouped by manufacturer code?", + "query": "SELECT AVG(Price) , Manufacturer FROM Products GROUP BY Manufacturer" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the average price of each manufacturer's products, showing the manufacturer's name.", + "SpiderSynQuestion": "Select the average price of each manufacturer's goods, showing the manufacturer's name.", + "query": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the average prices of products, grouped by manufacturer name?", + "SpiderSynQuestion": "What are the average prices of goods, grouped by manufacturer name?", + "query": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the names of manufacturer whose products have an average price higher than or equal to $150.", + "SpiderSynQuestion": "Select the names of manufacturer whose goods have an average price higher than or equal to $150.", + "query": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the names and average prices of products for manufacturers whose products cost on average 150 or more?", + "SpiderSynQuestion": "What are the names and average prices of goods for manufacturers whose goods cost on average 150 or more?", + "query": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the name and price of the cheapest product.", + "SpiderSynQuestion": "Select the name and price of the cheapest goods.", + "query": "SELECT name , price FROM Products ORDER BY price ASC LIMIT 1" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What is the name and price of the cheapest product?", + "SpiderSynQuestion": "What is the name and price of the cheapest goods?", + "query": "SELECT name , price FROM Products ORDER BY price ASC LIMIT 1" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the name of each manufacturer along with the name and price of its most expensive product.", + "SpiderSynQuestion": "Select the name of each manufacturer along with the name and price of its most expensive goods.", + "query": "SELECT T1.Name , max(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "For each manufacturer name, what are the names and prices of their most expensive product?", + "SpiderSynQuestion": "For each manufacturer name, what are the names and prices of their most expensive goods?", + "query": "SELECT T1.Name , max(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "Select the code of the product that is cheapest in each product category.", + "SpiderSynQuestion": "Select the number of the goods that is cheapest in each goods category.", + "query": "SELECT code , name , min(price) FROM products GROUP BY name" + }, + { + "db_id": "manufactory_1", + "SpiderQuestion": "What are the codes and names of the cheapest products in each category?", + "SpiderSynQuestion": "What are the number and names of the cheapest goods in each category?", + "query": "SELECT code , name , min(price) FROM products GROUP BY name" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What is the id of the problem log that is created most recently?", + "SpiderSynQuestion": "What is the id of the issue log that is created most recently?", + "query": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which problem log was created most recently? Give me the log id.", + "SpiderSynQuestion": "Which issue log was created most recently? Give me the log id.", + "query": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What is the oldest log id and its corresponding problem id?", + "SpiderSynQuestion": "What is the oldest log id and its corresponding problem id?", + "query": "SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find the oldest log id and its corresponding problem id.", + "SpiderSynQuestion": "Find the oldest log id and its corresponding issue id.", + "query": "SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find all the ids and dates of the logs for the problem whose id is 10.", + "SpiderSynQuestion": "Find all the ids and day of the logs for the issue whose id is 10.", + "query": "SELECT problem_log_id , log_entry_date FROM problem_log WHERE problem_id = 10" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "For the problem with id 10, return the ids and dates of its problem logs.", + "SpiderSynQuestion": "For the issue with id 10, return the ids and day of its issue logs.", + "query": "SELECT problem_log_id , log_entry_date FROM problem_log WHERE problem_id = 10" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "List all the log ids and their descriptions from the problem logs.", + "SpiderSynQuestion": "List all the log ids and their descriptions from the issue logs.", + "query": "SELECT problem_log_id , log_entry_description FROM problem_log" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the log id and entry description of each problem?", + "SpiderSynQuestion": "What are the log id and entry describing content of each issue?", + "query": "SELECT problem_log_id , log_entry_description FROM problem_log" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.", + "SpiderSynQuestion": "List the forename and family names of all different employee members who are assigned to the problem whose id is 1.", + "query": "SELECT DISTINCT staff_first_name , staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which staff members are assigned to the problem with id 1? Give me their first and last names.", + "SpiderSynQuestion": "Which employee members are assigned to the problem with id 1? Give me their forename and family names.", + "query": "SELECT DISTINCT staff_first_name , staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "List the problem id and log id which are assigned to the staff named Rylan Homenick.", + "SpiderSynQuestion": "List the issue id and log id which are assigned to the employee named Rylan Homenick.", + "query": "SELECT DISTINCT T2.problem_id , T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = \"Rylan\" AND T1.staff_last_name = \"Homenick\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which problem id and log id are assigned to the staff named Rylan Homenick?", + "SpiderSynQuestion": "Which issue id and log id are assigned to the employee named Rylan Homenick?", + "query": "SELECT DISTINCT T2.problem_id , T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = \"Rylan\" AND T1.staff_last_name = \"Homenick\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "How many problems are there for product voluptatem?", + "SpiderSynQuestion": "How many problems are there for goods voluptatem?", + "query": "SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = \"voluptatem\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "How many problems did the product called \"voluptatem\" have in record?", + "SpiderSynQuestion": "How many problems did the goods called \"voluptatem\" have in record?", + "query": "SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = \"voluptatem\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "How many problems does the product with the most problems have? List the number of the problems and product name.", + "SpiderSynQuestion": "How many problems does the goods with the most problems have? List the number of the problems and goods name.", + "query": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which product has the most problems? Give me the number of problems and the product name.", + "SpiderSynQuestion": "Which goods has the most problems? Give me the number of problems and the goods name.", + "query": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.", + "SpiderSynQuestion": "Give me a list of descriptions of the problems that are reported by the staff whose forename is Christop.", + "query": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which problems are reported by the staff with first name \"Christop\"? Show the descriptions of the problems.", + "SpiderSynQuestion": "Which problems are reported by the staff with first name \"Christop\"? Show the descriptions of the problems.", + "query": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find the ids of the problems that are reported by the staff whose last name is Bosco.", + "SpiderSynQuestion": "Find the ids of the problems that are reported by the staff whose last name is Bosco.", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = \"Bosco\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which problems are reported by the staff with last name \"Bosco\"? Show the ids of the problems.", + "SpiderSynQuestion": "Which problems are reported by the staff with last name \"Bosco\"? Show the ids of the problems.", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = \"Bosco\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the ids of the problems which are reported after 1978-06-26?", + "SpiderSynQuestion": "What are the ids of the problems which are reported after 1978-06-26?", + "query": "SELECT problem_id FROM problems WHERE date_problem_reported > \"1978-06-26\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find the ids of the problems reported after 1978-06-26.", + "SpiderSynQuestion": "Find the ids of the problems reported after 1978-06-26.", + "query": "SELECT problem_id FROM problems WHERE date_problem_reported > \"1978-06-26\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the ids of the problems which are reported before 1978-06-26?", + "SpiderSynQuestion": "What are the ids of the problems which are reported before 1978-06-26?", + "query": "SELECT problem_id FROM problems WHERE date_problem_reported < \"1978-06-26\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which problems are reported before 1978-06-26? Give me the ids of the problems.", + "SpiderSynQuestion": "Which problems are reported before 1978-06-26? Give me the ids of the problems.", + "query": "SELECT problem_id FROM problems WHERE date_problem_reported < \"1978-06-26\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "For each product which has problems, what are the number of problems and the product id?", + "SpiderSynQuestion": "For each goods which has problems, what are the number of problems and the goods id?", + "query": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "For each product with some problems, list the count of problems and the product id.", + "SpiderSynQuestion": "For each goods with some problems, list the count of problems and the goods id.", + "query": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", + "SpiderSynQuestion": "For each goods that has problems, find the number of problems reported after 1986-11-13 and the goods id?", + "query": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13.", + "SpiderSynQuestion": "What are the goods that have problems reported after 1986-11-13? Give me the goods id and the count of problems reported after 1986-11-13.", + "query": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "List the names of all the distinct product names in alphabetical order?", + "SpiderSynQuestion": "List the names of all the different goods names in alphabetical order?", + "query": "SELECT DISTINCT product_name FROM product ORDER BY product_name" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Sort all the distinct product names in alphabetical order.", + "SpiderSynQuestion": "Sort all the different goods names in alphabetical order.", + "query": "SELECT DISTINCT product_name FROM product ORDER BY product_name" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "List all the distinct product names ordered by product id?", + "SpiderSynQuestion": "List all the different goods names ordered by goods id?", + "query": "SELECT DISTINCT product_name FROM product ORDER BY product_id" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What is the list of distinct product names sorted by product id?", + "SpiderSynQuestion": "What is the list of different goods names sorted by goods id?", + "query": "SELECT DISTINCT product_name FROM product ORDER BY product_id" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?", + "SpiderSynQuestion": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?", + "query": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Dameon\" AND T2.staff_last_name = \"Frami\" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Jolie\" AND T2.staff_last_name = \"Weber\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.", + "SpiderSynQuestion": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.", + "query": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Dameon\" AND T2.staff_last_name = \"Frami\" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Jolie\" AND T2.staff_last_name = \"Weber\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?", + "SpiderSynQuestion": "What are the goods ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?", + "query": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\" AND T2.staff_last_name = \"Berge\" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Ashley\" AND T2.staff_last_name = \"Medhurst\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.", + "SpiderSynQuestion": "For which goods was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the goods ids.", + "query": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\" AND T2.staff_last_name = \"Berge\" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Ashley\" AND T2.staff_last_name = \"Medhurst\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?", + "SpiderSynQuestion": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Lysanne\" AND T4.staff_last_name = \"Turcotte\" )" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.", + "SpiderSynQuestion": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Lysanne\" AND T4.staff_last_name = \"Turcotte\" )" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?", + "SpiderSynQuestion": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Rylan\" AND T4.staff_last_name = \"Homenick\" )" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.", + "SpiderSynQuestion": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Rylan\" AND T4.staff_last_name = \"Homenick\" )" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find the top 3 products which have the largest number of problems?", + "SpiderSynQuestion": "Find the top 3 goods which have the largest number of problems?", + "query": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the three products that have the most problems?s", + "SpiderSynQuestion": "What are the three goods that have the most problems?s", + "query": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "List the ids of the problems from the product \"voluptatem\" that are reported after 1995?", + "SpiderSynQuestion": "List the ids of the problems from the goods \"voluptatem\" that are reported after 1995?", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = \"voluptatem\" AND T1.date_problem_reported > \"1995\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "What are the ids of the problems that are from the product \"voluptatem\" and are reported after 1995?", + "SpiderSynQuestion": "What are the ids of the problems that are from the goods \"voluptatem\" and are reported after 1995?", + "query": "SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = \"voluptatem\" AND T1.date_problem_reported > \"1995\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find the first and last name of the staff members who reported problems from the product \"rem\" but not \"aut\"?", + "SpiderSynQuestion": "Find the forename and surname of the employee members who reported problems from the goods \"rem\" but not \"aut\"?", + "query": "SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"rem\" EXCEPT SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"aut\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which staff members who reported problems from the product \"rem\" but not \"aut\"? Give me their first and last names.", + "SpiderSynQuestion": "Which employee members who reported problems from the goods \"rem\" but not \"aut\"? Give me their full names.", + "query": "SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"rem\" EXCEPT SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"aut\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?", + "SpiderSynQuestion": "Find the goods which have problems reported by both Lacey Bosco and Kenton Champlin?", + "query": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Lacey\" AND T3.staff_last_name = \"Bosco\" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Kenton\" AND T3.staff_last_name = \"Champlin\"" + }, + { + "db_id": "tracking_software_problems", + "SpiderQuestion": "Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?", + "SpiderSynQuestion": "Which goods have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?", + "query": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Lacey\" AND T3.staff_last_name = \"Bosco\" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Kenton\" AND T3.staff_last_name = \"Champlin\"" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "How many branches where have more than average number of memberships are there?", + "SpiderSynQuestion": "How many branches where have more than average number of memberships are there?", + "query": "SELECT count(*) FROM branch WHERE membership_amount > (SELECT avg(membership_amount) FROM branch)" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What is the number of branches that have more than the average number of memberships?", + "SpiderSynQuestion": "What is the number of branches that have more than the average number of memberships?", + "query": "SELECT count(*) FROM branch WHERE membership_amount > (SELECT avg(membership_amount) FROM branch)" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show name, address road, and city for all branches sorted by open year.", + "SpiderSynQuestion": "Show name, location road, and city for all branches sorted by year of opening.", + "query": "SELECT name , address_road , city FROM branch ORDER BY open_year" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the names, address roads, and cities of the branches ordered by opening year?", + "SpiderSynQuestion": "What are the names, location roads, and cities of the branches ordered by opening year?", + "query": "SELECT name , address_road , city FROM branch ORDER BY open_year" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are names for top three branches with most number of membership?", + "SpiderSynQuestion": "What are names for top three branches with most number of membership?", + "query": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the names for the 3 branches that have the most memberships?", + "SpiderSynQuestion": "What are the names for the 3 branches that have the most memberships?", + "query": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show all distinct city where branches with at least 100 memberships are located.", + "SpiderSynQuestion": "Show all different city where branches with at least 100 memberships are located.", + "query": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the different cities that have more than 100 memberships?", + "SpiderSynQuestion": "What are the different cities that have more than 100 memberships?", + "query": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "List all open years when at least two shops are opened.", + "SpiderSynQuestion": "List all open years when at least two shops are opened.", + "query": "SELECT open_year FROM branch GROUP BY open_year HAVING count(*) >= 2" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the opening years in which at least two shops opened?", + "SpiderSynQuestion": "What are the opening years in which at least two shops opened?", + "query": "SELECT open_year FROM branch GROUP BY open_year HAVING count(*) >= 2" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.", + "SpiderSynQuestion": "Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.", + "query": "SELECT min(membership_amount) , max(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?", + "SpiderSynQuestion": "What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?", + "query": "SELECT min(membership_amount) , max(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show the city and the number of branches opened before 2010 for each city.", + "SpiderSynQuestion": "Show the city and the number of branches opened before 2010 for each city.", + "query": "SELECT city , count(*) FROM branch WHERE open_year < 2010 GROUP BY city" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "For each city, how many branches opened before 2010?", + "SpiderSynQuestion": "For each city, how many branches opened before 2010?", + "query": "SELECT city , count(*) FROM branch WHERE open_year < 2010 GROUP BY city" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "How many different levels do members have?", + "SpiderSynQuestion": "How many different ranks do members have?", + "query": "SELECT count(DISTINCT LEVEL) FROM member" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the different membership levels?", + "SpiderSynQuestion": "What are the different membership ranks?", + "query": "SELECT count(DISTINCT LEVEL) FROM member" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show card number, name, and hometown for all members in a descending order of level.", + "SpiderSynQuestion": "Show card number, name, and birthplace for all members in a descending order of level.", + "query": "SELECT card_number , name , hometown FROM member ORDER BY LEVEL DESC" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the card numbers, names, and hometowns of every member ordered by descending level?", + "SpiderSynQuestion": "What are the card numbers, names, and birthplace of every member ordered by descending level?", + "query": "SELECT card_number , name , hometown FROM member ORDER BY LEVEL DESC" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show the membership level with most number of members.", + "SpiderSynQuestion": "Show the membership rank with most number of members.", + "query": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What is the membership level with the most people?", + "SpiderSynQuestion": "What is the membership rank with the most people?", + "query": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show all member names and registered branch names sorted by register year.", + "SpiderSynQuestion": "Show all member names and registered branch names sorted by register year.", + "query": "SELECT T3.name , T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the names of the members and branches at which they are registered sorted by year of registration?", + "SpiderSynQuestion": "What are the names of the members and branches at which they are registered sorted by year of registration?", + "query": "SELECT T3.name , T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show all branch names with the number of members in each branch registered after 2015.", + "SpiderSynQuestion": "Show all branch names with the number of members in each branch registered after 2015.", + "query": "SELECT T2.name , count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "For each branch id, what are the names of the branches that were registered after 2015?", + "SpiderSynQuestion": "For each branch id, what are the names of the branches that were registered after 2015?", + "query": "SELECT T2.name , count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show member names without any registered branch.", + "SpiderSynQuestion": "Show member names without any registered branch.", + "query": "SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the names of the members that have never registered at any branch?", + "SpiderSynQuestion": "What are the names of the members that have never registered at any branch?", + "query": "SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "List the branch name and city without any registered members.", + "SpiderSynQuestion": "List the branch name and city without any registered members.", + "query": "SELECT name , city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the names and cities of the branches that do not have any registered members?", + "SpiderSynQuestion": "What are the names and cities of the branches that do not have any registered members?", + "query": "SELECT name , city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What is the name and open year for the branch with most number of memberships registered in 2016?", + "SpiderSynQuestion": "What is the name and open year for the branch with most number of memberships registered in 2016?", + "query": "SELECT T2.name , T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What is the name and opening year for the branch that registered the most members in 2016?", + "SpiderSynQuestion": "What is the name and opening year for the branch that registered the most members in 2016?", + "query": "SELECT T2.name , T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show the member name and hometown who registered a branch in 2016.", + "SpiderSynQuestion": "Show the member name and birthplace who registered a branch in 2016.", + "query": "SELECT T2.name , T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the member names and hometowns of those who registered at a branch in 2016?", + "SpiderSynQuestion": "What are the member names and birthplaces of those who registered at a branch in 2016?", + "query": "SELECT T2.name , T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.", + "SpiderSynQuestion": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.", + "query": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?", + "SpiderSynQuestion": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?", + "query": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Show all cities without a branch having more than 100 memberships.", + "SpiderSynQuestion": "Show all cities without a branch having more than 100 memberships.", + "query": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the cities that do not have any branches with more than 100 members?", + "SpiderSynQuestion": "What are the cities that do not have any branches with more than 100 members?", + "query": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What is the sum of total pounds of purchase in year 2018 for all branches in London?", + "SpiderSynQuestion": "What is the total number of pounds purchased in year 2018 for all branches in London? ", + "query": "SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "How many total pounds were purchased in the year 2018 at all London branches?", + "SpiderSynQuestion": "How many total number of pounds purchased in the year 2018 at all London branches?", + "query": "SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What is the total number of purchases for members with level 6?", + "SpiderSynQuestion": "What is the quantity purchased for members with level 6?", + "query": "SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the total purchases for members rated at level 6?", + "SpiderSynQuestion": "What are the quantity purchased for members rated at level 6?", + "query": "SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.", + "SpiderSynQuestion": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.", + "query": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?", + "SpiderSynQuestion": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?", + "query": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "list the card number of all members whose hometown address includes word \"Kentucky\".", + "SpiderSynQuestion": "list the card number of all members whose birthplace location includes word \"Kentucky\".", + "query": "SELECT card_number FROM member WHERE Hometown LIKE \"%Kentucky%\"" + }, + { + "db_id": "shop_membership", + "SpiderQuestion": "What are the card numbers of members from Kentucky?", + "SpiderSynQuestion": "What are the card numbers of members from Kentucky?", + "query": "SELECT card_number FROM member WHERE Hometown LIKE \"%Kentucky%\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the number of students in total.", + "SpiderSynQuestion": "Find the number of students in total.", + "query": "SELECT count(*) FROM STUDENT" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "How many students are there in total?", + "SpiderSynQuestion": "How many students are there in total?", + "query": "SELECT count(*) FROM STUDENT" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the number of voting records in total.", + "SpiderSynQuestion": "Find the number of voting records in total.", + "query": "SELECT count(*) FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "How many voting records do we have?", + "SpiderSynQuestion": "How many voting records do we have?", + "query": "SELECT count(*) FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct number of president votes.", + "SpiderSynQuestion": "Find the different number of president votes.", + "query": "SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "How many distinct president votes are recorded?", + "SpiderSynQuestion": "How many different president votes are recorded?", + "query": "SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the maximum age of all the students.", + "SpiderSynQuestion": "Find the maximum age of all the students.", + "query": "SELECT max(Age) FROM STUDENT" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What is the oldest age among the students?", + "SpiderSynQuestion": "What is the oldest age among the students?", + "query": "SELECT max(Age) FROM STUDENT" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the last names of students with major 50.", + "SpiderSynQuestion": "Find the family names of students with major 50.", + "query": "SELECT LName FROM STUDENT WHERE Major = 50" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the last names of students studying major 50?", + "SpiderSynQuestion": "What are the family names of students studying major 50?", + "query": "SELECT LName FROM STUDENT WHERE Major = 50" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the first names of students with age above 22.", + "SpiderSynQuestion": "Find the forenames of students with age above 22.", + "query": "SELECT Fname FROM STUDENT WHERE Age > 22" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the first names of all the students aged above 22?", + "SpiderSynQuestion": "What are the forenames of all the students aged above 22?", + "query": "SELECT Fname FROM STUDENT WHERE Age > 22" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the majors of male (sex is M) students?", + "SpiderSynQuestion": "What are the discipline of male (sex is M) students?", + "query": "SELECT Major FROM STUDENT WHERE Sex = \"M\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "List the major of each male student.", + "SpiderSynQuestion": "List the discipline of each male student.", + "query": "SELECT Major FROM STUDENT WHERE Sex = \"M\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What is the average age of female (sex is F) students?", + "SpiderSynQuestion": "What is the average age of female (sex is F) students?", + "query": "SELECT avg(Age) FROM STUDENT WHERE Sex = \"F\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the average age of female students.", + "SpiderSynQuestion": "Find the average age of female students.", + "query": "SELECT avg(Age) FROM STUDENT WHERE Sex = \"F\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the maximum and minimum age of students with major 600?", + "SpiderSynQuestion": "What are the maximum and minimum age of students with major 600?", + "query": "SELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Tell me the ages of the oldest and youngest students studying major 600.", + "SpiderSynQuestion": "Tell me the ages of the oldest and youngest students studying major 600.", + "query": "SELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Who are the advisors for students that live in a city with city code \"BAL\"?", + "SpiderSynQuestion": "Who are the advisers for students that live in a city with city code \"BAL\"?", + "query": "SELECT Advisor FROM STUDENT WHERE city_code = \"BAL\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Show the advisors of the students whose city of residence has city code \"BAL\".", + "SpiderSynQuestion": "Show the advisers of the students whose city of residence has city code \"BAL\".", + "query": "SELECT Advisor FROM STUDENT WHERE city_code = \"BAL\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct secretary votes in the fall election cycle?", + "SpiderSynQuestion": "What are the different secretary votes in the fall election cycle?", + "query": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = \"Fall\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Return all the distinct secretary votes made in the fall election cycle.", + "SpiderSynQuestion": "Return all the different secretary votes made in the fall election cycle.", + "query": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = \"Fall\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct president votes on 08/30/2015?", + "SpiderSynQuestion": "What are the different president votes on 08/30/2015?", + "query": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = \"08/30/2015\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Show all the distinct president votes made on 08/30/2015.", + "SpiderSynQuestion": "Show all the different president votes made on 08/30/2015.", + "query": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = \"08/30/2015\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Report the distinct registration date and the election cycle.", + "SpiderSynQuestion": "Report the different registration day and the election cycle.", + "query": "SELECT DISTINCT Registration_Date , Election_Cycle FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct registration dates and the election cycles?", + "SpiderSynQuestion": "What are the different registration day and the election cycles?", + "query": "SELECT DISTINCT Registration_Date , Election_Cycle FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Report the distinct president vote and the vice president vote.", + "SpiderSynQuestion": "Report the different president vote and the vice president vote.", + "query": "SELECT DISTINCT President_Vote , VICE_President_Vote FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "List all the distinct president votes and the vice president votes.", + "SpiderSynQuestion": "List all the different president votes and the vice president votes.", + "query": "SELECT DISTINCT President_Vote , VICE_President_Vote FROM VOTING_RECORD" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct last names of the students who have class president votes.", + "SpiderSynQuestion": "Find the different family names of the students who have class president votes.", + "query": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct last names of the students who have class president votes?", + "SpiderSynQuestion": "What are the different family names of the students who have class president votes?", + "query": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct first names of the students who have class senator votes.", + "SpiderSynQuestion": "Find the different forenames of the students who have class senator votes.", + "query": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct first names of the students who have class president votes?", + "SpiderSynQuestion": "What are the different forenames of the students who have class president votes?", + "query": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct ages of students who have secretary votes in the fall election cycle.", + "SpiderSynQuestion": "Find the different ages of students who have secretary votes in the fall election cycle.", + "query": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = \"Fall\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct ages of students who have secretary votes in the fall election cycle?", + "SpiderSynQuestion": "What are the different ages of students who have secretary votes in the fall election cycle?", + "query": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = \"Fall\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct Advisor of students who have treasurer votes in the spring election cycle.", + "SpiderSynQuestion": "Find the different Adviser of students who have treasurer votes in the spring election cycle.", + "query": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Who served as an advisor for students who have treasurer votes in the spring election cycle?", + "SpiderSynQuestion": "Who served as an adviser for students who have treasurer votes in the spring election cycle?", + "query": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct majors of students who have treasurer votes.", + "SpiderSynQuestion": "Find the different discipline of students who have treasurer votes.", + "query": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct majors that students with treasurer votes are studying?", + "SpiderSynQuestion": "What are the different discipline that students with treasurer votes are studying?", + "query": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the first and last names of all the female (sex is F) students who have president votes.", + "SpiderSynQuestion": "Find the full names of all the female (sex is F) students who have president votes.", + "query": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = \"F\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the first and last names of all the female students who have president votes?", + "SpiderSynQuestion": "What are the forename and family names of all the female students who have president votes?", + "query": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = \"F\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the first and last name of all the students of age 18 who have vice president votes.", + "SpiderSynQuestion": "Find the forename and surname of all the students of age 18 who have vice president votes.", + "query": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the first names and last names of the students who are 18 years old and have vice president votes.", + "SpiderSynQuestion": "What are the forenames and surnames of the students who are 18 years old and have vice president votes.", + "query": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "How many male (sex is M) students have class senator votes in the fall election cycle?", + "SpiderSynQuestion": "How many male (sex is M) students have class senator votes in the fall election cycle?", + "query": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = \"M\" AND T2.Election_Cycle = \"Fall\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Count the number of male students who had class senator votes in the fall election cycle.", + "SpiderSynQuestion": "Count the number of male students who had class senator votes in the fall election cycle.", + "query": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = \"M\" AND T2.Election_Cycle = \"Fall\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.", + "SpiderSynQuestion": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.", + "query": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Which students live in the city with code \"NYC\" and have class senator votes in the spring election cycle? Count the numbers.", + "SpiderSynQuestion": "Which students live in the city with code \"NYC\" and have class senator votes in the spring election cycle? Count the numbers.", + "query": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the average age of students who live in the city with code \"NYC\" and have secretary votes in the spring election cycle.", + "SpiderSynQuestion": "Find the average age of students who live in the city with code \"NYC\" and have secretary votes in the spring election cycle.", + "query": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle?", + "SpiderSynQuestion": "What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle?", + "query": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.", + "SpiderSynQuestion": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.", + "query": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = \"F\" AND T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What is the average age of the female students with secretary votes in the spring election cycle?", + "SpiderSynQuestion": "What is the average age of the female students with secretary votes in the spring election cycle?", + "query": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = \"F\" AND T2.Election_Cycle = \"Spring\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", + "SpiderSynQuestion": "Find the different forenames of all the students who have vice president votes and whose city code is not PIT.", + "query": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT?", + "SpiderSynQuestion": "What are the different forenames of the students who have vice president votes and reside in a city whose city code is not PIT?", + "query": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct last names of all the students who have president votes and whose advisor is not 2192.", + "SpiderSynQuestion": "Find the different family names of all the students who have president votes and whose advisor is not 2192.", + "query": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"2192\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?", + "SpiderSynQuestion": "What are the different family names of the students who have president votes but do not have 2192 as the advisor?", + "query": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"2192\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the distinct last names of all the students who have president votes and whose advisor is 8741.", + "SpiderSynQuestion": "Find the different surnames of all the students who have president votes and whose advisor is 8741.", + "query": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"8741\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the distinct last names of the students who have president votes and have 8741 as the advisor?", + "SpiderSynQuestion": "What are the different surnames of the students who have president votes and have 8741 as the advisor?", + "query": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"8741\"" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "For each advisor, report the total number of students advised by him or her.", + "SpiderSynQuestion": "For each adviser, report the total number of students advised by him or her.", + "query": "SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "How many students does each advisor have?", + "SpiderSynQuestion": "How many students does each adviser have?", + "query": "SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Report all advisors that advise more than 2 students.", + "SpiderSynQuestion": "Report all advisers that advise more than 2 students.", + "query": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Which advisors have more than two students?", + "SpiderSynQuestion": "Which advisers have more than two students?", + "query": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Report all majors that have less than 3 students.", + "SpiderSynQuestion": "Report all discipline that have less than 3 students.", + "query": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What are the majors only less than three students are studying?", + "SpiderSynQuestion": "What are the discipline only less than three students are studying?", + "query": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "For each election cycle, report the number of voting records.", + "SpiderSynQuestion": "For each election cycle, report the number of voting records.", + "query": "SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Count the number of voting records for each election cycle.", + "SpiderSynQuestion": "Count the number of voting records for each election cycle.", + "query": "SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Which major has the most students?", + "SpiderSynQuestion": "Which discipline has the most students?", + "query": "SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the major that is studied by the largest number of students.", + "SpiderSynQuestion": "Find the discipline that is studied by the largest number of students.", + "query": "SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What is the most common major among female (sex is F) students?", + "SpiderSynQuestion": "What is the most common discipline among female (sex is F) students?", + "query": "SELECT Major FROM STUDENT WHERE Sex = \"F\" GROUP BY major ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Find the major that is studied by the most female students.", + "SpiderSynQuestion": "Find the discipline that is studied by the most female students.", + "query": "SELECT Major FROM STUDENT WHERE Sex = \"F\" GROUP BY major ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "What is the city_code of the city that the most students live in?", + "SpiderSynQuestion": "What is the city_code of the city that the most students live in?", + "query": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Return the code of the city that has the most students.", + "SpiderSynQuestion": "Return the code of the city that has the most students.", + "query": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Report the distinct advisors who have more than 2 students.", + "SpiderSynQuestion": "Report the different advisers who have more than 2 students.", + "query": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2" + }, + { + "db_id": "voter_2", + "SpiderQuestion": "Which advisors are advising more than 2 students?", + "SpiderSynQuestion": "Which advisers are advising more than 2 students?", + "query": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many products are there?", + "SpiderSynQuestion": "How many goods are there?", + "query": "SELECT count(*) FROM products" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of products.", + "SpiderSynQuestion": "Count the number of goods.", + "query": "SELECT count(*) FROM products" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many colors are there?", + "SpiderSynQuestion": "How many colours are there?", + "query": "SELECT count(*) FROM ref_colors" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of colors.", + "SpiderSynQuestion": "Count the number of colours.", + "query": "SELECT count(*) FROM ref_colors" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many characteristics are there?", + "SpiderSynQuestion": "How many features are there?", + "query": "SELECT count(*) FROM CHARACTERISTICS" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of characteristics.", + "SpiderSynQuestion": "Count the number of features.", + "query": "SELECT count(*) FROM CHARACTERISTICS" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names and buying prices of all the products?", + "SpiderSynQuestion": "What are the names and buying prices of all the goods?", + "query": "SELECT product_name , typical_buying_price FROM products" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the names and typical buying prices for all products.", + "SpiderSynQuestion": "Return the names and typical buying prices for all goods.", + "query": "SELECT product_name , typical_buying_price FROM products" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "List the description of all the colors.", + "SpiderSynQuestion": "List the describing content of all the colours.", + "query": "SELECT color_description FROM ref_colors" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the descriptions for each color?", + "SpiderSynQuestion": "What are the descriptions for each colour?", + "query": "SELECT color_description FROM ref_colors" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the names of all the product characteristics.", + "SpiderSynQuestion": "Find the names of all the goods features.", + "query": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the different names of the product characteristics?", + "SpiderSynQuestion": "What are the different names of the goods features?", + "query": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names of products with category \"Spices\"?", + "SpiderSynQuestion": "What are the names of goods with category \"Spices\"?", + "query": "SELECT product_name FROM products WHERE product_category_code = \"Spices\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the names of products in the category 'Spices'.", + "SpiderSynQuestion": "Return the names of goods in the category 'Spices'.", + "query": "SELECT product_name FROM products WHERE product_category_code = \"Spices\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "List the names, color descriptions and product descriptions of products with category \"Herbs\".", + "SpiderSynQuestion": "List the names, colour descriptions and goods descriptions of goods with category \"Herbs\".", + "query": "SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = \"Herbs\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?", + "SpiderSynQuestion": "What are the names, colour descriptions, and goods descriptions for goods in the 'Herbs' category?", + "query": "SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = \"Herbs\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many products are there under the category \"Seeds\"?", + "SpiderSynQuestion": "How many goods are there under the category \"Seeds\"?", + "query": "SELECT count(*) FROM products WHERE product_category_code = \"Seeds\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of products in the category 'Seeds'.", + "SpiderSynQuestion": "Count the number of goods in the category 'Seeds'.", + "query": "SELECT count(*) FROM products WHERE product_category_code = \"Seeds\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the number of products with category \"Spices\" and typically sold above 1000.", + "SpiderSynQuestion": "Find the number of goods with category \"Spices\" and typically sold above 1000.", + "query": "SELECT count(*) FROM products WHERE product_category_code = \"Spices\" AND typical_buying_price > 1000" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many products are in the 'Spices' category and have a typical price of over 1000?", + "SpiderSynQuestion": "How many goods are in the 'Spices' category and have a typical price of over 1000?", + "query": "SELECT count(*) FROM products WHERE product_category_code = \"Spices\" AND typical_buying_price > 1000" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the category and typical buying price of the product with name \"cumin\"?", + "SpiderSynQuestion": "What is the type and typical buying price of the goods with name \"cumin\"?", + "query": "SELECT product_category_code , typical_buying_price FROM products WHERE product_name = \"cumin\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the category code and typical price of 'cumin'.", + "SpiderSynQuestion": "Return the type code and typical price of 'cumin'.", + "query": "SELECT product_category_code , typical_buying_price FROM products WHERE product_name = \"cumin\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Which category does the product named \"flax\" belong to?", + "SpiderSynQuestion": "Which type does the goods named \"flax\" belong to?", + "query": "SELECT product_category_code FROM products WHERE product_name = \"flax\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the code of the category that the product with the name 'flax' belongs to?", + "SpiderSynQuestion": "What is the code of the type that the goods with the name 'flax' belongs to?", + "query": "SELECT product_category_code FROM products WHERE product_name = \"flax\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the name of the product with the color description 'yellow'?", + "SpiderSynQuestion": "What is the name of the goods with the color description 'yellow'?", + "query": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Give the name of the products that have a color description 'yellow'.", + "SpiderSynQuestion": "Give the name of the goods that have a color description 'yellow'.", + "query": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the category descriptions of the products whose descriptions include letter 't'.", + "SpiderSynQuestion": "Find the type descriptions of the goods whose descriptions include letter 't'.", + "query": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the descriptions of the categories that products with product descriptions that contain the letter t are in?", + "SpiderSynQuestion": "What are the descriptions of the type that goods with goods descriptions that contain the letter t are in?", + "query": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the color description of the product with name \"catnip\"?", + "SpiderSynQuestion": "What is the colour describing content of the goods with name \"catnip\"?", + "query": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"catnip\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Give the color description for the product 'catnip'.", + "SpiderSynQuestion": "Give the colour describing content for the goods 'catnip'.", + "query": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"catnip\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the color code and description of the product named \"chervil\"?", + "SpiderSynQuestion": "What is the colour code and describing content of the goods named \"chervil\"?", + "query": "SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"chervil\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the color code and description for the product with the name 'chervil'.", + "SpiderSynQuestion": "Return the colour code and describing content for the goods with the name 'chervil'.", + "query": "SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"chervil\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the id and color description of the products with at least 2 characteristics.", + "SpiderSynQuestion": "Find the id and colour describing content of the goods with at least 2 characteristics.", + "query": "SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) >= 2" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the product ids and color descriptions for products with two or more characteristics?", + "SpiderSynQuestion": "What are the goods ids and colour descriptions for goods with two or more characteristics?", + "query": "SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) >= 2" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "List all the product names with the color description \"white\".", + "SpiderSynQuestion": "List all the goods names with the colour description \"white\".", + "query": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"white\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names of products with 'white' as their color description?", + "SpiderSynQuestion": "What are the names of goods with 'white' as their colour description?", + "query": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"white\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the name and typical buying and selling prices of the products that have color described as \"yellow\"?", + "SpiderSynQuestion": "What are the name and typical buying and selling prices of the goods that have color described as \"yellow\"?", + "query": "SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"yellow\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the names and typical buying and selling prices for products that have 'yellow' as their color description.", + "SpiderSynQuestion": "Return the names and typical buying and selling prices for goods that have 'yellow' as their color description.", + "query": "SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"yellow\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many characteristics does the product named \"sesame\" have?", + "SpiderSynQuestion": "How many features does the goods named \"sesame\" have?", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"sesame\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of characteristics the product 'sesame' has.", + "SpiderSynQuestion": "Count the number of features the goods 'sesame' has.", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"sesame\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many distinct characteristic names does the product \"cumin\" have?", + "SpiderSynQuestion": "How many different feature names does the goods \"cumin\" have?", + "query": "SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of different characteristic names the product 'cumin' has.", + "SpiderSynQuestion": "Count the number of different feature names the goods 'cumin' has.", + "query": "SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are all the characteristic names of product \"sesame\"?", + "SpiderSynQuestion": "What are all the feature names of goods \"sesame\"?", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the characteristic names of the 'sesame' product.", + "SpiderSynQuestion": "Return the feature names of the 'sesame' goods.", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "List all the characteristic names and data types of product \"cumin\".", + "SpiderSynQuestion": "List all the feature names and data types of goods \"cumin\".", + "query": "SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names and data types of the characteristics of the 'cumin' product?", + "SpiderSynQuestion": "What are the names and data types of the features of the 'cumin' goods?", + "query": "SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "List all characteristics of product named \"sesame\" with type code \"Grade\".", + "SpiderSynQuestion": "List all features of goods named \"sesame\" with type code \"Grade\".", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\" AND t3.characteristic_type_code = \"Grade\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?", + "SpiderSynQuestion": "What are the names of the features of the goods 'sesame' that have the feature type code 'Grade'?", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\" AND t3.characteristic_type_code = \"Grade\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many characteristics does the product named \"laurel\" have?", + "SpiderSynQuestion": "How many features does the goods named \"laurel\" have?", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"laurel\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of characteristics of the product named 'laurel'.", + "SpiderSynQuestion": "Count the number of features of the goods named 'laurel'.", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"laurel\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the number of characteristics that the product \"flax\" has.", + "SpiderSynQuestion": "Find the number of features that the goods \"flax\" has.", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"flax\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of characteristics of the 'flax' product.", + "SpiderSynQuestion": "Count the number of features of the 'flax' goods.", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"flax\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the name of the products that have the color description \"red\" and have the characteristic name \"fast\".", + "SpiderSynQuestion": "Find the name of the goods that have the colour description \"red\" and have the characteristic name \"fast\".", + "query": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"fast\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names of the products that have a color description of 'red' and the 'fast' characteristic?", + "SpiderSynQuestion": "What are the names of the goods that have a colour description of 'red' and the 'fast' characteristic?", + "query": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"fast\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many products have the characteristic named \"hot\"?", + "SpiderSynQuestion": "How many goods have the feature named \"hot\"?", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"hot\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of products with the 'hot' charactersitic.", + "SpiderSynQuestion": "Count the number of goods with the 'hot' feature.", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"hot\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "List the all the distinct names of the products with the characteristic name 'warm'.", + "SpiderSynQuestion": "List the all the different names of the goods with the characteristic name 'warm'.", + "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"warm\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the different product names for products that have the 'warm' characteristic:?", + "SpiderSynQuestion": "What are the different goods names for goods that have the 'warm' characteristic:?", + "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"warm\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the number of the products that have their color described as \"red\" and have a characteristic named \"slow\".", + "SpiderSynQuestion": "Find the number of the goods that have their color described as \"red\" and have a characteristic named \"slow\".", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"slow\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many products have the color description 'red' and the characteristic name 'slow'?", + "SpiderSynQuestion": "How many goods have the colour description 'red' and the characteristic name 'slow'?", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"slow\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the products that have the color description \"white\" or have the characteristic name \"hot\".", + "SpiderSynQuestion": "Count the goods that have the colour description \"white\" or have the characteristic name \"hot\".", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"white\" OR t3.characteristic_name = \"hot\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many products have their color described as 'white' or have a characteristic with the name 'hot'?", + "SpiderSynQuestion": "How many goods have their colour described as 'white' or have a characteristic with the name 'hot'?", + "query": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"white\" OR t3.characteristic_name = \"hot\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the unit of measuerment of the product category code \"Herbs\"?", + "SpiderSynQuestion": "What is the unit of measurement of the goods type code \"Herbs\"?", + "query": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the unit of measure for 'Herb' products.", + "SpiderSynQuestion": "Return the unit of measurement for 'Herb' goods.", + "query": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the product category description of the product category with code \"Spices\".", + "SpiderSynQuestion": "Find the goods category describing content of the goods category with code \"Spices\".", + "query": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = \"Spices\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the description of the product category with the code 'Spices'?", + "SpiderSynQuestion": "What is the describing content of the goods category with the code 'Spices'?", + "query": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = \"Spices\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the product category description and unit of measurement of category \"Herbs\"?", + "SpiderSynQuestion": "What is the goods category describing content and unit of measurement of category \"Herbs\"?", + "query": "SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the description and unit of measurement for products in the 'Herbs' category.", + "SpiderSynQuestion": "Return the describing content and unit of measurement for goods in the 'Herbs' category.", + "query": "SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the unit of measurement of product named \"cumin\"?", + "SpiderSynQuestion": "What is the unit of measurement of goods named \"cumin\"?", + "query": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"cumin\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Give the unit of measure for the product with the name 'cumin'.", + "SpiderSynQuestion": "Give the unit of measurement for the goods with the name 'cumin'.", + "query": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"cumin\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the unit of measurement and product category code of product named \"chervil\".", + "SpiderSynQuestion": "Find the unit of measurement and goods category code of goods named \"chervil\".", + "query": "SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"chervil\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the unit of measure and category code for the 'chervil' product?", + "SpiderSynQuestion": "What are the unit of measurement and category code for the 'chervil' goods?", + "query": "SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"chervil\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Find the product names that are colored 'white' but do not have unit of measurement \"Handful\".", + "SpiderSynQuestion": "Find the goods names that are colored 'white' but do not have unit of measurement \"Handful\".", + "query": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = \"white\" AND t2.unit_of_measure != \"Handful\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?", + "SpiderSynQuestion": "What are the names of goods that are not 'white' in color and are not measured by the unit 'Handful'?", + "query": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = \"white\" AND t2.unit_of_measure != \"Handful\"" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the description of the color for most products?", + "SpiderSynQuestion": "What is the describing content of the color for most goods?", + "query": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the color description that is most common across all products.", + "SpiderSynQuestion": "Return the colour describing content that is most common across all goods.", + "query": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the description of the color used by least products?", + "SpiderSynQuestion": "What is the describing content of the colour used by least goods?", + "query": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Give the color description that is least common across products.", + "SpiderSynQuestion": "Give the colour describing content that is least common across goods.", + "query": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What is the characteristic name used by most number of the products?", + "SpiderSynQuestion": "What is the feature name used by most number of the goods?", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Return the name of the characteristic that is most common across all products.", + "SpiderSynQuestion": "Return the name of the feature that is most common across all goods.", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are the names, details and data types of the characteristics which are never used by any product?", + "SpiderSynQuestion": "What are the names, information and data types of the characteristics which are never used by any goods?", + "query": "SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Give the names, details, and data types of characteristics that are not found in any product.", + "SpiderSynQuestion": "Give the names, information, and data types of characteristics that are not found in any goods.", + "query": "SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "What are characteristic names used at least twice across all products?", + "SpiderSynQuestion": "What are feature names used at least twice across all goods?", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Give the names of characteristics that are in two or more products?", + "SpiderSynQuestion": "Give the names of features that are in two or more goods?", + "query": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "How many colors are never used by any product?", + "SpiderSynQuestion": "How many colours are never used by any goods?", + "query": "SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )" + }, + { + "db_id": "products_gen_characteristics", + "SpiderQuestion": "Count the number of colors that are not used in any products.", + "SpiderSynQuestion": "Count the number of colours that are not used in any goods.", + "query": "SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )" + }, + { + "db_id": "swimming", + "SpiderQuestion": "How many events are there?", + "SpiderSynQuestion": "How many events are there?", + "query": "SELECT count(*) FROM event" + }, + { + "db_id": "swimming", + "SpiderQuestion": "List all the event names by year from the most recent to the oldest.", + "SpiderSynQuestion": "List all the event names by year from the most recent to the oldest.", + "query": "SELECT name FROM event ORDER BY YEAR DESC" + }, + { + "db_id": "swimming", + "SpiderQuestion": "What is the name of the event that happened in the most recent year?", + "SpiderSynQuestion": "What is the name of the event that happened in the most recent year?", + "query": "SELECT name FROM event ORDER BY YEAR DESC LIMIT 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "How many stadiums are there?", + "SpiderSynQuestion": "How many stadiums are there?", + "query": "SELECT count(*) FROM stadium" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the name of the stadium that has the maximum capacity.", + "SpiderSynQuestion": "Find the name of the stadium that has the maximum number of seats.", + "query": "SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of stadiums whose capacity is smaller than the average capacity.", + "SpiderSynQuestion": "Find the names of stadiums whose capacity is smaller than the average capacity.", + "query": "SELECT name FROM stadium WHERE capacity < (SELECT avg(capacity) FROM stadium)" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the country that has the most stadiums.", + "SpiderSynQuestion": "Find the nation that has the most stadiums.", + "query": "SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Which country has at most 3 stadiums listed?", + "SpiderSynQuestion": "Which nation has at most 3 stadiums listed?", + "query": "SELECT country FROM stadium GROUP BY country HAVING count(*) <= 3" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?", + "SpiderSynQuestion": "Which nation has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?", + "query": "SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000" + }, + { + "db_id": "swimming", + "SpiderQuestion": "How many cities have a stadium that was opened before the year of 2006?", + "SpiderSynQuestion": "How many towns have a stadium that was opened before the year of 2006?", + "query": "SELECT count(DISTINCT city) FROM stadium WHERE opening_year < 2006" + }, + { + "db_id": "swimming", + "SpiderQuestion": "How many stadiums does each country have?", + "SpiderSynQuestion": "How many stadiums does each nation have?", + "query": "SELECT country , count(*) FROM stadium GROUP BY country" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Which countries do not have a stadium that was opened after 2006?", + "SpiderSynQuestion": "Which nations do not have a stadium that was opened after 2006?", + "query": "SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006" + }, + { + "db_id": "swimming", + "SpiderQuestion": "How many stadiums are not in country \"Russia\"?", + "SpiderSynQuestion": "How many stadiums are not in country \"Russia\"?", + "query": "SELECT count(*) FROM stadium WHERE country != 'Russia'" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.", + "SpiderSynQuestion": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.", + "query": "SELECT name FROM swimmer ORDER BY meter_100" + }, + { + "db_id": "swimming", + "SpiderQuestion": "How many different countries are all the swimmers from?", + "SpiderSynQuestion": "How many different countries are all the swimmers from?", + "query": "SELECT count(DISTINCT nationality) FROM swimmer" + }, + { + "db_id": "swimming", + "SpiderQuestion": "List countries that have more than one swimmer.", + "SpiderSynQuestion": "List countries that have more than one swimmer.", + "query": "SELECT nationality , count(*) FROM swimmer GROUP BY nationality HAVING count(*) > 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find all 200 meter and 300 meter results of swimmers with nationality \"Australia\".", + "SpiderSynQuestion": "Find all 200m and 300m results of swimmers with nationality \"Australia\".", + "query": "SELECT meter_200 , meter_300 FROM swimmer WHERE nationality = 'Australia'" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of swimmers who has a result of \"win\".", + "SpiderSynQuestion": "Find the names of swimmers who has a result of \"win\".", + "query": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'" + }, + { + "db_id": "swimming", + "SpiderQuestion": "What is the name of the stadium which held the most events?", + "SpiderSynQuestion": "What is the name of the stadium which held the most events?", + "query": "SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the name and capacity of the stadium where the event named \"World Junior\" happened.", + "SpiderSynQuestion": "Find the name and capacity of the stadium where the event named \"World Junior\" happened.", + "query": "SELECT t1.name , t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior'" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of stadiums which have never had any event.", + "SpiderSynQuestion": "Find the names of stadiums which have never had any event.", + "query": "SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the name of the swimmer who has the most records.", + "SpiderSynQuestion": "Find the name of the swimmer who has the most records.", + "query": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the name of the swimmer who has at least 2 records.", + "SpiderSynQuestion": "Find the name of the swimmer who has at least 2 records.", + "query": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*) >= 2" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the name and nationality of the swimmer who has won (i.e., has a result of \"win\") more than 1 time.", + "SpiderSynQuestion": "Find the name and nation of the swimmer who has won (i.e., has a result of \"win\") more than 1 time.", + "query": "SELECT t1.name , t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING count(*) > 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of the swimmers who have no record.", + "SpiderSynQuestion": "Find the names of the swimmers who have no record.", + "query": "SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of the swimmers who have both \"win\" and \"loss\" results in the record.", + "SpiderSynQuestion": "Find the names of the swimmers who have both \"win\" and \"loss\" results in the record.", + "query": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss'" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of stadiums that some Australian swimmers have been to.", + "SpiderSynQuestion": "Find the names of stadiums that some Australian swimmers have been to.", + "query": "SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia'" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find the names of stadiums that the most swimmers have been to.", + "SpiderSynQuestion": "Find the names of stadiums that the most swimmers have been to.", + "query": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "swimming", + "SpiderQuestion": "Find all details for each swimmer.", + "SpiderSynQuestion": "Find all information for each swimmer.", + "query": "SELECT * FROM swimmer" + }, + { + "db_id": "swimming", + "SpiderQuestion": "What is the average capacity of the stadiums that were opened in year 2005?", + "SpiderSynQuestion": "What is the average capacity of the stadiums that were opened in year 2005?", + "query": "SELECT avg(capacity) FROM stadium WHERE opening_year = 2005" + }, + { + "db_id": "railway", + "SpiderQuestion": "How many railways are there?", + "SpiderSynQuestion": "How many railroads are there?", + "query": "SELECT count(*) FROM railway" + }, + { + "db_id": "railway", + "SpiderQuestion": "List the builders of railways in ascending alphabetical order.", + "SpiderSynQuestion": "List the builders of railroads in ascending alphabetical order.", + "query": "SELECT Builder FROM railway ORDER BY Builder ASC" + }, + { + "db_id": "railway", + "SpiderQuestion": "List the wheels and locations of the railways.", + "SpiderSynQuestion": "List the wheels and positions of the railroads.", + "query": "SELECT Wheels , LOCATION FROM railway" + }, + { + "db_id": "railway", + "SpiderQuestion": "What is the maximum level of managers in countries that are not \"Australia\"?", + "SpiderSynQuestion": "What is the maximum level of heads in countries that are not \"Australia\"?", + "query": "SELECT max(LEVEL) FROM manager WHERE Country != \"Australia\t\"" + }, + { + "db_id": "railway", + "SpiderQuestion": "What is the average age for all managers?", + "SpiderSynQuestion": "What is the average age for all heads?", + "query": "SELECT avg(Age) FROM manager" + }, + { + "db_id": "railway", + "SpiderQuestion": "What are the names of managers in ascending order of level?", + "SpiderSynQuestion": "What are the names of heads in ascending order of level?", + "query": "SELECT Name FROM manager ORDER BY LEVEL ASC" + }, + { + "db_id": "railway", + "SpiderQuestion": "What are the names and arrival times of trains?", + "SpiderSynQuestion": "What are the names and arrival times of trains?", + "query": "SELECT Name , Arrival FROM train" + }, + { + "db_id": "railway", + "SpiderQuestion": "What is the name of the oldest manager?", + "SpiderSynQuestion": "What is the name of the oldest head?", + "query": "SELECT Name FROM manager ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the names of trains and locations of railways they are in.", + "SpiderSynQuestion": "Show the names of trains and positions of railroads they are in.", + "query": "SELECT T2.Name , T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the builder of railways associated with the trains named \"Andaman Exp\".", + "SpiderSynQuestion": "Show the builder of railroads associated with the trains named \"Andaman Exp\".", + "query": "SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID WHERE T2.Name = \"Andaman Exp\"" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show id and location of railways that are associated with more than one train.", + "SpiderSynQuestion": "Show id and position of railroads that are associated with more than one train.", + "query": "SELECT T2.Railway_ID , T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*) > 1" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the id and builder of the railway that are associated with the most trains.", + "SpiderSynQuestion": "Show the id and builder of the railroad that are associated with the most trains.", + "query": "SELECT T2.Railway_ID , T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show different builders of railways, along with the corresponding number of railways using each builder.", + "SpiderSynQuestion": "Show different builders of railroads, along with the corresponding number of railroads using each builder.", + "query": "SELECT Builder , COUNT(*) FROM railway GROUP BY Builder" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the most common builder of railways.", + "SpiderSynQuestion": "Show the most common builder of railroads.", + "query": "SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show different locations of railways along with the corresponding number of railways at each location.", + "SpiderSynQuestion": "Show different positions of railroads along with the corresponding number of railroads at each position.", + "query": "SELECT LOCATION , COUNT(*) FROM railway GROUP BY LOCATION" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the locations that have more than one railways.", + "SpiderSynQuestion": "Show the positions that have more than one railroads.", + "query": "SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*) > 1" + }, + { + "db_id": "railway", + "SpiderQuestion": "List the object number of railways that do not have any trains.", + "SpiderSynQuestion": "List the object number of railroads that do not have any trains.", + "query": "SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train)" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the countries that have both managers of age above 50 and managers of age below 46.", + "SpiderSynQuestion": "Show the nationalities that have both managers of age above 50 and managers of age below 46.", + "query": "SELECT Country FROM manager WHERE Age > 50 INTERSECT SELECT Country FROM manager WHERE Age < 46" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the distinct countries of managers.", + "SpiderSynQuestion": "Show the different nationalities of managers.", + "query": "SELECT DISTINCT Country FROM manager" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the working years of managers in descending order of their level.", + "SpiderSynQuestion": "Show the working years of heads in descending order of their level.", + "query": "SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC" + }, + { + "db_id": "railway", + "SpiderQuestion": "Show the countries that have managers of age above 50 or below 46.", + "SpiderSynQuestion": "Show the nationalities that have managers of age above 50 or below 46.", + "query": "SELECT Country FROM manager WHERE Age > 50 OR Age < 46" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "How many addresses are there in country USA?", + "SpiderSynQuestion": "How many locations are there in country USA?", + "query": "SELECT count(*) FROM addresses WHERE country = 'USA'" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show all distinct cities in the address record.", + "SpiderSynQuestion": "Show all different towns in the location record.", + "query": "SELECT DISTINCT city FROM addresses" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show each state and the number of addresses in each state.", + "SpiderSynQuestion": "Show each state and the number of locations in each state.", + "query": "SELECT state_province_county , count(*) FROM addresses GROUP BY state_province_county" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show names and phones of customers who do not have address information.", + "SpiderSynQuestion": "Show names and telephones of clients who do not have address information.", + "query": "SELECT customer_name , customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history)" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the name of the customer who has the most orders.", + "SpiderSynQuestion": "Show the name of the client who has the most orders.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the product type codes which have at least two products.", + "SpiderSynQuestion": "Show the goods type codes which have at least two goods.", + "query": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING count(*) >= 2" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the names of customers who have both an order in completed status and an order in part status.", + "SpiderSynQuestion": "Show the names of clients who have both an order in completed status and an order in part status.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part'" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the name, phone, and payment method code for all customers in descending order of customer number.", + "SpiderSynQuestion": "Show the name, telephone, and payment method code for all clients in descending order of client number.", + "query": "SELECT customer_name , customer_phone , payment_method_code FROM customers ORDER BY customer_number DESC" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the product name and total order quantity for each product.", + "SpiderSynQuestion": "Show the goods name and total number of order for each goods.", + "query": "SELECT T1.product_name , sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the minimum, maximum, average price for all products.", + "SpiderSynQuestion": "Show the minimum, maximum, average price for all goods.", + "query": "SELECT min(product_price) , max(product_price) , avg(product_price) FROM products" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "How many products have a price higher than the average?", + "SpiderSynQuestion": "How many goods have a price higher than the average?", + "query": "SELECT count(*) FROM products WHERE product_price > (SELECT avg(product_price) FROM products)" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the customer name, customer address city, date from, and date to for each customer address history.", + "SpiderSynQuestion": "Show the client name, client location city, date from, and date to for each client location history.", + "query": "SELECT T2.customer_name , T3.city , T1.date_from , T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the names of customers who use Credit Card payment method and have more than 2 orders.", + "SpiderSynQuestion": "Show the names of clients who use Credit Card payment method and have more than 2 orders.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id HAVING count(*) > 2" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "What are the name and phone of the customer with the most ordered product quantity?", + "SpiderSynQuestion": "What are the name and telephone of the client with the most ordered goods quantity?", + "query": "SELECT T1.customer_name , T1.customer_phone FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T3.order_id = T2.order_id GROUP BY T1.customer_id ORDER BY sum(T3.order_quantity) DESC LIMIT 1" + }, + { + "db_id": "customers_and_products_contacts", + "SpiderQuestion": "Show the product type and name for the products with price higher than 1000 or lower than 500.", + "SpiderSynQuestion": "Show the goods type and name for the goods with price higher than 1000 or lower than 500.", + "query": "SELECT product_type_code , product_name FROM products WHERE product_price > 1000 OR product_price < 500" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of dorms only for female (F gender).", + "SpiderSynQuestion": "Find the name of dormitories only for female (F gender).", + "query": "SELECT dorm_name FROM dorm WHERE gender = 'F'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the names of the all-female dorms?", + "SpiderSynQuestion": "What are the names of the all-female dormitories?", + "query": "SELECT dorm_name FROM dorm WHERE gender = 'F'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of dorms that can accommodate more than 300 students.", + "SpiderSynQuestion": "Find the name of dormitories that can accommodate more than 300 students.", + "query": "SELECT dorm_name FROM dorm WHERE student_capacity > 300" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the names of all the dorms that can accomdate more than 300 students?", + "SpiderSynQuestion": "What are the names of all the dormitories that can accomdate more than 300 students?", + "query": "SELECT dorm_name FROM dorm WHERE student_capacity > 300" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many female students (sex is F) whose age is below 25?", + "SpiderSynQuestion": "How many female students (sex is F) whose age is below 25?", + "query": "SELECT count(*) FROM student WHERE sex = 'F' AND age < 25" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many girl students who are younger than 25?", + "SpiderSynQuestion": "How many girl students who are younger than 25?", + "query": "SELECT count(*) FROM student WHERE sex = 'F' AND age < 25" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first name of students who is older than 20.", + "SpiderSynQuestion": "Find the forename of students who is older than 20.", + "query": "SELECT fname FROM student WHERE age > 20" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the first names of all students who are older than 20?", + "SpiderSynQuestion": "What are the forenames of all students who are older than 20?", + "query": "SELECT fname FROM student WHERE age > 20" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first name of students living in city PHL whose age is between 20 and 25.", + "SpiderSynQuestion": "Find the forename of students living in city PHL whose age is between 20 and 25.", + "query": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the first name of the students who are in age 20 to 25 and living in PHL city?", + "SpiderSynQuestion": "What is the forename of the students who are in age 20 to 25 and living in PHL city?", + "query": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many dorms are there?", + "SpiderSynQuestion": "How many dormitories are there?", + "query": "SELECT count(*) FROM dorm" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many dorms are in the database?", + "SpiderSynQuestion": "How many dormitories are in the database?", + "query": "SELECT count(*) FROM dorm" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of distinct amenities.", + "SpiderSynQuestion": "Find the number of distinct amenities.", + "query": "SELECT count(*) FROM dorm_amenity" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many diffrent dorm amenities are there?", + "SpiderSynQuestion": "How many diffrent dormitory amenities are there?", + "query": "SELECT count(*) FROM dorm_amenity" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the total capacity of all dorms.", + "SpiderSynQuestion": "Find the total capacity of all dormitories.", + "query": "SELECT sum(student_capacity) FROM dorm" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the total student capacity of all dorms?", + "SpiderSynQuestion": "What is the total student capacity of all dormitories?", + "query": "SELECT sum(student_capacity) FROM dorm" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many students are there?", + "SpiderSynQuestion": "How many students are there?", + "query": "SELECT count(*) FROM student" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many students exist?", + "SpiderSynQuestion": "How many students exist?", + "query": "SELECT count(*) FROM student" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the average age of all students living in the each city.", + "SpiderSynQuestion": "Find the average age of all students living in the each city.", + "query": "SELECT avg(age) , city_code FROM student GROUP BY city_code" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the average age for each city and what are those cities?", + "SpiderSynQuestion": "What is the average age for each city and what are those cities?", + "query": "SELECT avg(age) , city_code FROM student GROUP BY city_code" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the average and total capacity of dorms for the students with gender X.", + "SpiderSynQuestion": "Find the average and total capacity of dormitories for the students with gender X.", + "query": "SELECT avg(student_capacity) , sum(student_capacity) FROM dorm WHERE gender = 'X'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the average and total capacity for all dorms who are of gender X?", + "SpiderSynQuestion": "What is the average and total capacity for all dormitories who are of gender X?", + "query": "SELECT avg(student_capacity) , sum(student_capacity) FROM dorm WHERE gender = 'X'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of dorms that have some amenity.", + "SpiderSynQuestion": "Find the number of dormitories that have some amenity.", + "query": "SELECT count(DISTINCT dormid) FROM has_amenity" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many dorms have amenities?", + "SpiderSynQuestion": "How many dormitories have amenities?", + "query": "SELECT count(DISTINCT dormid) FROM has_amenity" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of dorms that do not have any amenity", + "SpiderSynQuestion": "Find the name of dormitories that do not have any amenity", + "query": "SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the names of all the dorms that don't have any amenities?", + "SpiderSynQuestion": "What are the names of all the dormitories that don't have any amenities?", + "query": "SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of distinct gender for dorms.", + "SpiderSynQuestion": "Find the number of different sex for dormitories.", + "query": "SELECT count(DISTINCT gender) FROM dorm" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many different genders are there in the dorms?", + "SpiderSynQuestion": "How many different sexs are there in the dormitories?", + "query": "SELECT count(DISTINCT gender) FROM dorm" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019.", + "SpiderSynQuestion": "Find the capacity and sex type of the dormitory whose name has substring \u2018Donor\u2019.", + "query": "SELECT student_capacity , gender FROM dorm WHERE dorm_name LIKE '%Donor%'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?", + "SpiderSynQuestion": "What is the student capacity and type of sex for the dormitory whose name as the phrase Donor in it?", + "query": "SELECT student_capacity , gender FROM dorm WHERE dorm_name LIKE '%Donor%'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.", + "SpiderSynQuestion": "Find the name and sex type of the dormitories whose capacity is greater than 300 or less than 100.", + "query": "SELECT dorm_name , gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the names and types of the dorms that have a capacity greater than 300 or less than 100?", + "SpiderSynQuestion": "What are the names and types of the dormitories that have a capacity greater than 300 or less than 100?", + "query": "SELECT dorm_name , gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the numbers of different majors and cities.", + "SpiderSynQuestion": "Find the numbers of different discipline and cities.", + "query": "SELECT count(DISTINCT major) , count(DISTINCT city_code) FROM student" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many different majors are there and how many different city codes are there for each student?", + "SpiderSynQuestion": "How many different discipline are there and how many different city codes are there for each student?", + "query": "SELECT count(DISTINCT major) , count(DISTINCT city_code) FROM student" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of dorms which have both TV Lounge and Study Room as amenities.", + "SpiderSynQuestion": "Find the name of dormitories which have both TV Lounge and Study Room as amenities.", + "query": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?", + "SpiderSynQuestion": "What is the name of the dormitory with both a TV Lounge and Study Room listed as amenities?", + "query": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of dorms which have TV Lounge but no Study Room as amenity.", + "SpiderSynQuestion": "Find the name of dormitories which have TV Lounge but no Study Room as amenity.", + "query": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the name of each dorm that has a TV Lounge but no study rooms?", + "SpiderSynQuestion": "What is the name of each dormitory that has a TV Lounge but no study rooms?", + "query": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.", + "SpiderSynQuestion": "Find the family name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.", + "query": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the last name of every student who is either female or living in a city with the code BAL or male and under 20?", + "SpiderSynQuestion": "What is the family name of every student who is either female or living in a city with the code BAL or male and under 20?", + "query": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of the dorm with the largest capacity.", + "SpiderSynQuestion": "Find the name of the dormitory with the largest capacity.", + "query": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the names of the dorm with the largest capacity?", + "SpiderSynQuestion": "What are the names of the dormitory with the largest capacity?", + "query": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "List in alphabetic order all different amenities.", + "SpiderSynQuestion": "List in alphabetic order all different amenities.", + "query": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the different dorm amenity names in alphabetical order?", + "SpiderSynQuestion": "What are the different dormitory amenity names in alphabetical order?", + "query": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the code of city where most of students are living in.", + "SpiderSynQuestion": "Find the code of city where most of students are living in.", + "query": "SELECT city_code FROM student GROUP BY city_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the code of the city with the most students?", + "SpiderSynQuestion": "What is the code of the city with the most students?", + "query": "SELECT city_code FROM student GROUP BY city_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first and last name of students whose age is younger than the average age.", + "SpiderSynQuestion": "Find the full name of students whose age is younger than the average age.", + "query": "SELECT fname , lname FROM student WHERE age < (SELECT avg(age) FROM student)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the first and last name of all students who are younger than average?", + "SpiderSynQuestion": "What is the full name of all students who are younger than average?", + "query": "SELECT fname , lname FROM student WHERE age < (SELECT avg(age) FROM student)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages.", + "SpiderSynQuestion": "List the forename and surname of students who are not living in the city with code HKG, and sorted the results by their ages.", + "query": "SELECT fname , lname FROM student WHERE city_code != 'HKG' ORDER BY age" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the first and last names of all students who are not living in the city HKG and order the results by age?", + "SpiderSynQuestion": "What are the full names of all students who are not living in the city HKG and order the results by age?", + "query": "SELECT fname , lname FROM student WHERE city_code != 'HKG' ORDER BY age" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.", + "SpiderSynQuestion": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.", + "query": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the amenities in alphabetical order that Anonymous Donor Hall has?", + "SpiderSynQuestion": "What are the amenities in alphabetical order that Anonymous Donor Hall has?", + "query": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of dorms and total capacity for each gender.", + "SpiderSynQuestion": "Find the number of dormitories and total capacity for each gender.", + "query": "SELECT count(*) , sum(student_capacity) , gender FROM dorm GROUP BY gender" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many dorms are there and what is the total capacity for each gender?", + "SpiderSynQuestion": "How many dormitories are there and what is the total capacity for each gender?", + "query": "SELECT count(*) , sum(student_capacity) , gender FROM dorm GROUP BY gender" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the average and oldest age for students with different sex.", + "SpiderSynQuestion": "Find the average and oldest age for students with different sex.", + "query": "SELECT avg(age) , max(age) , sex FROM student GROUP BY sex" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the average and oldest age for each gender of student?", + "SpiderSynQuestion": "What is the average and oldest age for each gender of student?", + "query": "SELECT avg(age) , max(age) , sex FROM student GROUP BY sex" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of students in each major.", + "SpiderSynQuestion": "Find the number of students in each discipline.", + "query": "SELECT count(*) , major FROM student GROUP BY major" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many students are there in each major?", + "SpiderSynQuestion": "How many students are there in each discipline?", + "query": "SELECT count(*) , major FROM student GROUP BY major" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number and average age of students living in each city.", + "SpiderSynQuestion": "Find the number and average age of students living in each city.", + "query": "SELECT count(*) , avg(age) , city_code FROM student GROUP BY city_code" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many students live in each city and what are their average ages?", + "SpiderSynQuestion": "How many students live in each city and what are their average ages?", + "query": "SELECT count(*) , avg(age) , city_code FROM student GROUP BY city_code" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the average age and number of male students (with sex M) from each city.", + "SpiderSynQuestion": "Find the average age and number of male students (with sex M) from each city.", + "query": "SELECT count(*) , avg(age) , city_code FROM student WHERE sex = 'M' GROUP BY city_code" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the average age and how many male students are there in each city?", + "SpiderSynQuestion": "What is the average age and how many male students are there in each city?", + "query": "SELECT count(*) , avg(age) , city_code FROM student WHERE sex = 'M' GROUP BY city_code" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of students for the cities where have more than one student.", + "SpiderSynQuestion": "Find the number of students for the cities where have more than one student.", + "query": "SELECT count(*) , city_code FROM student GROUP BY city_code HAVING count(*) > 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many students are from each city, and which cities have more than one cities?", + "SpiderSynQuestion": "How many students are from each city, and which cities have more than one cities?", + "query": "SELECT count(*) , city_code FROM student GROUP BY city_code HAVING count(*) > 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first and last name of students who are not in the largest major.", + "SpiderSynQuestion": "Find the forename and family name of students who are not in the largest major.", + "query": "SELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the first and last name of the students who are not in the largest major?", + "SpiderSynQuestion": "What is the forename and surname of the students who are not in the largest major?", + "query": "SELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of students whose age is older than the average age for each gender.", + "SpiderSynQuestion": "Find the number of students whose age is older than the average age for each gender.", + "query": "SELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many students are older than average for each gender?", + "SpiderSynQuestion": "How many students are older than average for each gender?", + "query": "SELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the average age of students living in each dorm and the name of dorm.", + "SpiderSynQuestion": "Find the average age of students living in each dormitory and the name of dormitory.", + "query": "SELECT avg(T1.age) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the average age for each dorm and what are the names of each dorm?", + "SpiderSynQuestion": "What is the average age for each dormitory and what are the names of each dormitory?", + "query": "SELECT avg(T1.age) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of amenities for each of the dorms that can accommodate more than 100 students.", + "SpiderSynQuestion": "Find the number of amenities for each of the dormitories that can accommodate more than 100 students.", + "query": "SELECT count(*) , T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "For each dorm, how many amenities does it have?", + "SpiderSynQuestion": "For each dormitory, how many amenities does it have?", + "query": "SELECT count(*) , T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of students who is older than 20 in each dorm.", + "SpiderSynQuestion": "Find the number of students who is older than 20 in each dormitory.", + "query": "SELECT count(*) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many students are older than 20 in each dorm?", + "SpiderSynQuestion": "How many students are older than 20 in each dormitory?", + "query": "SELECT count(*) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first name of students who are living in the Smith Hall.", + "SpiderSynQuestion": "Find the forename of students who are living in the Smith Hall.", + "query": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the first names of all students in Smith Hall?", + "SpiderSynQuestion": "What are the forenames of all students in Smith Hall?", + "query": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the average age of students who are living in the dorm with the largest capacity.", + "SpiderSynQuestion": "Find the average age of students who are living in the dormitory with the largest capacity.", + "query": "SELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT max(student_capacity) FROM dorm)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the average age of students who are living in the dorm with the largest capacity?", + "SpiderSynQuestion": "What is the average age of students who are living in the dormitory with the largest capacity?", + "query": "SELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT max(student_capacity) FROM dorm)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the total number of students living in the male dorm (with gender M).", + "SpiderSynQuestion": "Find the total number of students living in the male dorm (with gender M).", + "query": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the total number of students who are living in a male dorm?", + "SpiderSynQuestion": "What are the total number of students who are living in a male dorm?", + "query": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the number of female students (with F sex) living in Smith Hall", + "SpiderSynQuestion": "Find the number of female students (with F sex) living in Smith Hall", + "query": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "How many female students live in Smith Hall?", + "SpiderSynQuestion": "How many female students live in Smith Hall?", + "query": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of amenities Smith Hall dorm have.", + "SpiderSynQuestion": "Find the name of amenities Smith Hall dorm have.", + "query": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the names of the amenities that Smith Hall has?", + "SpiderSynQuestion": "What are the names of the amenities that Smith Hall has?", + "query": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.", + "SpiderSynQuestion": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.", + "query": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What amenities does Smith Hall have in alphabetical order?", + "SpiderSynQuestion": "What amenities does Smith Hall have in alphabetical order?", + "query": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of amenity that is most common in all dorms.", + "SpiderSynQuestion": "Find the name of amenity that is most common in all dormitories.", + "query": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the most common amenity in the dorms?", + "SpiderSynQuestion": "What is the most common amenity in the dormitories?", + "query": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first name of students who are living in the dorm that has most number of amenities.", + "SpiderSynQuestion": "Find the forename of students who are living in the dorm that has most number of amenities.", + "query": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the first names of all students who live in the dorm with the most amenities?", + "SpiderSynQuestion": "What are the forenames of all students who live in the dorm with the most amenities?", + "query": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name and capacity of the dorm with least number of amenities.", + "SpiderSynQuestion": "Find the name and capacity of the dormitory with least number of amenities.", + "query": "SELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the name and capacity of the dorm with the fewest amount of amenities?", + "SpiderSynQuestion": "What is the name and capacity of the dormitory with the fewest amount of amenities?", + "query": "SELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of dorms that do not have amenity TV Lounge.", + "SpiderSynQuestion": "Find the name of dormitories that do not have amenity TV Lounge.", + "query": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the names of the dorm that does not have a TV Lounge?", + "SpiderSynQuestion": "What are the names of the dormitory that does not have a TV Lounge?", + "query": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first and last name of students who are living in the dorms that have amenity TV Lounge.", + "SpiderSynQuestion": "Find the full name of students who are living in the dorms that have amenity TV Lounge.", + "query": "SELECT T1.fname , T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the first and last names of all students who are living in a dorm with a TV Lounge?", + "SpiderSynQuestion": "What are the forename and family names of all students who are living in a dorm with a TV Lounge?", + "query": "SELECT T1.fname , T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.", + "SpiderSynQuestion": "Find the forename and age of students who are living in the dorms that do not have amenity TV Lounge.", + "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What is the first name and age of every student who lives in a dorm with a TV Lounge?", + "SpiderSynQuestion": "What is the forename and age of every student who lives in a dorm with a TV Lounge?", + "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "Find the name of amenities of the dorm where the student with last name Smith is living in.", + "SpiderSynQuestion": "Find the name of amenities of the dormitory where the student with last name Smith is living in.", + "query": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith'" + }, + { + "db_id": "dorm_1", + "SpiderQuestion": "What are the amenities in the dorm that a student who has the last name of Smith lives in?", + "SpiderSynQuestion": "What are the amenities in the dormitory that a student who has the last name of Smith lives in?", + "query": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith'" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "How many customers are there?", + "SpiderSynQuestion": "How many clients are there?", + "query": "SELECT count(*) FROM customers" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Count the number of customers.", + "SpiderSynQuestion": "Count the number of clients.", + "query": "SELECT count(*) FROM customers" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the emails and phone numbers of all the customers, ordered by email address and phone number.", + "SpiderSynQuestion": "Find the emails and telephone numbers of all the clients, ordered by email address and telephone number.", + "query": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are the emails and phone numbers of all customers, sorted by email address and phone number?", + "SpiderSynQuestion": "What are the emails and telephone numbers of all clients, sorted by email address and telephone number?", + "query": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Which city has the least number of customers whose type code is \"Good Credit Rating\"?", + "SpiderSynQuestion": "Which city has the least number of clients whose type code is \"Good Credit Rating\"?", + "query": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return the city with the customer type code \"Good Credit Rating\" that had the fewest customers.", + "SpiderSynQuestion": "Return the city with the client type code \"Good Credit Rating\" that had the fewest clients.", + "query": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "List the name of all products along with the number of complaints that they have received.", + "SpiderSynQuestion": "List the name of all goods along with the number of complaints that they have received.", + "query": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are all the different product names, and how many complains has each received?", + "SpiderSynQuestion": "What are all the different goods names, and how many complains has each received?", + "query": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the emails of customers who has filed a complaints of the product with the most complaints.", + "SpiderSynQuestion": "Find the emails of clients who has filed a complaints of the goods with the most complaints.", + "query": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?", + "SpiderSynQuestion": "What are the emails of clients who have filed complaints on the goods which has had the greatest number of complaints?", + "query": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Which products has been complained by the customer who has filed least amount of complaints?", + "SpiderSynQuestion": "Which goods has been complained by the customer who has filed least amount of complaints?", + "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.", + "SpiderSynQuestion": "Return the names of goods that have had complaints filed by the customer who has filed the fewest complaints.", + "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What is the phone number of the customer who has filed the most recent complaint?", + "SpiderSynQuestion": "What is the telephone number of the client who has filed the most recent complaint?", + "query": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return the phone number of the customer who filed the complaint that was raised most recently.", + "SpiderSynQuestion": "Return the telephone number of the client who filed the complaint that was raised most recently.", + "query": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the email and phone number of the customers who have never filed a complaint before.", + "SpiderSynQuestion": "Find the email and telephone number of the clients who have never filed a complaint before.", + "query": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are the emails and phone numbers of custoemrs who have never filed a complaint?", + "SpiderSynQuestion": "What are the emails and telephone numbers of clients who have never filed a complaint?", + "query": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the phone number of all the customers and staff.", + "SpiderSynQuestion": "Find the telephone number of all the clients and staff.", + "query": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are the phone numbers of all customers and all staff members?", + "SpiderSynQuestion": "What are the telephone numbers of all clients and all staff members?", + "query": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What is the description of the product named \"Chocolate\"?", + "SpiderSynQuestion": "What is the describing content of the goods named \"Chocolate\"?", + "query": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return the description of the product called \"Chocolate\".", + "SpiderSynQuestion": "Return the describing content of the goods called \"Chocolate\".", + "query": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the name and category of the most expensive product.", + "SpiderSynQuestion": "Find the name and type of the most expensive goods.", + "query": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What is the name and category code of the product with the highest price?", + "SpiderSynQuestion": "What is the name and type code of the goods with the highest price?", + "query": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the prices of products which has never received a single complaint.", + "SpiderSynQuestion": "Find the prices of goods which has never received a single complaint.", + "query": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are the prices of products that have never gotten a complaint?", + "SpiderSynQuestion": "What are the prices of goods that have never gotten a complaint?", + "query": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What is the average price of the products for each category?", + "SpiderSynQuestion": "What is the average price of the goods for each type?", + "query": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return the average price of products that have each category code.", + "SpiderSynQuestion": "Return the average price of goods that have each type code.", + "query": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the last name of the staff member who processed the complaint of the cheapest product.", + "SpiderSynQuestion": "Find the family name of the staff member who processed the complaint of the cheapest goods.", + "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What is the last name of the staff member in charge of the complaint on the product with the lowest price?", + "SpiderSynQuestion": "What is the family name of the staff member in charge of the complaint on the goods with the lowest price?", + "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Which complaint status has more than 3 records on file?", + "SpiderSynQuestion": "Which complain status has more than 3 records on file?", + "query": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return complaint status codes have more than 3 corresponding complaints?", + "SpiderSynQuestion": "Return complain status codes have more than 3 corresponding complain?", + "query": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the last name of the staff whose email address contains \"wrau\".", + "SpiderSynQuestion": "Find the family name of the staff whose email address contains \"wrau\".", + "query": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are the last names of staff with email addressed containing the substring \"wrau\"?", + "SpiderSynQuestion": "What are the family names of staff with email addressed containing the substring \"wrau\"?", + "query": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "How many customers are there in the customer type with the most customers?", + "SpiderSynQuestion": "How many clients are there in the client type with the most clients?", + "query": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Count the number of customers that have the customer type that is most common.", + "SpiderSynQuestion": "Count the number of clients that have the client type that is most common.", + "query": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What is the last name of the staff who has handled the first ever complaint?", + "SpiderSynQuestion": "What is the family name of the staff who has handled the first ever complaint?", + "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return the last name of the staff member who handled the complaint with the earliest date raised.", + "SpiderSynQuestion": "Return the surname of the staff member who handled the complaint with the earliest date raised.", + "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "How many distinct complaint type codes are there in the database?", + "SpiderSynQuestion": "How many different complain type codes are there in the database?", + "query": "SELECT count(DISTINCT complaint_type_code) FROM complaints" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Count the number of different complaint type codes.", + "SpiderSynQuestion": "Count the number of different complain type codes.", + "query": "SELECT count(DISTINCT complaint_type_code) FROM complaints" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the address line 1 and 2 of the customer with email \"vbogisich@example.org\".", + "SpiderSynQuestion": "Find the location line 1 and 2 of the customer with email \"vbogisich@example.org\".", + "query": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"?", + "SpiderSynQuestion": "What are lines 1 and 2 of the addressed of the client with the email \"vbogisich@example.org\"?", + "query": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Find the number of complaints with Product Failure type for each complaint status.", + "SpiderSynQuestion": "Find the number of complain with Product Failure type for each complaint status.", + "query": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Of complaints with the type code \"Product Failure\", how many had each different status code?", + "SpiderSynQuestion": "Of complain with the type code \"Product Failure\", how many had each different status code?", + "query": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "What is first names of the top 5 staff who have handled the greatest number of complaints?", + "SpiderSynQuestion": "What is forenames of the top 5 staff who have handled the greatest number of complaints?", + "query": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Return the first names of the 5 staff members who have handled the most complaints.", + "SpiderSynQuestion": "Return the forenames of the 5 staff members who have handled the most complaints.", + "query": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Which state has the most customers?", + "SpiderSynQuestion": "Which state has the most clients?", + "query": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "customer_complaints", + "SpiderQuestion": "Give the state that has the most customers.", + "SpiderSynQuestion": "Give the state that has the most clients.", + "query": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "How many submissions are there?", + "SpiderSynQuestion": "How many submissions are there?", + "query": "SELECT count(*) FROM submission" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Count the number of submissions.", + "SpiderSynQuestion": "Count the number of submissions", + "query": "SELECT count(*) FROM submission" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "List the authors of submissions in ascending order of scores.", + "SpiderSynQuestion": "List the writers of submissions in ascending order of scores.", + "query": "SELECT Author FROM submission ORDER BY Scores ASC" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Find the author for each submission and list them in ascending order of submission score.", + "SpiderSynQuestion": "Find the writer for each submission and list them in ascending order of submission score.", + "query": "SELECT Author FROM submission ORDER BY Scores ASC" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "What are the authors of submissions and their colleges?", + "SpiderSynQuestion": "What are the writers of submissions and their colleges?", + "query": "SELECT Author , College FROM submission" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "For each submission, show the author and their affiliated college.", + "SpiderSynQuestion": "For each submission, show the writer and their affiliated university.", + "query": "SELECT Author , College FROM submission" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show the names of authors from college \"Florida\" or \"Temple\"", + "SpiderSynQuestion": "Show the names of writers from college \"Florida\" or \"Temple\"", + "query": "SELECT Author FROM submission WHERE College = \"Florida\" OR College = \"Temple\"" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Which authors with submissions are from college \"Florida\" or \"Temple\"?", + "SpiderSynQuestion": "Which writers with submissions are from college \"Florida\" or \"Temple\"?", + "query": "SELECT Author FROM submission WHERE College = \"Florida\" OR College = \"Temple\"" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "What is the average score of submissions?", + "SpiderSynQuestion": "What is the average score of submissions?", + "query": "SELECT avg(Scores) FROM submission" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Compute the average score of submissions.", + "SpiderSynQuestion": "Compute the average score of submissions.", + "query": "SELECT avg(Scores) FROM submission" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "What is the author of the submission with the highest score?", + "SpiderSynQuestion": "What is the writer of the submission with the highest score?", + "query": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Find the author who achieved the highest score in a submission.", + "SpiderSynQuestion": "Find the writer who achieved the highest score in a submission.", + "query": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show different colleges along with the number of authors of submission from each college.", + "SpiderSynQuestion": "Show different university along with the number of writers of submission from each university.", + "query": "SELECT College , COUNT(*) FROM submission GROUP BY College" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "For each college, return the college name and the count of authors with submissions from that college.", + "SpiderSynQuestion": "For each university, return the university name and the count of authors with submissions from that university.", + "query": "SELECT College , COUNT(*) FROM submission GROUP BY College" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show the most common college of authors of submissions.", + "SpiderSynQuestion": "Show the most common university of authors of submissions.", + "query": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Which college has the most authors with submissions?", + "SpiderSynQuestion": "Which university has the most authors with submissions?", + "query": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.", + "SpiderSynQuestion": "Show the university that have both authors with submission score larger than 90 and authors with submission score smaller than 80.", + "query": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Which colleges have both authors with submission score above 90 and authors with submission score below 80?", + "SpiderSynQuestion": "Which university have both authors with submission score above 90 and authors with submission score below 80?", + "query": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show the authors of submissions and the acceptance results of their submissions.", + "SpiderSynQuestion": "Show the writers of submissions and the acceptance results of their submissions.", + "query": "SELECT T2.Author , T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "For each submission, find its author and acceptance result.", + "SpiderSynQuestion": "For each submission, find its author and acceptance result.", + "query": "SELECT T2.Author , T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show the result of the submission with the highest score.", + "SpiderSynQuestion": "Show the outcome of the submission with the highest score.", + "query": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Which submission received the highest score in acceptance result. Show me the result.", + "SpiderSynQuestion": "Which submission received the highest score in acceptance outcome. Show me the outcome.", + "query": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show each author and the number of workshops they submitted to.", + "SpiderSynQuestion": "Show each writer and the number of workshops they submitted to.", + "query": "SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "How many workshops did each author submit to? Return the author name and the number of workshops.", + "SpiderSynQuestion": "How many workshops did each writer submit to? Return the writer name and the number of workshops.", + "query": "SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show the authors who have submissions to more than one workshop.", + "SpiderSynQuestion": "Show the writers who have submissions to more than one workshop.", + "query": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Which authors have submitted to more than one workshop?", + "SpiderSynQuestion": "Which writers have submitted to more than one workshop?", + "query": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Show the date and venue of each workshop in ascending alphabetical order of the venue.", + "SpiderSynQuestion": "Show the day and site of each workshop in ascending alphabetical order of the site.", + "query": "SELECT Date , Venue FROM workshop ORDER BY Venue" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.", + "SpiderSynQuestion": "Sort the each workshop in alphabetical order of the site. Return the day and site of each workshop.", + "query": "SELECT Date , Venue FROM workshop ORDER BY Venue" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "List the authors who do not have submission to any workshop.", + "SpiderSynQuestion": "List the writers who do not have submission to any workshop.", + "query": "SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)" + }, + { + "db_id": "workshop_paper", + "SpiderQuestion": "Which authors did not submit to any workshop?", + "SpiderSynQuestion": "Which writers did not submit to any workshop?", + "query": "SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Find the number of investors in total.", + "SpiderSynQuestion": "Find the number of investors in total.", + "query": "SELECT count(*) FROM INVESTORS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show all investor details.", + "SpiderSynQuestion": "Show all investor information.", + "query": "SELECT Investor_details FROM INVESTORS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show all distinct lot details.", + "SpiderSynQuestion": "Show all different lot information.", + "query": "SELECT DISTINCT lot_details FROM LOTS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the maximum amount of transaction.", + "SpiderSynQuestion": "Show the maximum amount of transaction.", + "query": "SELECT max(amount_of_transaction) FROM TRANSACTIONS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show all date and share count of transactions.", + "SpiderSynQuestion": "Show all day and share count of transactions.", + "query": "SELECT date_of_transaction , share_count FROM TRANSACTIONS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What is the total share of transactions?", + "SpiderSynQuestion": "What is the total share of transactions?", + "query": "SELECT sum(share_count) FROM TRANSACTIONS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show all transaction ids with transaction code 'PUR'.", + "SpiderSynQuestion": "Show all transaction ids with transaction code 'PUR'.", + "query": "SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show all dates of transactions whose type code is \"SALE\".", + "SpiderSynQuestion": "Show all day of transactions whose type code is \"SALE\".", + "query": "SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\"" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the average amount of transactions with type code \"SALE\".", + "SpiderSynQuestion": "Show the average amount of transactions with type code \"SALE\".", + "query": "SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\"" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the description of transaction type with code \"PUR\".", + "SpiderSynQuestion": "Show the describing content of transaction type with code \"PUR\".", + "query": "SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code\t = \"PUR\"" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50.", + "SpiderSynQuestion": "Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50.", + "query": "SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = \"PUR\" AND share_count > 50" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the maximum share count of transactions where the amount is smaller than 10000", + "SpiderSynQuestion": "Show the maximum share count of transactions where the amount is smaller than 10000", + "query": "SELECT max(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.", + "SpiderSynQuestion": "Show the day of transactions if the share count is bigger than 100 or the amount is bigger than 1000.", + "query": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the transaction type descriptions and dates if the share count is smaller than 10.", + "SpiderSynQuestion": "Show the transaction type descriptions and day if the share count is smaller than 10.", + "query": "SELECT T1.transaction_type_description , T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show details of all investors if they make any transaction with share count greater than 100.", + "SpiderSynQuestion": "Show information of all investors if they make any transaction with share count greater than 100.", + "query": "SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "How many distinct transaction types are used in the transactions?", + "SpiderSynQuestion": "How many different transaction categories are used in the transactions?", + "query": "SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Return the lot details and investor ids.", + "SpiderSynQuestion": "Return the lot information and investor ids.", + "query": "SELECT lot_details , investor_id FROM LOTS" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Return the lot details of lots that belong to investors with details \"l\"?", + "SpiderSynQuestion": "Return the lot information of lots that belong to investors with information \"l\"?", + "query": "SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = \"l\"" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What are the purchase details of transactions with amount bigger than 10000?", + "SpiderSynQuestion": "What are the purchase information of transactions with amount bigger than 10000?", + "query": "SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What are the sale details and dates of transactions with amount smaller than 3000?", + "SpiderSynQuestion": "What are the sale information and day of transactions with amount smaller than 3000?", + "query": "SELECT T1.sales_details , T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What are the lot details of lots associated with transactions with share count smaller than 50?", + "SpiderSynQuestion": "What are the lot information of lots associated with transactions with share count smaller than 50?", + "query": "SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?", + "SpiderSynQuestion": "What are the lot information of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?", + "query": "SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = \"PUR\"" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the average transaction amount for different transaction types.", + "SpiderSynQuestion": "Show the average transaction amount for different transaction categories.", + "query": "SELECT transaction_type_code , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the maximum and minimum share count of different transaction types.", + "SpiderSynQuestion": "Show the maximum and minimum share count of different transaction categories.", + "query": "SELECT transaction_type_code , max(share_count) , min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the average share count of transactions for different investors.", + "SpiderSynQuestion": "Show the average share count of transactions for different investors.", + "query": "SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the average share count of transactions each each investor, ordered by average share count.", + "SpiderSynQuestion": "Show the average share count of transactions each each investor, ordered by average share count.", + "query": "SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count)" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the average amount of transactions for different investors.", + "SpiderSynQuestion": "Show the average amount of transactions for different investors.", + "query": "SELECT investor_id , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the average amount of transactions for different lots.", + "SpiderSynQuestion": "Show the average amount of transactions for different lots.", + "query": "SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the average amount of transactions for different lots, ordered by average amount of transactions.", + "SpiderSynQuestion": "Show the average amount of transactions for different lots, ordered by average amount of transactions.", + "query": "SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the number of transactions with transaction type code \"SALE\" for different investors if it is larger than 0.", + "SpiderSynQuestion": "Show the number of transactions with transaction type code \"SALE\" for different investors if it is larger than 0.", + "query": "SELECT investor_id , COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\" GROUP BY investor_id" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the number of transactions for different investors.", + "SpiderSynQuestion": "Show the number of transactions for different investors.", + "query": "SELECT investor_id , COUNT(*) FROM TRANSACTIONS GROUP BY investor_id" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the transaction type code that occurs the fewest times.", + "SpiderSynQuestion": "Show the transaction category code that occurs the fewest times.", + "query": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the transaction type code that occurs the most frequently.", + "SpiderSynQuestion": "Show the transaction category code that occurs the most frequently.", + "query": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the description of the transaction type that occurs most frequently.", + "SpiderSynQuestion": "Show the describing content of the transaction type that occurs most frequently.", + "query": "SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the id and details of the investor that has the largest number of transactions.", + "SpiderSynQuestion": "Show the id and information of the investor that has the largest number of transactions.", + "query": "SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the id and details for the investors who have the top 3 number of transactions.", + "SpiderSynQuestion": "Show the id and information for the investors who have the top 3 number of transactions.", + "query": "SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the ids of the investors who have at least two transactions.", + "SpiderSynQuestion": "Show the ids of the investors who have at least two transactions.", + "query": "SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "Show the ids and details of the investors who have at least two transactions with type code \"SALE\".", + "SpiderSynQuestion": "Show the ids and information of the investors who have at least two transactions with type code \"SALE\".", + "query": "SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = \"SALE\" GROUP BY T2.investor_id HAVING COUNT(*) >= 2" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What are the dates of transactions with at least 100 share count or amount bigger than 100?", + "SpiderSynQuestion": "What are the day of transactions with at least 100 share count or amount bigger than 100?", + "query": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What are the details of all sales and purchases?", + "SpiderSynQuestion": "What are the information of all sales and purchases?", + "query": "SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases" + }, + { + "db_id": "tracking_share_transactions", + "SpiderQuestion": "What are the details of the lots which are not used in any transactions?", + "SpiderSynQuestion": "What are the information of the lots which are not used in any transactions?", + "query": "SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "How many available hotels are there in total?", + "SpiderSynQuestion": "How many available hotels are there in total?", + "query": "SELECT count(*) FROM HOTELS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the total number of available hotels.", + "SpiderSynQuestion": "Find the total number of available hotels.", + "query": "SELECT count(*) FROM HOTELS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the price ranges of hotels?", + "SpiderSynQuestion": "What are the price ranges of hotels?", + "query": "SELECT price_range FROM HOTELS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Tell me the price ranges for all the hotels.", + "SpiderSynQuestion": "Tell me the price ranges for all the hotels.", + "query": "SELECT price_range FROM HOTELS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show all distinct location names.", + "SpiderSynQuestion": "Show all different position names.", + "query": "SELECT DISTINCT Location_Name FROM LOCATIONS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the distinct location names?", + "SpiderSynQuestion": "What are the different position names?", + "query": "SELECT DISTINCT Location_Name FROM LOCATIONS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the names and details of all the staff members.", + "SpiderSynQuestion": "Show the names and information of all the employee members.", + "query": "SELECT Name , Other_Details FROM Staff" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the name and detail of each staff member?", + "SpiderSynQuestion": "What is the name and information of each staff member?", + "query": "SELECT Name , Other_Details FROM Staff" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show details of all visitors.", + "SpiderSynQuestion": "Show information of all visitors.", + "query": "SELECT Tourist_Details FROM VISITORS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the detail of each visitor?", + "SpiderSynQuestion": "What is the information of each visitor?", + "query": "SELECT Tourist_Details FROM VISITORS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the price ranges of hotels with 5 star ratings.", + "SpiderSynQuestion": "Show the price ranges of hotels with 5 star ratings.", + "query": "SELECT price_range FROM HOTELS WHERE star_rating_code = \"5\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the price ranges of five star hotels?", + "SpiderSynQuestion": "What are the price ranges of five star hotels?", + "query": "SELECT price_range FROM HOTELS WHERE star_rating_code = \"5\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the average price range of hotels that have 5 star ratings and allow pets.", + "SpiderSynQuestion": "Show the average price range of hotels that have 5 star ratings and allow pets.", + "query": "SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the average price range of five star hotels that allow pets?", + "SpiderSynQuestion": "What is the average price range of five star hotels that allow pets?", + "query": "SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the address of the location \"UK Gallery\"?", + "SpiderSynQuestion": "What is the address of the position \"UK Gallery\"?", + "query": "SELECT Address FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the address of the location named \"UK Gallery\".", + "SpiderSynQuestion": "Find the address of the position named \"UK Gallery\".", + "query": "SELECT Address FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the detail of the location UK Gallery?", + "SpiderSynQuestion": "What is the information of the position UK Gallery?", + "query": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Return the detail of the location named \"UK Gallery\".", + "SpiderSynQuestion": "Return the information of the position named \"UK Gallery\".", + "query": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which location names contain the word \"film\"?", + "SpiderSynQuestion": "Which position names contain the word \"film\"?", + "query": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE \"%film%\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find all the locations whose names contain the word \"film\".", + "SpiderSynQuestion": "Find all the positions whose names contain the word \"film\".", + "query": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE \"%film%\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "How many distinct names are associated with all the photos?", + "SpiderSynQuestion": "How many different names are associated with all the photos?", + "query": "SELECT count(DISTINCT Name) FROM PHOTOS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Count the number of distinct names associated with the photos.", + "SpiderSynQuestion": "Count the number of different names associated with the photos.", + "query": "SELECT count(DISTINCT Name) FROM PHOTOS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the distinct visit dates?", + "SpiderSynQuestion": "What are the different tour dates?", + "query": "SELECT DISTINCT Visit_Date FROM VISITS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find all the distinct visit dates.", + "SpiderSynQuestion": "Find all the different tour dates.", + "query": "SELECT DISTINCT Visit_Date FROM VISITS" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names of the tourist attractions that can be accessed by bus?", + "SpiderSynQuestion": "What are the names of the tourist attractions that can be accessed by bus?", + "query": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.", + "SpiderSynQuestion": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.", + "query": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?", + "SpiderSynQuestion": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?", + "query": "SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\" OR How_to_Get_There = \"walk\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.", + "SpiderSynQuestion": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.", + "query": "SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\" OR How_to_Get_There = \"walk\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the star rating descriptions of the hotels with price above 10000?", + "SpiderSynQuestion": "What are the star rating descriptions of the hotels with price above 10000?", + "query": "SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Give me the star rating descriptions of the hotels that cost more than 10000.", + "SpiderSynQuestion": "Give me the star rating descriptions of the hotels that cost more than 10000.", + "query": "SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the details and opening hours of the museums?", + "SpiderSynQuestion": "What are the information and opening hours of the museums?", + "query": "SELECT T1.Museum_Details , T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Give me the detail and opening hour for each museum.", + "SpiderSynQuestion": "Give me the information and opening hour for each museum.", + "query": "SELECT T1.Museum_Details , T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the name of the tourist attraction that is associated with the photo \"game1\"?", + "SpiderSynQuestion": "What is the name of the tourist attraction that is associated with the photo \"game1\"?", + "query": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = \"game1\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which tourist attraction is associated with the photo \"game1\"? Return its name.", + "SpiderSynQuestion": "Which tourist attraction is associated with the picture \"game1\"? Return its name.", + "query": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = \"game1\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names and descriptions of the photos taken at the tourist attraction \"film festival\"?", + "SpiderSynQuestion": "What are the names and descriptions of the pictures taken at the tourist attraction \"film festival\"?", + "query": "SELECT T1.Name , T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"film festival\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the names and descriptions of the photos taken at the tourist attraction called \"film festival\".", + "SpiderSynQuestion": "Find the names and descriptions of the pictures taken at the tourist attraction called \"film festival\".", + "query": "SELECT T1.Name , T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"film festival\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the details and ways to get to tourist attractions related to royal family?", + "SpiderSynQuestion": "What are the information and ways to get to tourist attractions related to royal family?", + "query": "SELECT T1.Royal_Family_Details , T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which tourist attractions are related to royal family? Tell me their details and how we can get there.", + "SpiderSynQuestion": "Which tourist attractions are related to royal family? Tell me their information and how we can get there.", + "query": "SELECT T1.Royal_Family_Details , T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the details of the shops that can be accessed by walk?", + "SpiderSynQuestion": "What are the information of the shops that can be accessed by walk?", + "query": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the details of the shops that can be reached by walk.", + "SpiderSynQuestion": "Find the information of the shops that can be reached by walk.", + "query": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the name of the staff that is in charge of the attraction named \"US museum\"?", + "SpiderSynQuestion": "What is the name of the employee that is in charge of the attraction named \"US museum\"?", + "query": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"US museum\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Tell me the name of the staff in charge of the attraction called \"US museum\".", + "SpiderSynQuestion": "Tell me the name of the employee in charge of the attraction called \"US museum\".", + "query": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"US museum\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the details of the markets that can be accessed by walk or bus?", + "SpiderSynQuestion": "What are the information of the markets that can be accessed by walk or bus?", + "query": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the details of all the markets that are accessible by walk or bus.", + "SpiderSynQuestion": "Find the information of all the markets that are accessible by walk or bus.", + "query": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the visit date and details of the visitor whose detail is 'Vincent'?", + "SpiderSynQuestion": "What are the tour date and information of the visitor whose detail is 'Vincent'?", + "query": "SELECT T2.Visit_Date , T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = \"Vincent\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the visit date and details of the tourist whose detail is 'Vincent'", + "SpiderSynQuestion": "Find the tour date and information of the tourist whose detail is 'Vincent'", + "query": "SELECT T2.Visit_Date , T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = \"Vincent\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which tourist attractions does the visitor with detail 'Vincent' visit?", + "SpiderSynQuestion": "Which tourist attractions does the visitor with detail 'Vincent' visit?", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = \"Vincent\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.", + "SpiderSynQuestion": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = \"Vincent\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?", + "SpiderSynQuestion": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?", + "query": "SELECT T1.Name , T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" OR T2.Tourist_Details = \"Vivian\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.", + "SpiderSynQuestion": "For each tourist attraction, return its name and the day when the tourists named Vincent or Vivian visited there.", + "query": "SELECT T1.Name , T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" OR T2.Tourist_Details = \"Vivian\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the average price of hotels for each star rating code.", + "SpiderSynQuestion": "Show the average price of hotels for each star rating number.", + "query": "SELECT star_rating_code , avg(price_range) FROM HOTELS GROUP BY star_rating_code" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What is the average price range of hotels for each each star rating code?", + "SpiderSynQuestion": "What is the average price range of hotels for each each star rating number?", + "query": "SELECT star_rating_code , avg(price_range) FROM HOTELS GROUP BY star_rating_code" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the average price of hotels for different pet policy.", + "SpiderSynQuestion": "Show the average price of hotels for different pet policy.", + "query": "SELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the average prices of hotels grouped by their pet policy.", + "SpiderSynQuestion": "What are the average prices of hotels grouped by their pet policy.", + "query": "SELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the id and star rating of each hotel, ordered by its price from low to high.", + "SpiderSynQuestion": "Show the id and star rating of each hotel, ordered by its price from low to high.", + "query": "SELECT hotel_id , star_rating_code FROM HOTELS ORDER BY price_range ASC" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the id and star rating of each hotel and sort them in increasing order of price.", + "SpiderSynQuestion": "Find the id and star rating of each hotel and sort them in increasing order of price.", + "query": "SELECT hotel_id , star_rating_code FROM HOTELS ORDER BY price_range ASC" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the details of the top 3 most expensive hotels.", + "SpiderSynQuestion": "Show the information of the top 3 most expensive hotels.", + "query": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the details of the three most expensive hotels?", + "SpiderSynQuestion": "What are the information of the three most expensive hotels?", + "query": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the details and star ratings of the 3 least expensive hotels.", + "SpiderSynQuestion": "Show the information and star ratings of the 3 least expensive hotels.", + "query": "SELECT other_hotel_details , star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the details and star ratings of the three hotels with the lowest price ranges?", + "SpiderSynQuestion": "What are the information and star ratings of the three hotels with the lowest price ranges?", + "query": "SELECT other_hotel_details , star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the transportation method most people choose to get to tourist attractions.", + "SpiderSynQuestion": "Show the transportation method most people choose to get to tourist attractions.", + "query": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which transportation method is used the most often to get to tourist attractions?", + "SpiderSynQuestion": "Which transportation method is used the most often to get to tourist attractions?", + "query": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the description and code of the attraction type most tourist attractions belong to.", + "SpiderSynQuestion": "Show the describing content and number of the attraction type most tourist attractions belong to.", + "query": "SELECT T1.Attraction_Type_Description , T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.", + "SpiderSynQuestion": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.", + "query": "SELECT T1.Attraction_Type_Description , T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.", + "SpiderSynQuestion": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.", + "query": "SELECT How_to_Get_There , COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.", + "SpiderSynQuestion": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.", + "query": "SELECT How_to_Get_There , COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show different tourist attractions' names, ids, and the corresponding number of visits.", + "SpiderSynQuestion": "Show different tourist attractions' names, ids, and the corresponding number of visits.", + "query": "SELECT T1.Name , T2.Tourist_Attraction_ID , COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the name, id and the corresponding number of visits for each tourist attraction?", + "SpiderSynQuestion": "What are the name, id and the corresponding number of visits for each tourist attraction?", + "query": "SELECT T1.Name , T2.Tourist_Attraction_ID , COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the names and ids of tourist attractions that are visited at least two times.", + "SpiderSynQuestion": "Show the names and ids of tourist attractions that are visited at least two times.", + "query": "SELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which tourist attractions are visited at least twice? Give me their names and ids.", + "SpiderSynQuestion": "Which tourist attractions are visited at least twice? Give me their names and ids.", + "query": "SELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Show the names and ids of tourist attractions that are visited at most once.", + "SpiderSynQuestion": "Show the names and ids of tourist attractions that are visited at most once.", + "query": "SELECT T1.Name , T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) <= 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names and ids of the tourist attractions that are visited at most once?", + "SpiderSynQuestion": "What are the names and ids of the tourist attractions that are visited at most once?", + "query": "SELECT T1.Name , T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) <= 1" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?", + "SpiderSynQuestion": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?", + "query": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"660 Shea Crescent\" OR T2.How_to_Get_There = \"walk\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.", + "SpiderSynQuestion": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.", + "query": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"660 Shea Crescent\" OR T2.How_to_Get_There = \"walk\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names of the tourist attractions that have parking or shopping as their feature details?", + "SpiderSynQuestion": "What are the names of the tourist attractions that have parking or shopping as their feature details?", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?", + "SpiderSynQuestion": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?", + "SpiderSynQuestion": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?", + "query": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"254 Ottilie Junction\" OR T2.How_to_Get_There = \"bus\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.", + "SpiderSynQuestion": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.", + "query": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"254 Ottilie Junction\" OR T2.How_to_Get_There = \"bus\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names of the tourist attractions Vincent and Marcelle visit?", + "SpiderSynQuestion": "What are the names of the tourist attractions Vincent and Marcelle visit?", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Marcelle\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.", + "SpiderSynQuestion": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Marcelle\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?", + "SpiderSynQuestion": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Alison\" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Rosalind\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.", + "SpiderSynQuestion": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.", + "query": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Alison\" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Rosalind\"" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "How many tourists did not make any visit?", + "SpiderSynQuestion": "How many tourists did not make any visit?", + "query": "SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )" + }, + { + "db_id": "cre_Theme_park", + "SpiderQuestion": "Count the number of tourists who did not visit any place.", + "SpiderSynQuestion": "Count the number of tourists who did not visit any place.", + "query": "SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many video games exist?", + "SpiderSynQuestion": "How many video games exist?", + "query": "SELECT count(*) FROM Video_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many video games do you have?", + "SpiderSynQuestion": "How many video games do you have?", + "query": "SELECT count(*) FROM Video_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many video game types exist?", + "SpiderSynQuestion": "How many video game categories exist?", + "query": "SELECT count(DISTINCT gtype) FROM Video_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the count of different game types?", + "SpiderSynQuestion": "What is the count of different game categories?", + "query": "SELECT count(DISTINCT gtype) FROM Video_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all video game types.", + "SpiderSynQuestion": "Show all video game categories.", + "query": "SELECT DISTINCT gtype FROM Video_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the different types of video games?", + "SpiderSynQuestion": "What are the different categories of video games?", + "query": "SELECT DISTINCT gtype FROM Video_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all video games and their types in the order of their names.", + "SpiderSynQuestion": "Show all video games and their categories in the order of their names.", + "query": "SELECT gname , gtype FROM Video_games ORDER BY gname" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the names of all the video games and their types in alphabetical order?", + "SpiderSynQuestion": "What are the names of all the video games and their categories in alphabetical order?", + "query": "SELECT gname , gtype FROM Video_games ORDER BY gname" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all video games with type Collectible card game.", + "SpiderSynQuestion": "Show all video games with type Collectible card game.", + "query": "SELECT gname FROM Video_games WHERE gtype = \"Collectible card game\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the names of all video games that are collectible cards?", + "SpiderSynQuestion": "What are the names of all video games that are collectible cards?", + "query": "SELECT gname FROM Video_games WHERE gtype = \"Collectible card game\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the type of video game Call of Destiny.", + "SpiderSynQuestion": "What is the category of video game Call of Destiny.", + "query": "SELECT gtype FROM Video_games WHERE gname = \"Call of Destiny\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What type of game is Call of Destiny?", + "SpiderSynQuestion": "What category of game is Call of Destiny?", + "query": "SELECT gtype FROM Video_games WHERE gname = \"Call of Destiny\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many video games have type Massively multiplayer online game?", + "SpiderSynQuestion": "How many video games have type Massively multiplayer online game?", + "query": "SELECT count(*) FROM Video_games WHERE gtype = \"Massively multiplayer online game\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Count the number of video games with Massively multiplayer online game type .", + "SpiderSynQuestion": "Count the number of video games with Massively multiplayer online game type .", + "query": "SELECT count(*) FROM Video_games WHERE gtype = \"Massively multiplayer online game\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all video game types and the number of video games in each type.", + "SpiderSynQuestion": "Show all video game categories and the number of video games in each category.", + "query": "SELECT gtype , count(*) FROM Video_games GROUP BY gtype" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the types of video games and how many are in each type?", + "SpiderSynQuestion": "What are the categories of video games and how many are in each category?", + "query": "SELECT gtype , count(*) FROM Video_games GROUP BY gtype" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Which game type has most number of games?", + "SpiderSynQuestion": "Which game category has most number of games?", + "query": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What type has the most games?", + "SpiderSynQuestion": "What category has the most games?", + "query": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Which game type has least number of games?", + "SpiderSynQuestion": "Which game category has least number of games?", + "query": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the type with the fewest games?", + "SpiderSynQuestion": "What is the category with the fewest games?", + "query": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show ids for all students who live in CHI.", + "SpiderSynQuestion": "Show ids for all students who live in CHI.", + "query": "SELECT StuID FROM Student WHERE city_code = \"CHI\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all students who live in CHI?", + "SpiderSynQuestion": "What are the ids of all students who live in CHI?", + "query": "SELECT StuID FROM Student WHERE city_code = \"CHI\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show ids for all students who have advisor 1121.", + "SpiderSynQuestion": "Show ids for all students who have adviser 1121.", + "query": "SELECT StuID FROM Student WHERE Advisor = 1121" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all students who have advisor number 1121?", + "SpiderSynQuestion": "What are the ids of all students who have adviser number 1121?", + "query": "SELECT StuID FROM Student WHERE Advisor = 1121" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show first name for all students with major 600.", + "SpiderSynQuestion": "Show forename for all students with major 600.", + "query": "SELECT Fname FROM Student WHERE Major = 600" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the first names for all students who are from the major numbered 600?", + "SpiderSynQuestion": "What are the forenames for all students who are from the major numbered 600?", + "query": "SELECT Fname FROM Student WHERE Major = 600" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show the average, minimum, and maximum age for different majors.", + "SpiderSynQuestion": "Show the average, minimum, and maximum age for different discipline.", + "query": "SELECT major , avg(age) , min(age) , max(age) FROM Student GROUP BY major" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the average, minimum, and max ages for each of the different majors?", + "SpiderSynQuestion": "What are the average, minimum, and max ages for each of the different discipline?", + "query": "SELECT major , avg(age) , min(age) , max(age) FROM Student GROUP BY major" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all advisors who have at least two students.", + "SpiderSynQuestion": "Show all advisers who have at least two students.", + "query": "SELECT advisor FROM Student GROUP BY advisor HAVING count(*) >= 2" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the advisors", + "SpiderSynQuestion": "What are the advisers", + "query": "SELECT advisor FROM Student GROUP BY advisor HAVING count(*) >= 2" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many sports do we have?", + "SpiderSynQuestion": "How many physical exercise do we have?", + "query": "SELECT count(DISTINCT sportname) FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many different types of sports do we offer?", + "SpiderSynQuestion": "How many different types of physical exercise do we offer?", + "query": "SELECT count(DISTINCT sportname) FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many students play sports?", + "SpiderSynQuestion": "How many students play sports?", + "query": "SELECT count(DISTINCT StuID) FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many different students are involved in sports?", + "SpiderSynQuestion": "How many different students are involved in physical exercise?", + "query": "SELECT count(DISTINCT StuID) FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "List ids for all student who are on scholarship.", + "SpiderSynQuestion": "List ids for all student who are on scholarship.", + "query": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids for all sporty students who are on scholarship?", + "SpiderSynQuestion": "What are the ids for all sporty students who are on scholarship?", + "query": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show last names for all student who are on scholarship.", + "SpiderSynQuestion": "Show family names for all student who are on scholarship.", + "query": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the last names for all scholarship students?", + "SpiderSynQuestion": "What are the family names for all scholarship students?", + "query": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many games are played for all students?", + "SpiderSynQuestion": "How many games are played for all students?", + "query": "SELECT sum(gamesplayed) FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the total number of games played?", + "SpiderSynQuestion": "What is the total number of games played?", + "query": "SELECT sum(gamesplayed) FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many games are played for all football games by students on scholarship?", + "SpiderSynQuestion": "How many games are played for all football games by students on scholarship?", + "query": "SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = \"Football\" AND onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the total number of all football games played by scholarship students?", + "SpiderSynQuestion": "What is the total number of all football games played by scholarship students?", + "query": "SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = \"Football\" AND onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all sport name and the number of students.", + "SpiderSynQuestion": "Show all sport name and the number of students.", + "query": "SELECT sportname , count(*) FROM Sportsinfo GROUP BY sportname" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many students play each sport?", + "SpiderSynQuestion": "How many students play each sport?", + "query": "SELECT sportname , count(*) FROM Sportsinfo GROUP BY sportname" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all student IDs with the number of sports and total number of games played", + "SpiderSynQuestion": "Show all student IDs with the number of sports and total number of games played", + "query": "SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all students along with how many sports and games did they play?", + "SpiderSynQuestion": "What are the ids of all students along with how many sports and games did they play?", + "query": "SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all student IDs with more than total 10 hours per week on all sports played.", + "SpiderSynQuestion": "Show all student IDs with more than total 10 hours per week on all sports played.", + "query": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?", + "SpiderSynQuestion": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?", + "query": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the first name and last name of the student who have most number of sports?", + "SpiderSynQuestion": "What is the forename and surname of the student who have most number of sports?", + "query": "SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the first and last name of the student who played the most sports?", + "SpiderSynQuestion": "What is the forename and family name of the student who played the most sports?", + "query": "SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Which sport has most number of students on scholarship?", + "SpiderSynQuestion": "Which sport has most number of students on scholarship?", + "query": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the sport with the most scholarship students?", + "SpiderSynQuestion": "What is the sport with the most scholarship students?", + "query": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show student ids who don't have any sports.", + "SpiderSynQuestion": "Show student ids who don't have any sports.", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all students who don't play sports?", + "SpiderSynQuestion": "What are the ids of all students who don't play sports?", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show student ids who are on scholarship and have major 600.", + "SpiderSynQuestion": "Show student ids who are on scholarship and have major 600.", + "query": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the student ids for those on scholarship in major number 600?", + "SpiderSynQuestion": "What are the student ids for those on scholarship in major number 600?", + "query": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show student ids who are female and play football.", + "SpiderSynQuestion": "Show student ids who are female and play football.", + "query": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all female students who play football?", + "SpiderSynQuestion": "What are the ids of all female students who play football?", + "query": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all male student ids who don't play football.", + "SpiderSynQuestion": "Show all male student ids who don't play football.", + "query": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all male students who do not play football?", + "SpiderSynQuestion": "What are the ids of all male students who do not play football?", + "query": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show total hours per week and number of games played for student David Shieber.", + "SpiderSynQuestion": "Show total hours per week and number of games played for student David Shieber.", + "query": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = \"David\" AND T2.Lname = \"Shieber\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the total number of hours per work and number of games played by David Shieber?", + "SpiderSynQuestion": "What is the total number of hours per work and number of games played by David Shieber?", + "query": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = \"David\" AND T2.Lname = \"Shieber\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show total hours per week and number of games played for students under 20.", + "SpiderSynQuestion": "Show total hours per week and number of games played for students under 20.", + "query": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the total number of hours per week and number of games played by students under 20?", + "SpiderSynQuestion": "What is the total number of hours per week and number of games played by students under 20?", + "query": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many students play video games?", + "SpiderSynQuestion": "How many students play video games?", + "query": "SELECT count(DISTINCT StuID) FROM Plays_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "How many different students play games?", + "SpiderSynQuestion": "How many different students play games?", + "query": "SELECT count(DISTINCT StuID) FROM Plays_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show ids of students who don't play video game.", + "SpiderSynQuestion": "Show ids of students who don't play video game.", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all students who are not video game players?", + "SpiderSynQuestion": "What are the ids of all students who are not video game players?", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show ids of students who play video game and play sports.", + "SpiderSynQuestion": "Show ids of students who play video game and play sports.", + "query": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all students who played video games and sports?", + "SpiderSynQuestion": "What are the ids of all students who played video games and sports?", + "query": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all game ids and the number of hours played.", + "SpiderSynQuestion": "Show all game ids and the number of hours played.", + "query": "SELECT gameid , sum(hours_played) FROM Plays_games GROUP BY gameid" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are ids and total number of hours played for each game?", + "SpiderSynQuestion": "What are ids and total number of hours played for each game?", + "query": "SELECT gameid , sum(hours_played) FROM Plays_games GROUP BY gameid" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all student ids and the number of hours played.", + "SpiderSynQuestion": "Show all student ids and the number of hours played.", + "query": "SELECT Stuid , sum(hours_played) FROM Plays_games GROUP BY Stuid" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the ids of all students and number of hours played?", + "SpiderSynQuestion": "What are the ids of all students and number of hours played?", + "query": "SELECT Stuid , sum(hours_played) FROM Plays_games GROUP BY Stuid" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show the game name that has most number of hours played.", + "SpiderSynQuestion": "Show the game name that has most number of hours played.", + "query": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the name of the game that has been played the most?", + "SpiderSynQuestion": "What is the name of the game that has been played the most?", + "query": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all game names played by at least 1000 hours.", + "SpiderSynQuestion": "Show all game names played by at least 1000 hours.", + "query": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING sum(hours_played) >= 1000" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the names of all the games that have been played for at least 1000 hours?", + "SpiderSynQuestion": "What are the names of all the games that have been played for at least 1000 hours?", + "query": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING sum(hours_played) >= 1000" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Show all game names played by Linda Smith", + "SpiderSynQuestion": "Show all game names played by Linda Smith", + "query": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = \"Smith\" AND T3.Fname = \"Linda\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the names of all games played by Linda Smith?", + "SpiderSynQuestion": "What are the names of all games played by Linda Smith?", + "query": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = \"Smith\" AND T3.Fname = \"Linda\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Find the last and first name of students who are playing Football or Lacrosse.", + "SpiderSynQuestion": "Find the full name of students who are playing Football or Lacrosse.", + "query": "SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = \"Football\" OR T1.SportName = \"Lacrosse\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What is the first and last name of all students who play Football or Lacrosse?", + "SpiderSynQuestion": "What is the forename and surname of all students who play Football or Lacrosse?", + "query": "SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = \"Football\" OR T1.SportName = \"Lacrosse\"" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Find the first name and age of the students who are playing both Football and Lacrosse.", + "SpiderSynQuestion": "Find the forename and age of the students who are playing both Football and Lacrosse.", + "query": "SELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = \"Football\" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = \"Lacrosse\")" + }, + { + "db_id": "game_1", + "SpiderQuestion": "What are the first names and ages of all students who are playing both Football and Lacrosse?", + "SpiderSynQuestion": "What are the forenames and ages of all students who are playing both Football and Lacrosse?", + "query": "SELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = \"Football\" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = \"Lacrosse\")" + }, + { + "db_id": "game_1", + "SpiderQuestion": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.", + "SpiderSynQuestion": "Find the family name and gender of the students who are playing both Call of Destiny and Works of Widenius games.", + "query": "SELECT lname , sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Call of Destiny\" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Works of Widenius\")" + }, + { + "db_id": "game_1", + "SpiderQuestion": "what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?", + "SpiderSynQuestion": "what is the surname and gender of all students who played both Call of Destiny and Works of Widenius?", + "query": "SELECT lname , sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Call of Destiny\" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Works of Widenius\")" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name of all customers.", + "SpiderSynQuestion": "Find the name of all clients.", + "query": "SELECT customer_name FROM customers" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the names of all the customers?", + "SpiderSynQuestion": "What are the names of all the clients?", + "query": "SELECT customer_name FROM customers" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "How many customers are there?", + "SpiderSynQuestion": "How many clients are there?", + "query": "SELECT count(*) FROM customers" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Return the total number of distinct customers.", + "SpiderSynQuestion": "Return the total number of different clients.", + "query": "SELECT count(*) FROM customers" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the average amount of items ordered in each order?", + "SpiderSynQuestion": "What is the average amount of items ordered in each order?", + "query": "SELECT avg(order_quantity) FROM order_items" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the average order quantity per order.", + "SpiderSynQuestion": "Find the average amount of order per order.", + "query": "SELECT avg(order_quantity) FROM order_items" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the names of customers who use payment method \"Cash\"?", + "SpiderSynQuestion": "What are the names of clients who use payment method \"Cash\"?", + "query": "SELECT customer_name FROM customers WHERE payment_method = \"Cash\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which customers use \"Cash\" for payment method? Return the customer names.", + "SpiderSynQuestion": "Which clients use \"Cash\" for payment method? Return the client names.", + "query": "SELECT customer_name FROM customers WHERE payment_method = \"Cash\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the \"date became customers\" of the customers whose ID is between 10 and 20.", + "SpiderSynQuestion": "Find the \"date became clients\" of the clients whose ID is between 10 and 20.", + "query": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the dates when customers with ids between 10 and 20 became customers?", + "SpiderSynQuestion": "What are the dates when clients with ids between 10 and 20 became clients?", + "query": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which payment method is used by most customers?", + "SpiderSynQuestion": "Which payment method is used by most clients?", + "query": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the payment method that is used most frequently.", + "SpiderSynQuestion": "Find the payment method that is used most frequently.", + "query": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the names of customers using the most popular payment method?", + "SpiderSynQuestion": "What are the names of clients using the most popular payment method?", + "query": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name of the customers who use the most frequently used payment method.", + "SpiderSynQuestion": "Find the name of the clients who use the most frequently used payment method.", + "query": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are all the payment methods?", + "SpiderSynQuestion": "What are all the payment types?", + "query": "SELECT DISTINCT payment_method FROM customers" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Return all the distinct payment methods used by customers.", + "SpiderSynQuestion": "Return all the different payment types used by clients.", + "query": "SELECT DISTINCT payment_method FROM customers" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the details of all products?", + "SpiderSynQuestion": "What are the information of all goods?", + "query": "SELECT DISTINCT product_details FROM products" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Return the the details of all products.", + "SpiderSynQuestion": "Return the the information of all goods.", + "query": "SELECT DISTINCT product_details FROM products" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name of all customers whose name contains \"Alex\".", + "SpiderSynQuestion": "Find the name of all clients whose name contains \"Alex\".", + "query": "SELECT customer_name FROM customers WHERE customer_name LIKE \"%Alex%\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which customer's name contains \"Alex\"? Find the full name.", + "SpiderSynQuestion": "Which client's name contains \"Alex\"? Find the full name.", + "query": "SELECT customer_name FROM customers WHERE customer_name LIKE \"%Alex%\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the detail of products whose detail contains the word \"Latte\" or the word \"Americano\"", + "SpiderSynQuestion": "Find the information of goods whose information contains the word \"Latte\" or the word \"Americano\"", + "query": "SELECT product_details FROM products WHERE product_details LIKE \"%Latte%\" OR product_details LIKE \"%Americano%\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which product's detail contains the word \"Latte\" or \"Americano\"? Return the full detail.", + "SpiderSynQuestion": "Which goods's information contains the word \"Latte\" or \"Americano\"? Return the full information.", + "query": "SELECT product_details FROM products WHERE product_details LIKE \"%Latte%\" OR product_details LIKE \"%Americano%\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the address content of the customer named \"Maudie Kertzmann\"?", + "SpiderSynQuestion": "What is the location content of the client named \"Maudie Kertzmann\"?", + "query": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = \"Maudie Kertzmann\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Return the address content for the customer whose name is \"Maudie Kertzmann\".", + "SpiderSynQuestion": "Return the location content for the client whose name is \"Maudie Kertzmann\".", + "query": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = \"Maudie Kertzmann\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "How many customers are living in city \"Lake Geovannyton\"?", + "SpiderSynQuestion": "How many clients are living in city \"Lake Geovannyton\"?", + "query": "SELECT count(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = \"Lake Geovannyton\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the number of customers who live in the city called Lake Geovannyton.", + "SpiderSynQuestion": "Find the number of clients who live in the city called Lake Geovannyton.", + "query": "SELECT count(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = \"Lake Geovannyton\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name of customers who are living in Colorado?", + "SpiderSynQuestion": "Find the name of clients who are living in Colorado?", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = \"Colorado\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the names of customers who live in Colorado state?", + "SpiderSynQuestion": "What are the names of clients who live in Colorado state?", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = \"Colorado\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the list of cities that no customer is living in.", + "SpiderSynQuestion": "Find the list of towns that no client is living in.", + "query": "SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the cities no customers live in?", + "SpiderSynQuestion": "What are the towns no clients live in?", + "query": "SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which city has the most customers living in?", + "SpiderSynQuestion": "Which town has the most clients living in?", + "query": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the city where the most customers live.", + "SpiderSynQuestion": "Find the town where the most clients live.", + "query": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Retrieve the list of all cities.", + "SpiderSynQuestion": "Retrieve the list of all towns.", + "query": "SELECT DISTINCT city FROM addresses" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "List all the distinct cities", + "SpiderSynQuestion": "List all the different towns", + "query": "SELECT DISTINCT city FROM addresses" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the city with post code 255.", + "SpiderSynQuestion": "Find the town with post code 255.", + "query": "SELECT city FROM addresses WHERE zip_postcode = 255" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which city is post code 255 located in?", + "SpiderSynQuestion": "Which town is post code 255 located in?", + "query": "SELECT city FROM addresses WHERE zip_postcode = 255" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the state and country of all cities with post code starting with 4.", + "SpiderSynQuestion": "Find the state and nationality of all cities with post code starting with 4.", + "query": "SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE \"4%\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the state and country of all the cities that have post codes starting with 4.\\", + "SpiderSynQuestion": "What are the state and nationality of all the cities that have post codes starting with 4.\\", + "query": "SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE \"4%\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "List the countries having more than 4 addresses listed.", + "SpiderSynQuestion": "List the nationalities having more than 4 locations listed.", + "query": "SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "For which countries are there more than four distinct addresses listed?", + "SpiderSynQuestion": "For which nationalities are there more than four different locations listed?", + "query": "SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "List all the contact channel codes that were used less than 5 times.", + "SpiderSynQuestion": "List all the contact channel codes that were used less than 5 times.", + "query": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING count(customer_id) < 5" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which contact channel codes were used less than 5 times?", + "SpiderSynQuestion": "Which contact channel codes were used less than 5 times?", + "query": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING count(customer_id) < 5" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which contact channel has been used by the customer with name \"Tillman Ernser\"?", + "SpiderSynQuestion": "Which contact channel has been used by the client with name \"Tillman Ernser\"?", + "query": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the contact channel code that was used by the customer named \"Tillman Ernser\".", + "SpiderSynQuestion": "Find the contact channel code that was used by the client named \"Tillman Ernser\".", + "query": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?", + "SpiderSynQuestion": "What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?", + "query": "SELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Return the the \"active to date\" of the latest contact channel used by the customer named \"Tillman Ernser\".", + "SpiderSynQuestion": "Return the the \"active to date\" of the latest contact channel used by the client named \"Tillman Ernser\".", + "query": "SELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the average time span of contact channels in the database?", + "SpiderSynQuestion": "What is the average time span of contact channels in the database?", + "query": "SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Compute the average active time span of contact channels.", + "SpiderSynQuestion": "Compute the average active time span of contact channels.", + "query": "SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the channel code and contact number of the customer contact channel that was active for the longest time?", + "SpiderSynQuestion": "What is the channel code and contact number of the client contact channel that was active for the longest time?", + "query": "SELECT channel_code , contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Return the channel code and contact number of the customer contact channel whose active duration was the longest.", + "SpiderSynQuestion": "Return the channel code and contact number of the client contact channel whose active duration was the longest.", + "query": "SELECT channel_code , contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name and active date of the customer that use email as the contact channel.", + "SpiderSynQuestion": "Find the name and active date of the client that use email as the contact channel.", + "query": "SELECT t1.customer_name , t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the name and active date of the customers whose contact channel code is email?", + "SpiderSynQuestion": "What are the name and active date of the clients whose contact channel code is email?", + "query": "SELECT t1.customer_name , t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the name of the customer that made the order with the largest quantity?", + "SpiderSynQuestion": "What is the name of the client that made the order with the largest quantity?", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = ( SELECT max(order_quantity) FROM order_items)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name of the customer who made the order of the largest amount of goods.", + "SpiderSynQuestion": "Find the name of the client who made the order of the largest amount of goods.", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = ( SELECT max(order_quantity) FROM order_items)" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the name of the customer that has purchased the most items?", + "SpiderSynQuestion": "What is the name of the client that has purchased the most items?", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Give me the name of the customer who ordered the most items in total.", + "SpiderSynQuestion": "Give me the name of the client who ordered the most items in total.", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the payment method of the customer that has purchased the least quantity of items?", + "SpiderSynQuestion": "What is the payment type of the client that has purchased the least quantity of items?", + "query": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Tell me the payment method used by the customer who ordered the least amount of goods in total.", + "SpiderSynQuestion": "Tell me the payment type used by the client who ordered the least amount of goods in total.", + "query": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "How many types of products have Rodrick Heaney bought in total?", + "SpiderSynQuestion": "How many types of goods have Rodrick Heaney bought in total?", + "query": "SELECT count(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the number of distinct products Rodrick Heaney has bought so far.", + "SpiderSynQuestion": "Find the number of different goods Rodrick Heaney has bought so far.", + "query": "SELECT count(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the total quantity of products purchased by \"Rodrick Heaney\"?", + "SpiderSynQuestion": "What is the total number of goods purchased by \"Rodrick Heaney\"?", + "query": "SELECT sum(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Tell me the total quantity of products bought by the customer called \"Rodrick Heaney\".", + "SpiderSynQuestion": "Tell me the total number of goods bought by the client called \"Rodrick Heaney\".", + "query": "SELECT sum(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "How many customers have at least one order with status \"Cancelled\"?", + "SpiderSynQuestion": "How many clients have at least one order with status \"Cancelled\"?", + "query": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Return the number of customers who have at least one order with \"Cancelled\" status.", + "SpiderSynQuestion": "Return the number of clients who have at least one order with \"Cancelled\" status.", + "query": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "How many orders have detail \"Second time\"?", + "SpiderSynQuestion": "How many orders have information \"Second time\"?", + "query": "SELECT count(*) FROM customer_orders WHERE order_details = \"Second time\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Tell me the number of orders with \"Second time\" as order detail.", + "SpiderSynQuestion": "Tell me the number of orders with \"Second time\" as order information.", + "query": "SELECT count(*) FROM customer_orders WHERE order_details = \"Second time\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the customer name and date of the orders that have the status \"Delivered\".", + "SpiderSynQuestion": "Find the client name and date of the orders that have the status \"Delivered\".", + "query": "SELECT t1.customer_name , t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = \"Delivered\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the customer name and date of the orders whose status is \"Delivered\".", + "SpiderSynQuestion": "What are the client name and date of the orders whose status is \"Delivered\".", + "query": "SELECT t1.customer_name , t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = \"Delivered\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the total number of products that are in orders with status \"Cancelled\"?", + "SpiderSynQuestion": "What is the total number of goods that are in orders with status \"Cancelled\"?", + "query": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = \"Cancelled\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the total quantity of products associated with the orders in the \"Cancelled\" status.", + "SpiderSynQuestion": "Find the total number of goods associated with the orders in the \"Cancelled\" status.", + "query": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = \"Cancelled\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the total amount of products ordered before 2018-03-17 07:13:53.", + "SpiderSynQuestion": "Find the total amount of goods ordered before 2018-03-17 07:13:53.", + "query": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < \"2018-03-17 07:13:53\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the total amount of products purchased before 2018-03-17 07:13:53?", + "SpiderSynQuestion": "What is the total amount of goods purchased before 2018-03-17 07:13:53?", + "query": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < \"2018-03-17 07:13:53\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Who made the latest order?", + "SpiderSynQuestion": "Who made the latest order?", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name of the customer who made an order most recently.", + "SpiderSynQuestion": "Find the name of the client who made an order most recently.", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Which product has been ordered most number of times?", + "SpiderSynQuestion": "Which goods has been ordered most number of times?", + "query": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the most frequently ordered product? Tell me the detail of the product", + "SpiderSynQuestion": "What is the most frequently ordered goods? Tell me the information of the goods", + "query": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name and ID of the product whose total order quantity is the largest.", + "SpiderSynQuestion": "Find the name and ID of the goods whose total amount of order is the largest.", + "query": "SELECT t2.product_details , t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY sum(t1.order_quantity) LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the name and ID of the product bought the most.", + "SpiderSynQuestion": "What are the name and ID of the goods bought the most.", + "query": "SELECT t2.product_details , t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY sum(t1.order_quantity) LIMIT 1" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", + "SpiderSynQuestion": "Find all the locations in East Julianaside, Texas or in Gleasonmouth, Arizona.", + "query": "SELECT address_content FROM addresses WHERE city = \"East Julianaside\" AND state_province_county = \"Texas\" UNION SELECT address_content FROM addresses WHERE city = \"Gleasonmouth\" AND state_province_county = \"Arizona\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", + "SpiderSynQuestion": "What are all the locations in East Julianaside, Texas or in Gleasonmouth, Arizona.", + "query": "SELECT address_content FROM addresses WHERE city = \"East Julianaside\" AND state_province_county = \"Texas\" UNION SELECT address_content FROM addresses WHERE city = \"Gleasonmouth\" AND state_province_county = \"Arizona\"" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the name of customers who did not pay with Cash.", + "SpiderSynQuestion": "Find the name of clients who did not pay with Cash.", + "query": "SELECT customer_name FROM customers WHERE payment_method != 'Cash'" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What is the name of customers who do not use Cash as payment method.", + "SpiderSynQuestion": "What is the name of clients who do not use Cash as payment type.", + "query": "SELECT customer_name FROM customers WHERE payment_method != 'Cash'" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the names of customers who never ordered product Latte.", + "SpiderSynQuestion": "Find the names of clients who never ordered goods Latte.", + "query": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are names of customers who never ordered product Latte.", + "SpiderSynQuestion": "What are names of clients who never ordered goods Latte.", + "query": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the names of customers who never placed an order.", + "SpiderSynQuestion": "Find the names of clients who never placed an order.", + "query": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the names of customers who never made an order.", + "SpiderSynQuestion": "What are the names of clients who never made an order.", + "query": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "Find the names of customers who ordered both products Latte and Americano.", + "SpiderSynQuestion": "Find the names of clients who ordered both goods Latte and Americano.", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'" + }, + { + "db_id": "customers_and_addresses", + "SpiderQuestion": "What are the names of customers who have purchased both products Latte and Americano?", + "SpiderSynQuestion": "What are the names of clients who have purchased both goods Latte and Americano?", + "query": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'" + }, + { + "db_id": "music_4", + "SpiderQuestion": "How many artists are there?", + "SpiderSynQuestion": "How many artists are there?", + "query": "SELECT count(*) FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Count the number of artists.", + "SpiderSynQuestion": "Count the number of artists.", + "query": "SELECT count(*) FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "List the age of all music artists.", + "SpiderSynQuestion": "List the age of all music artists.", + "query": "SELECT Age FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the ages of all music artists?", + "SpiderSynQuestion": "What are the ages of all music artists?", + "query": "SELECT Age FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What is the average age of all artists?", + "SpiderSynQuestion": "What is the average age of all artists?", + "query": "SELECT avg(Age) FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the average age across all artists.", + "SpiderSynQuestion": "Return the average age across all artists.", + "query": "SELECT avg(Age) FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the famous titles of the artist \"Triumfall\"?", + "SpiderSynQuestion": "What are the famous titles of the artist \"Triumfall\"?", + "query": "SELECT Famous_Title FROM artist WHERE Artist = \"Triumfall\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the famous titles of the artist called \"Triumfall\".", + "SpiderSynQuestion": "Return the famous titles of the artist called \"Triumfall\".", + "query": "SELECT Famous_Title FROM artist WHERE Artist = \"Triumfall\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the distinct Famous release dates?", + "SpiderSynQuestion": "What are the different Famous publish dates?", + "query": "SELECT distinct Famous_Release_date FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Give the distinct famous release dates for all artists.", + "SpiderSynQuestion": "Give the different famous publish dates for all artists.", + "query": "SELECT distinct Famous_Release_date FROM artist" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the dates of ceremony and the results of all music festivals", + "SpiderSynQuestion": "Return the day of ceremony and the outcomes of all music festivals", + "query": "SELECT Date_of_ceremony , RESULT FROM music_festival" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the dates of ceremony and results for each music festival?", + "SpiderSynQuestion": "What are the day of ceremony and outcomes for each music festival?", + "query": "SELECT Date_of_ceremony , RESULT FROM music_festival" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the category of music festivals with result \"Awarded\"?", + "SpiderSynQuestion": "What are the type of music festivals with result \"Awarded\"?", + "query": "SELECT Category FROM music_festival WHERE RESULT = \"Awarded\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the categories of music festivals that have the result \"Awarded\".", + "SpiderSynQuestion": "Return the type of music festivals that have the result \"Awarded\".", + "query": "SELECT Category FROM music_festival WHERE RESULT = \"Awarded\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the maximum and minimum week on top of all volumes?", + "SpiderSynQuestion": "What are the maximum and minimum week on top of all volumes?", + "query": "SELECT max(Weeks_on_Top) , min(Weeks_on_Top) FROM volume" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Give the maximum and minimum weeks on top across all volumes.", + "SpiderSynQuestion": "Give the maximum and minimum weeks on top across all volumes.", + "query": "SELECT max(Weeks_on_Top) , min(Weeks_on_Top) FROM volume" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the songs in volumes with more than 1 week on top?", + "SpiderSynQuestion": "What are the songs in volumes with more than 1 week on top?", + "query": "SELECT Song FROM volume WHERE Weeks_on_Top > 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Give the songs included in volumes that have more than 1 week on top.", + "SpiderSynQuestion": "Give the songs included in volumes that have more than 1 week on top.", + "query": "SELECT Song FROM volume WHERE Weeks_on_Top > 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Please list all songs in volumes in ascending alphabetical order.", + "SpiderSynQuestion": "Please list all songs in volumes in ascending alphabetical order.", + "query": "SELECT Song FROM volume ORDER BY Song" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the the songs in volumes, listed in ascending order?", + "SpiderSynQuestion": "What are the the songs in volumes, listed in ascending order?", + "query": "SELECT Song FROM volume ORDER BY Song" + }, + { + "db_id": "music_4", + "SpiderQuestion": "How many distinct artists do the volumes associate to?", + "SpiderSynQuestion": "How many different artists do the volumes associate to?", + "query": "SELECT COUNT(DISTINCT Artist_ID) FROM volume" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Count the number of distinct artists who have volumes.", + "SpiderSynQuestion": "Count the number of different artists who have volumes.", + "query": "SELECT COUNT(DISTINCT Artist_ID) FROM volume" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.", + "SpiderSynQuestion": "Please show the day of ceremony of the volumes that last more than 2 weeks on top.", + "query": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?", + "SpiderSynQuestion": "What are the day of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?", + "query": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Please show the songs that have result \"nominated\" at music festivals.", + "SpiderSynQuestion": "Please show the songs that have result \"nominated\" at music festivals.", + "query": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the songs in volumes that have resulted in a nomination at music festivals?", + "SpiderSynQuestion": "What are the songs in volumes that have resulted in a nomination at music festivals?", + "query": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the issue dates of volumes associated with the artist \"Gorgoroth\"?", + "SpiderSynQuestion": "What are the day of issue of volumes associated with the artist \"Gorgoroth\"?", + "query": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = \"Gorgoroth\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the issue dates of volumes that are by the artist named Gorgoroth.", + "SpiderSynQuestion": "Return the day of issue of volumes that are by the artist named Gorgoroth.", + "query": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = \"Gorgoroth\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the songs in volumes associated with the artist aged 32 or older?", + "SpiderSynQuestion": "What are the songs in volumes associated with the artist aged 32 or older?", + "query": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return names of songs in volumes that are by artists that are at least 32 years old.", + "SpiderSynQuestion": "Return names of songs in volumes that are by artists that are at least 32 years old.", + "query": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?", + "SpiderSynQuestion": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?", + "query": "SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.", + "SpiderSynQuestion": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.", + "query": "SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?", + "SpiderSynQuestion": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?", + "query": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.", + "SpiderSynQuestion": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.", + "query": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Please list the age and famous title of artists in descending order of age.", + "SpiderSynQuestion": "Please list the age and famous title of artists in descending order of age.", + "query": "SELECT Famous_Title , Age FROM artist ORDER BY Age DESC" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the famous titles and ages of each artist, listed in descending order by age?", + "SpiderSynQuestion": "What are the famous titles and ages of each artist, listed in descending order by age?", + "query": "SELECT Famous_Title , Age FROM artist ORDER BY Age DESC" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What is the famous release date of the artist with the oldest age?", + "SpiderSynQuestion": "What is the famous publish day of the artist with the oldest age?", + "query": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the famous release date for the oldest artist.", + "SpiderSynQuestion": "Return the famous publish day for the oldest artist.", + "query": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Please show the categories of the music festivals and the count.", + "SpiderSynQuestion": "Please show the type of the music festivals and the count.", + "query": "SELECT Category , COUNT(*) FROM music_festival GROUP BY Category" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the number of music festivals of each category.", + "SpiderSynQuestion": "Return the number of music festivals of each type.", + "query": "SELECT Category , COUNT(*) FROM music_festival GROUP BY Category" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What is the most common result of the music festival?", + "SpiderSynQuestion": "What is the most common outcome of the music festival?", + "query": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the result that is most frequent at music festivals.", + "SpiderSynQuestion": "Return the outcome that is most frequent at music festivals.", + "query": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Please show the categories of the music festivals with count more than 1.", + "SpiderSynQuestion": "Please show the type of the music festivals with count more than 1.", + "query": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the categories of music festivals for which there have been more than 1 music festival?", + "SpiderSynQuestion": "What are the type of music festivals for which there have been more than 1 music festival?", + "query": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What is the song in the volume with the maximum weeks on top?", + "SpiderSynQuestion": "What is the song in the volume with the maximum weeks on top?", + "query": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the song in the volume that has spent the most weeks on top?", + "SpiderSynQuestion": "Return the song in the volume that has spent the most weeks on top?", + "query": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Find the famous titles of artists that do not have any volume.", + "SpiderSynQuestion": "Find the famous titles of artists that do not have any volume.", + "query": "SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the famous titles of artists who do not have any volumes?", + "SpiderSynQuestion": "What are the famous titles of artists who do not have any volumes?", + "query": "SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top.", + "SpiderSynQuestion": "Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top.", + "query": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?", + "SpiderSynQuestion": "What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?", + "query": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the date of ceremony of music festivals with category \"Best Song\" and result \"Awarded\"?", + "SpiderSynQuestion": "What are the day of ceremony of music festivals with category \"Best Song\" and result \"Awarded\"?", + "query": "SELECT Date_of_ceremony FROM music_festival WHERE Category = \"Best Song\" AND RESULT = \"Awarded\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the dates of ceremony corresponding to music festivals that had the category \"Best Song\" and result \"Awarded\".", + "SpiderSynQuestion": "Return the day of ceremony corresponding to music festivals that had the category \"Best Song\" and result \"Awarded\".", + "query": "SELECT Date_of_ceremony FROM music_festival WHERE Category = \"Best Song\" AND RESULT = \"Awarded\"" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What is the issue date of the volume with the minimum weeks on top?", + "SpiderSynQuestion": "What is the issue day of the volume with the minimum weeks on top?", + "query": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the issue date of the volume that has spent the fewest weeks on top.", + "SpiderSynQuestion": "Return the issue day of the volume that has spent the fewest weeks on top.", + "query": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1" + }, + { + "db_id": "music_4", + "SpiderQuestion": "How many distinct artists have volumes?", + "SpiderSynQuestion": "How many different artists have volumes?", + "query": "SELECT COUNT(DISTINCT Artist_ID) FROM volume" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Count the number of artists who have had volumes.", + "SpiderSynQuestion": "Count the number of artists who have had volumes.", + "query": "SELECT COUNT(DISTINCT Artist_ID) FROM volume" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.", + "SpiderSynQuestion": "Please show the outcomes of music festivals and the number of music festivals that have had each, ordered by this count.", + "query": "SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC" + }, + { + "db_id": "music_4", + "SpiderQuestion": "How many music festivals have had each kind of result, ordered descending by count?", + "SpiderSynQuestion": "How many music festivals have had each kind of outcome, ordered descending by count?", + "query": "SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC" + }, + { + "db_id": "music_4", + "SpiderQuestion": "What are the issue dates of volumes associated with the artist aged 23 or younger?", + "SpiderSynQuestion": "What are the issue days of volumes associated with the artist aged 23 or younger?", + "query": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23" + }, + { + "db_id": "music_4", + "SpiderQuestion": "Return the issue dates of volumes by artists who are at most 23 years old?", + "SpiderSynQuestion": "Return the issue days of volumes by artists who are at most 23 years old?", + "query": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "How many roller coasters are there?", + "SpiderSynQuestion": "How many roller coasters are there?", + "query": "SELECT count(*) FROM roller_coaster" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "List the names of roller coasters by ascending order of length.", + "SpiderSynQuestion": "List the names of roller coasters by ascending order of length.", + "query": "SELECT Name FROM roller_coaster ORDER BY LENGTH ASC" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "What are the lengths and heights of roller coasters?", + "SpiderSynQuestion": "What are the lengths and stature of roller coasters?", + "query": "SELECT LENGTH , Height FROM roller_coaster" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "List the names of countries whose language is not \"German\".", + "SpiderSynQuestion": "List the names of nations whose language is not \"German\".", + "query": "SELECT Name FROM country WHERE Languages != \"German\"" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Show the statuses of roller coasters longer than 3300 or higher than 100.", + "SpiderSynQuestion": "Show the statuses of roller coasters longer than 3300 or higher than 100.", + "query": "SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "What are the speeds of the longest roller coaster?", + "SpiderSynQuestion": "What are the velocity of the longest roller coaster?", + "query": "SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "What is the average speed of roller coasters?", + "SpiderSynQuestion": "What is the average velocity of roller coasters?", + "query": "SELECT avg(Speed) FROM roller_coaster" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Show the different statuses and the numbers of roller coasters for each status.", + "SpiderSynQuestion": "Show the different statuses and the numbers of roller coasters for each status.", + "query": "SELECT Status , COUNT(*) FROM roller_coaster GROUP BY Status" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Please show the most common status of roller coasters.", + "SpiderSynQuestion": "Please show the most common status of roller coasters.", + "query": "SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "List the status shared by more than two roller coaster.", + "SpiderSynQuestion": "List the status shared by more than two roller coaster.", + "query": "SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Show the park of the roller coaster with the highest speed.", + "SpiderSynQuestion": "Show the park of the roller coaster with the highest velocity.", + "query": "SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Show the names of roller coasters and names of country they are in.", + "SpiderSynQuestion": "Show the names of roller coasters and names of nation they are in.", + "query": "SELECT T2.Name , T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Show the names of countries that have more than one roller coaster.", + "SpiderSynQuestion": "Show the names of nations that have more than one roller coaster.", + "query": "SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Show the name and population of the country that has the highest roller coaster.", + "SpiderSynQuestion": "Show the name and number of people of the nation that has the highest roller coaster.", + "query": "SELECT T1.Name , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "Show the names of countries and the average speed of roller coasters from each country.", + "SpiderSynQuestion": "Show the names of nations and the average velocity of roller coasters from each nation.", + "query": "SELECT T1.Name , avg(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "How many countries do not have an roller coaster longer than 3000?", + "SpiderSynQuestion": "How many nations do not have an roller coaster longer than 3000?", + "query": "SELECT count(*) FROM country WHERE country_id NOT IN ( SELECT country_id FROM roller_coaster WHERE LENGTH > 3000 )" + }, + { + "db_id": "roller_coaster", + "SpiderQuestion": "What are the country names, area and population which has both roller coasters with speed higher", + "SpiderSynQuestion": "What are the nation names, district and the number of people which has both roller coasters with speed higher", + "query": "SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "How many different captain ranks are there?", + "SpiderSynQuestion": "How many different captain ranks are there?", + "query": "SELECT count(DISTINCT rank) FROM captain" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Count the number of different ranks of captain.", + "SpiderSynQuestion": "Count the number of different ranks of captain.", + "query": "SELECT count(DISTINCT rank) FROM captain" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "How many captains are in each rank?", + "SpiderSynQuestion": "How many captains are in each rank?", + "query": "SELECT count(*) , rank FROM captain GROUP BY rank" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Count the number of captains that have each rank.", + "SpiderSynQuestion": "Count the number of captains that have each rank.", + "query": "SELECT count(*) , rank FROM captain GROUP BY rank" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "How many captains with younger than 50 are in each rank?", + "SpiderSynQuestion": "How many captains with younger than 50 are in each rank?", + "query": "SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Count the number of captains younger than 50 of each rank.", + "SpiderSynQuestion": "Count the number of captains younger than 50 of each rank.", + "query": "SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Sort all captain names by their ages from old to young.", + "SpiderSynQuestion": "Sort all captain names by their ages from old to young.", + "query": "SELECT name FROM captain ORDER BY age DESC" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the names of captains, sorted by age descending?", + "SpiderSynQuestion": "What are the names of captains, sorted by age descending?", + "query": "SELECT name FROM captain ORDER BY age DESC" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the name, class and rank of all captains.", + "SpiderSynQuestion": "Find the name, class and rank of all captains.", + "query": "SELECT name , CLASS , rank FROM captain" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the names, classes, and ranks of all captains?", + "SpiderSynQuestion": "What are the names, classes, and ranks of all captains?", + "query": "SELECT name , CLASS , rank FROM captain" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Which rank is the most common among captains?", + "SpiderSynQuestion": "Which rank is the most common among captains?", + "query": "SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Return the rank for which there are the fewest captains.", + "SpiderSynQuestion": "Return the rank for which there are the fewest captains.", + "query": "SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Which classes have more than two captains?", + "SpiderSynQuestion": "Which classes have more than two captains?", + "query": "SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Give the classes that have more than two captains.", + "SpiderSynQuestion": "Give the classes that have more than two captains.", + "query": "SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the name of captains whose rank are either Midshipman or Lieutenant.", + "SpiderSynQuestion": "Find the name of captains whose rank are either Midshipman or Lieutenant.", + "query": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the names of captains that have either the rank Midshipman or Lieutenant?", + "SpiderSynQuestion": "What are the names of captains that have either the rank Midshipman or Lieutenant?", + "query": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the average and minimum age of captains in different class?", + "SpiderSynQuestion": "What are the average and minimum age of captains in different class?", + "query": "SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Return the average and minimum age of captains in each class.", + "SpiderSynQuestion": "Return the average and minimum age of captains in each class.", + "query": "SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.", + "SpiderSynQuestion": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.", + "query": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?", + "SpiderSynQuestion": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?", + "query": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the captain rank that has no captain in Third-rate ship of the line class.", + "SpiderSynQuestion": "Find the captain rank that has no captain in Third-rate ship of the line class.", + "query": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?", + "SpiderSynQuestion": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?", + "query": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What is the name of the youngest captain?", + "SpiderSynQuestion": "What is the name of the youngest captain?", + "query": "SELECT name FROM captain ORDER BY age LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Return the name of the youngest captain.", + "SpiderSynQuestion": "Return the name of the youngest captain.", + "query": "SELECT name FROM captain ORDER BY age LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "how many ships are there?", + "SpiderSynQuestion": "how many vessels are there?", + "query": "SELECT count(*) FROM ship" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Count the number of ships.", + "SpiderSynQuestion": "Count the number of vessels.", + "query": "SELECT count(*) FROM ship" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the name, type, and flag of the ship that is built in the most recent year.", + "SpiderSynQuestion": "Find the name, type, and banner of the vessel that is built in the most recent year.", + "query": "SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What is the name, type, and flag of the ship that was built in the most recent year?", + "SpiderSynQuestion": "What is the name, type, and banner of the vessel that was built in the most recent year?", + "query": "SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Group by ships by flag, and return number of ships that have each flag.", + "SpiderSynQuestion": "Group by vessels by banner, and return number of vessels that have each banner.", + "query": "SELECT count(*) , flag FROM ship GROUP BY flag" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the different ship flags, and how many ships have each?", + "SpiderSynQuestion": "What are the different vessel banners, and how many vessels have each?", + "query": "SELECT count(*) , flag FROM ship GROUP BY flag" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Which flag is most widely used among all ships?", + "SpiderSynQuestion": "Which banner is most widely used among all vessels?", + "query": "SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Return the flag that is most common among all ships.", + "SpiderSynQuestion": "Return the banner that is most common among all vessels.", + "query": "SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "List all ship names in the order of built year and class.", + "SpiderSynQuestion": "List all vessel names in the order of built year and class.", + "query": "SELECT name FROM ship ORDER BY built_year , CLASS" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the names of ships, ordered by year they were built and their class?", + "SpiderSynQuestion": "What are the names of vessels, ordered by year they were built and their class?", + "query": "SELECT name FROM ship ORDER BY built_year , CLASS" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the ship type that are used by both ships with Panama and Malta flags.", + "SpiderSynQuestion": "Find the vessel category that are used by both vessels with Panama and Malta flags.", + "query": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What types of ships have both ships that have Panama Flags and Malta flags?", + "SpiderSynQuestion": "What categories of vessels have both vessels that have Panama Flags and Malta flags?", + "query": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "In which year were most of ships built?", + "SpiderSynQuestion": "In which year were most of vessels built?", + "query": "SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What is the year in which most ships were built?", + "SpiderSynQuestion": "What is the year in which most vessels were built?", + "query": "SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the name of the ships that have more than one captain.", + "SpiderSynQuestion": "Find the name of the vessels that have more than one captain.", + "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the names of ships that have more than one captain?", + "SpiderSynQuestion": "What are the names of vessels that have more than one captain?", + "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "what are the names and classes of the ships that do not have any captain yet?", + "SpiderSynQuestion": "what are the names and classes of the vessels that do not have any captain yet?", + "query": "SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain)" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Return the names and classes of ships that do not have a captain?", + "SpiderSynQuestion": "Return the names and classes of vessels that do not have a captain?", + "query": "SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain)" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the name of the ship that is steered by the youngest captain.", + "SpiderSynQuestion": "Find the name of the vessel that is steered by the youngest captain.", + "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What is the name of the ship that is commanded by the youngest captain?", + "SpiderSynQuestion": "What is the name of the vessel that is commanded by the youngest captain?", + "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.", + "SpiderSynQuestion": "Find the name and banner of vessels that are not steered by any captain with Midshipman rank.", + "query": "SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?", + "SpiderSynQuestion": "What are the names and banners of vessels that do not have a captain with the rank of Midshipman?", + "query": "SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.", + "SpiderSynQuestion": "Find the name of the vessels that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.", + "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'" + }, + { + "db_id": "ship_1", + "SpiderQuestion": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?", + "SpiderSynQuestion": "What are the names of vessels that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?", + "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What is id of the city that hosted events in the most recent year?", + "SpiderSynQuestion": "What is id of the town that held events in the most recent year?", + "query": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Find the city that hosted some events in the most recent year. What is the id of this city?", + "SpiderSynQuestion": "Find the town that held some events in the most recent year. What is the id of this town?", + "query": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Find the match ids of the cities that hosted competition \"1994 FIFA World Cup qualification\"?", + "SpiderSynQuestion": "Find the contest ids of the towns that hosted competition \"1994 FIFA World Cup qualification\"?", + "query": "SELECT match_id FROM MATCH WHERE competition = \"1994 FIFA World Cup qualification\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What is the match id of the competition called \"1994 FIFA World Cup qualification\"?", + "SpiderSynQuestion": "What is the game id of the competition called \"1994 FIFA World Cup qualification\"?", + "query": "SELECT match_id FROM MATCH WHERE competition = \"1994 FIFA World Cup qualification\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Find the cities which were once a host city after 2010?", + "SpiderSynQuestion": "Find the towns which were once a host town after 2010?", + "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities served as a host city after 2010?", + "SpiderSynQuestion": "Which towns served as a host town after 2010?", + "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which city has hosted the most events?", + "SpiderSynQuestion": "Which town has held the most events?", + "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Find the city that hosted the most events.", + "SpiderSynQuestion": "Find the town that held the most events.", + "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What is the venue of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"?", + "SpiderSynQuestion": "What is the location of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"?", + "query": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = \"Nanjing ( Jiangsu )\" AND T3.competition = \"1994 FIFA World Cup qualification\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Find the venue of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\".", + "SpiderSynQuestion": "Find the location of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\".", + "query": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = \"Nanjing ( Jiangsu )\" AND T3.competition = \"1994 FIFA World Cup qualification\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Give me the temperature of Shanghai in January.", + "SpiderSynQuestion": "Give me the celsius degree of Shanghai in January.", + "query": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = \"Shanghai\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What is the temperature of \"Shanghai\" city in January?", + "SpiderSynQuestion": "What is the celsius degree of \"Shanghai\" city in January?", + "query": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = \"Shanghai\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What is the host year of city \"Taizhou ( Zhejiang )\"?", + "SpiderSynQuestion": "What is the host year of town \"Taizhou ( Zhejiang )\"?", + "query": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = \"Taizhou ( Zhejiang )\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "IN which year did city \"Taizhou ( Zhejiang )\" serve as a host city?", + "SpiderSynQuestion": "IN which year did town \"Taizhou ( Zhejiang )\" serve as a host town?", + "query": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = \"Taizhou ( Zhejiang )\"" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which three cities have the largest regional population?", + "SpiderSynQuestion": "Which three towns have the largest regional population?", + "query": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What are the three largest cities in terms of regional population?", + "SpiderSynQuestion": "What are the three largest towns in terms of regional population?", + "query": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which city has the lowest GDP? Please list the city name and its GDP.", + "SpiderSynQuestion": "Which town has the lowest gross domestic product? Please list the town name and its gross domestic product.", + "query": "SELECT city , GDP FROM city ORDER BY GDP LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What is the city with the smallest GDP? Return the city and its GDP.", + "SpiderSynQuestion": "What is the town with the smallest gross domestic product? Return the town and its gross domestic product.", + "query": "SELECT city , GDP FROM city ORDER BY GDP LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which city has the highest temperature in February?", + "SpiderSynQuestion": "Which town has the highest temperature in February?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "In February, which city marks the highest temperature?", + "SpiderSynQuestion": "In February, which town marks the highest celsius degree?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?", + "SpiderSynQuestion": "Give me a list of towns whose celsius degree in March is lower than that in July or higher than that in Oct?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities' temperature in March is lower than that in July or higher than that in Oct?", + "SpiderSynQuestion": "Which towns' celsius degree in March is lower than that in July or higher than that in Oct?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?", + "SpiderSynQuestion": "Give me a list of towns whose celsius degree in Mar is lower than that in July and which have also served as host towns?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities have lower temperature in March than in July and have been once host cities?", + "SpiderSynQuestion": "Which towns have lower celsius degree in March than in July and have been once host towns?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.", + "SpiderSynQuestion": "Give me a list of towns whose celsius degree in Mar is lower than that in Dec and which have never been host towns.", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities have lower temperature in March than in Dec and have never served as host cities?", + "SpiderSynQuestion": "Which towns have lower celsius degree in March than in Dec and have never served as host towns?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?", + "SpiderSynQuestion": "Give me a list of towns whose celsius degree in Feb is higher than that in Jun or towns that were once host towns?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?", + "SpiderSynQuestion": "Which towns have higher celsius degree in Feb than in Jun or have once served as host towns?", + "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Please give me a list of cities whose regional population is over 10000000.", + "SpiderSynQuestion": "Please give me a list of towns whose regional populace is over 10000000.", + "query": "SELECT city FROM city WHERE regional_population > 10000000" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities have regional population above 10000000?", + "SpiderSynQuestion": "Which towns have regional populace above 10000000?", + "query": "SELECT city FROM city WHERE regional_population > 10000000" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.", + "SpiderSynQuestion": "Please give me a list of towns whose regional populace is over 8000000 or under 5000000.", + "query": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities have regional population above 8000000 or below 5000000?", + "SpiderSynQuestion": "Which towns have regional populace above 8000000 or below 5000000?", + "query": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Find the number of matches in different competitions.", + "SpiderSynQuestion": "Find the number of games in different competitions.", + "query": "SELECT count(*) , Competition FROM MATCH GROUP BY Competition" + }, + { + "db_id": "city_record", + "SpiderQuestion": "For each competition, count the number of matches.", + "SpiderSynQuestion": "For each contest, count the number of matches.", + "query": "SELECT count(*) , Competition FROM MATCH GROUP BY Competition" + }, + { + "db_id": "city_record", + "SpiderQuestion": "List venues of all matches in the order of their dates starting from the most recent one.", + "SpiderSynQuestion": "List locations of all matches in the order of their dates starting from the most recent one.", + "query": "SELECT venue FROM MATCH ORDER BY date DESC" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What are the venues of all the matches? Sort them in the descending order of match date.", + "SpiderSynQuestion": "What are the locations of all the matches? Sort them in the descending order of match date.", + "query": "SELECT venue FROM MATCH ORDER BY date DESC" + }, + { + "db_id": "city_record", + "SpiderQuestion": "what is the GDP of the city with the largest population.", + "SpiderSynQuestion": "what is the gross domestic product of the city with the largest population.", + "query": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Find the GDP of the city with the largest regional population.", + "SpiderSynQuestion": "Find the gross domestic product of the city with the largest regional population.", + "query": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "What are the GDP and population of the city that already served as a host more than once?", + "SpiderSynQuestion": "What are the gross domestic product and number of people of the city that already served as a host more than once?", + "query": "SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1" + }, + { + "db_id": "city_record", + "SpiderQuestion": "Which cities have served as host cities more than once? Return me their GDP and population.", + "SpiderSynQuestion": "Which cities have served as host cities more than once? Return me their gross domestic product and number of people.", + "query": "SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "List every individual's first name, middle name and last name in alphabetical order by last name.", + "SpiderSynQuestion": "List every individual's forename, middle name and surname in alphabetical order by surname.", + "query": "SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the first, middle, and last names of all individuals, ordered by last name?", + "SpiderSynQuestion": "What are the forenames, middle names, and family names of all individuals, ordered by family name?", + "query": "SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name" + }, + { + "db_id": "e_government", + "SpiderQuestion": "List all the types of forms.", + "SpiderSynQuestion": "List all the types of forms.", + "query": "SELECT DISTINCT form_type_code FROM forms" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the different types of forms?", + "SpiderSynQuestion": "What are the different types of forms?", + "query": "SELECT DISTINCT form_type_code FROM forms" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the name of the most popular party form.", + "SpiderSynQuestion": "Find the name of the most popular party type.", + "query": "SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What is the name of the party form that is most common?", + "SpiderSynQuestion": "What is the name of the party type that is most common?", + "query": "SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the payment method and phone of the party with email \"enrico09@example.com\".", + "SpiderSynQuestion": "Find the payment type and telephone of the party with email \"enrico09@example.com\".", + "query": "SELECT payment_method_code , party_phone FROM parties WHERE party_email = \"enrico09@example.com\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?", + "SpiderSynQuestion": "What is the payment type code and party telephone of the party with the email 'enrico09@example.com'?", + "query": "SELECT payment_method_code , party_phone FROM parties WHERE party_email = \"enrico09@example.com\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the emails of parties with the most popular party form.", + "SpiderSynQuestion": "Find the emails of parties with the most popular party type.", + "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the party emails associated with parties that used the party form that is the most common?", + "SpiderSynQuestion": "What are the party emails associated with parties that used the party type that is the most common?", + "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)" + }, + { + "db_id": "e_government", + "SpiderQuestion": "List all the name of organizations in order of the date formed.", + "SpiderSynQuestion": "List all the name of organizations in order of the date formed.", + "query": "SELECT organization_name FROM organizations ORDER BY date_formed ASC" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the names of organizations, ordered by the date they were formed, ascending?", + "SpiderSynQuestion": "What are the names of organizations, ordered by the date they were formed, ascending?", + "query": "SELECT organization_name FROM organizations ORDER BY date_formed ASC" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the name of the youngest organization.", + "SpiderSynQuestion": "Find the name of the youngest organization.", + "query": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What is the name of the organization that was formed most recently?", + "SpiderSynQuestion": "What is the name of the organization that was formed most recently?", + "query": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the last name of the latest contact individual of the organization \"Labour Party\".", + "SpiderSynQuestion": "Find the surname of the latest contact individual of the organization \"Labour Party\".", + "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = \"Labour Party\" ORDER BY t2.date_contact_to DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?", + "SpiderSynQuestion": "What is the surname of the contact individual from the Labour party organization who was contacted most recently?", + "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = \"Labour Party\" ORDER BY t2.date_contact_to DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.", + "SpiderSynQuestion": "Find the family name of the first ever contact person of the organization with the highest UK Vat number.", + "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?", + "SpiderSynQuestion": "What is the family name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?", + "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "How many services are there?", + "SpiderSynQuestion": "How many services are there?", + "query": "SELECT count(*) FROM services" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Count the number of services.", + "SpiderSynQuestion": "Count the number of services.", + "query": "SELECT count(*) FROM services" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find name of the services that has never been used.", + "SpiderSynQuestion": "Find name of the services that has never been used.", + "query": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the names of the services that have never been used?", + "SpiderSynQuestion": "What are the names of the services that have never been used?", + "query": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the name of all the cities and states.", + "SpiderSynQuestion": "Find the name of all the cities and states.", + "query": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the names of all cities and states?", + "SpiderSynQuestion": "What are the names of all cities and states?", + "query": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses" + }, + { + "db_id": "e_government", + "SpiderQuestion": "How many cities are there in state \"Colorado\"?", + "SpiderSynQuestion": "How many cities are there in state \"Colorado\"?", + "query": "SELECT count(*) FROM addresses WHERE state_province_county = \"Colorado\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Count the number of cities in the state of Colorado.", + "SpiderSynQuestion": "Count the number of cities in the state of Colorado.", + "query": "SELECT count(*) FROM addresses WHERE state_province_county = \"Colorado\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the payment method code used by more than 3 parties.", + "SpiderSynQuestion": "Find the payment type code used by more than 3 parties.", + "query": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the payment method codes that have been used by more than 3 parties?", + "SpiderSynQuestion": "What are the payment type codes that have been used by more than 3 parties?", + "query": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the name of organizations whose names contain \"Party\".", + "SpiderSynQuestion": "Find the name of organizations whose names contain \"Party\".", + "query": "SELECT organization_name FROM organizations WHERE organization_name LIKE \"%Party%\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the names of organizations that contain the word \"Party\"?", + "SpiderSynQuestion": "What are the names of organizations that contain the word \"Party\"?", + "query": "SELECT organization_name FROM organizations WHERE organization_name LIKE \"%Party%\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "How many distinct payment methods are used by parties?", + "SpiderSynQuestion": "How many different payment types are used by parties?", + "query": "SELECT count(DISTINCT payment_method_code) FROM parties" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Count the number of different payment method codes used by parties.", + "SpiderSynQuestion": "Count the number of different payment type codes used by parties.", + "query": "SELECT count(DISTINCT payment_method_code) FROM parties" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Which is the email of the party that has used the services the most number of times?", + "SpiderSynQuestion": "Which is the email of the party that has used the services the most number of times?", + "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Return the party email that has used party services the greatest number of times.", + "SpiderSynQuestion": "Return the party email that has used party services the greatest number of times.", + "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Which state can address \"6862 Kaitlyn Knolls\" possibly be in?", + "SpiderSynQuestion": "Which state can address \"6862 Kaitlyn Knolls\" possibly be in?", + "query": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE \"%6862 Kaitlyn Knolls%\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\".", + "SpiderSynQuestion": "Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\".", + "query": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE \"%6862 Kaitlyn Knolls%\"" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What is the name of organization that has the greatest number of contact individuals?", + "SpiderSynQuestion": "What is the name of organization that has the greatest number of contact individuals?", + "query": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Return the name of the organization which has the most contact individuals.", + "SpiderSynQuestion": "Return the name of the organization which has the most contact individuals.", + "query": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "e_government", + "SpiderQuestion": "Find the last name of the individuals that have been contact individuals of an organization.", + "SpiderSynQuestion": "Find the family name of the individuals that have been contact individuals of an organization.", + "query": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id" + }, + { + "db_id": "e_government", + "SpiderQuestion": "What are the last names of individuals who have been contact individuals for an organization?", + "SpiderSynQuestion": "What are the family names of individuals who have been contact individuals for an organization?", + "query": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "How many drivers are there?", + "SpiderSynQuestion": "How many chauffeurs are there?", + "query": "SELECT count(*) FROM driver" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the name, home city, and age for all drivers.", + "SpiderSynQuestion": "Show the name, home city, and age for all chauffeurs.", + "query": "SELECT name , home_city , age FROM driver" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the party and the number of drivers in each party.", + "SpiderSynQuestion": "Show the party and the number of chauffeurs in each party.", + "query": "SELECT party , count(*) FROM driver GROUP BY party" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the name of drivers in descending order of age.", + "SpiderSynQuestion": "Show the name of chauffeurs in descending order of age.", + "query": "SELECT name FROM driver ORDER BY age DESC" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show all different home cities.", + "SpiderSynQuestion": "Show all different home cities.", + "query": "SELECT DISTINCT home_city FROM driver" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the home city with the most number of drivers.", + "SpiderSynQuestion": "Show the home city with the most number of chauffeurs.", + "query": "SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the party with drivers from Hartford and drivers older than 40.", + "SpiderSynQuestion": "Show the party with drivers from Hartford and drivers older than 40.", + "query": "SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show home city where at least two drivers older than 40 are from.", + "SpiderSynQuestion": "Show home city where at least two chauffeurs older than 40 are from.", + "query": "SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING count(*) >= 2" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show all home cities except for those having a driver older than 40.", + "SpiderSynQuestion": "Show all home cities except for those having a chauffeur older than 40.", + "query": "SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the names of the drivers without a school bus.", + "SpiderSynQuestion": "Show the names of the chauffeurs without a school bus.", + "query": "SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the types of schools that have two schools.", + "SpiderSynQuestion": "Show the categories of schools that have two schools.", + "query": "SELECT TYPE FROM school GROUP BY TYPE HAVING count(*) = 2" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the school name and driver name for all school buses.", + "SpiderSynQuestion": "Show the school name and chauffeur name for all school buses.", + "query": "SELECT T2.school , T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "What is the maximum, minimum and average years spent working on a school bus?", + "SpiderSynQuestion": "What is the maximum, minimum and average years spent working on a school bus?", + "query": "SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the school name and type for schools without a school bus.", + "SpiderSynQuestion": "Show the school name and category for schools without a school bus.", + "query": "SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "Show the type of school and the number of buses for each type.", + "SpiderSynQuestion": "Show the category of school and the number of buses for each category.", + "query": "SELECT T2.type , count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "How many drivers are from Hartford city or younger than 40?", + "SpiderSynQuestion": "How many chauffeurs are from Hartford city or younger than 40?", + "query": "SELECT count(*) FROM driver WHERE home_city = 'Hartford' OR age < 40" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "List names for drivers from Hartford city and younger than 40.", + "SpiderSynQuestion": "List names for chauffeurs from Hartford city and younger than 40.", + "query": "SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40" + }, + { + "db_id": "school_bus", + "SpiderQuestion": "find the name of driver who is driving the school bus with the longest working history.", + "SpiderSynQuestion": "find the name of chauffeur who is driving the school bus with the longest working history.", + "query": "SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id = t2.driver_id ORDER BY years_working DESC LIMIT 1" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "How many flights have a velocity larger than 200?", + "SpiderSynQuestion": "How many flights have a speed larger than 200?", + "query": "SELECT count(*) FROM flight WHERE velocity > 200" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.", + "SpiderSynQuestion": "List the vehicle flight number, day and aviator of all the flights, ordered by altitude.", + "query": "SELECT vehicle_flight_number , date , pilot FROM flight ORDER BY altitude ASC" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "List the id, country, city and name of the airports ordered alphabetically by the name.", + "SpiderSynQuestion": "List the id, nation, city and name of the aerodromes ordered alphabetically by the name.", + "query": "SELECT id , country , city , name FROM airport ORDER BY name" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What is maximum group equity shareholding of the companies?", + "SpiderSynQuestion": "What is maximum group equity shareholding of the companies?", + "query": "SELECT max(group_equity_shareholding) FROM operate_company" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What is the velocity of the pilot named 'Thompson'?", + "SpiderSynQuestion": "What is the speed of the aviator named 'Thompson'?", + "query": "SELECT avg(velocity) FROM flight WHERE pilot = 'Thompson'" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What are the names and types of the companies that have ever operated a flight?", + "SpiderSynQuestion": "What are the names and types of the enterprise that have ever operated a flight?", + "query": "SELECT T1.name , T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What are the names of the airports which are not in the country 'Iceland'?", + "SpiderSynQuestion": "What are the names of the aerodromes which are not in the country 'Iceland'?", + "query": "SELECT name FROM airport WHERE country != 'Iceland'" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What are the distinct types of the companies that have operated any flights with velocity less than 200?", + "SpiderSynQuestion": "What are the different types of the enterprise that have operated any flights with velocity less than 200?", + "query": "SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What are the ids and names of the companies that operated more than one flight?", + "SpiderSynQuestion": "What are the ids and names of the enterprise that operated more than one flight?", + "query": "SELECT T1.id , T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id HAVING count(*) > 1" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What is the id, name and IATA code of the airport that had most number of flights?", + "SpiderSynQuestion": "What is the id, name and IATA code of the aerodrome that had most number of flights?", + "query": "SELECT T1.id , T1.name , T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?", + "SpiderSynQuestion": "What are the different aviator names who had piloted a flight in the country 'United States' or in the aerodrome named 'Billund Airport'?", + "query": "SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id WHERE T1.country = 'United States' OR T1.name = 'Billund Airport'" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "What is the most common company type, and how many are there?", + "SpiderSynQuestion": "What is the most common enterprise category, and how many are there?", + "query": "SELECT TYPE , count(*) FROM operate_company GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "How many airports haven't the pilot 'Thompson' driven an aircraft?", + "SpiderSynQuestion": "How many aerodromes haven't the aviator 'Thompson' driven an aircraft?", + "query": "SELECT count(*) FROM airport WHERE id NOT IN ( SELECT airport_id FROM flight WHERE pilot = 'Thompson' );" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.", + "SpiderSynQuestion": "List the name of the aviators who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.", + "query": "SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Catering services'" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "Which of the airport names contains the word 'international'?", + "SpiderSynQuestion": "Which of the aerodrome names contains the word 'international'?", + "query": "SELECT name FROM airport WHERE name LIKE '%international%'" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "How many companies operates airlines in each airport?", + "SpiderSynQuestion": "How many enterprise operates airlines in each aerodrome?", + "query": "SELECT T3.id , count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "how many airports are there in each country?", + "SpiderSynQuestion": "how many aerodromes are there in each nation?", + "query": "SELECT count(*) , country FROM airport GROUP BY country" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "which countries have more than 2 airports?", + "SpiderSynQuestion": "which nations have more than 2 aerodromes?", + "query": "SELECT country FROM airport GROUP BY country HAVING count(*) > 2" + }, + { + "db_id": "flight_company", + "SpiderQuestion": "which pilot is in charge of the most number of flights?", + "SpiderSynQuestion": "which aviator is in charge of the most number of flights?", + "query": "SELECT pilot FROM flight GROUP BY pilot ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many accounts do we have?", + "SpiderSynQuestion": "How many accounts do we have?", + "query": "SELECT count(*) FROM Accounts" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Count the number of accounts.", + "SpiderSynQuestion": "Count the number of accounts.", + "query": "SELECT count(*) FROM Accounts" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show all account ids and account details.", + "SpiderSynQuestion": "Show all account ids and account information.", + "query": "SELECT account_id , account_details FROM Accounts" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the ids and details of all accounts?", + "SpiderSynQuestion": "What are the ids and information of all accounts?", + "query": "SELECT account_id , account_details FROM Accounts" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many statements do we have?", + "SpiderSynQuestion": "How many statements do we have?", + "query": "SELECT count(*) FROM Statements" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Count the number of statements.", + "SpiderSynQuestion": "Count the number of statements.", + "query": "SELECT count(*) FROM Statements" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "List all statement ids and statement details.", + "SpiderSynQuestion": "List all statement ids and statement information.", + "query": "SELECT STATEMENT_ID , statement_details FROM Statements" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the ids and details of all statements?", + "SpiderSynQuestion": "What are the ids and information of all statements?", + "query": "SELECT STATEMENT_ID , statement_details FROM Statements" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show statement id, statement detail, account detail for accounts.", + "SpiderSynQuestion": "Show statement id, statement information, account information for accounts.", + "query": "SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the statement ids, statement details, and account details, for all accounts?", + "SpiderSynQuestion": "What are the statement ids, statement information, and account information, for all accounts?", + "query": "SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show all statement id and the number of accounts for each statement.", + "SpiderSynQuestion": "Show all statement id and the number of accounts for each statement.", + "query": "SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_ID" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the different statement ids on accounts, and the number of accounts for each?", + "SpiderSynQuestion": "What are the different statement ids on accounts, and the number of accounts for each?", + "query": "SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_ID" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the statement id and the statement detail for the statement with most number of accounts.", + "SpiderSynQuestion": "Show the statement id and the statement information for the statement with most number of accounts.", + "query": "SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the statement id and statement detail for the statement that has the most corresponding accounts?", + "SpiderSynQuestion": "What are the statement id and statement information for the statement that has the most corresponding accounts?", + "query": "SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the number of documents.", + "SpiderSynQuestion": "Show the number of files.", + "query": "SELECT count(*) FROM Documents" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Count the number of documents.", + "SpiderSynQuestion": "Count the number of files.", + "query": "SELECT count(*) FROM Documents" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.", + "SpiderSynQuestion": "List the file type code, file name, and file describing content for the file with name 'Noel CV' or name 'King Book'.", + "query": "SELECT document_type_code , document_name , document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?", + "SpiderSynQuestion": "What are the type come, name, and describing content of the file that has either the name 'Noel CV' or 'King Book'?", + "query": "SELECT document_type_code , document_name , document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the ids and names of all documents.", + "SpiderSynQuestion": "Show the ids and names of all files.", + "query": "SELECT document_id , document_name FROM Documents" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the ids and names for each of the documents?", + "SpiderSynQuestion": "What are the ids and names for each of the files?", + "query": "SELECT document_id , document_name FROM Documents" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Find names and ids of all documents with document type code BK.", + "SpiderSynQuestion": "Find names and ids of all files with file type code BK.", + "query": "SELECT document_name , document_id FROM Documents WHERE document_type_code = \"BK\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the names and ids of documents that have the type code BK?", + "SpiderSynQuestion": "What are the names and ids of files that have the type code BK?", + "query": "SELECT document_name , document_id FROM Documents WHERE document_type_code = \"BK\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many documents are with document type code BK for each product id?", + "SpiderSynQuestion": "How many files are with file type code BK for each goods id?", + "query": "SELECT count(*) , project_id FROM Documents WHERE document_type_code = \"BK\" GROUP BY project_id" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Count the number of documents with the type code BK that correspond to each product id.", + "SpiderSynQuestion": "Count the number of files with the type code BK that correspond to each goods id.", + "query": "SELECT count(*) , project_id FROM Documents WHERE document_type_code = \"BK\" GROUP BY project_id" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the document name and the document date for all documents on project with details 'Graph Database project'.", + "SpiderSynQuestion": "Show the file name and the file date for all files on project with details 'Graph Database project'.", + "query": "SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?", + "SpiderSynQuestion": "What are the names and day for files corresponding to project that has the details 'Graph Database project'?", + "query": "SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show project ids and the number of documents in each project.", + "SpiderSynQuestion": "Show project ids and the number of files in each project.", + "query": "SELECT project_id , count(*) FROM Documents GROUP BY project_id" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many documents correspond with each project id?", + "SpiderSynQuestion": "How many files correspond with each project id?", + "query": "SELECT project_id , count(*) FROM Documents GROUP BY project_id" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the id of the project with least number of documents?", + "SpiderSynQuestion": "What is the id of the project with least number of files?", + "query": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the id of the project that has the fewest corresponding documents.", + "SpiderSynQuestion": "Return the id of the project that has the fewest corresponding files.", + "query": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the ids for projects with at least 2 documents.", + "SpiderSynQuestion": "Show the ids for projects with at least 2 files.", + "query": "SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are project ids of projects that have 2 or more corresponding documents?", + "SpiderSynQuestion": "What are project ids of projects that have 2 or more corresponding files?", + "query": "SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "List document type codes and the number of documents in each code.", + "SpiderSynQuestion": "List file type codes and the number of files in each code.", + "query": "SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many documents are there of each type?", + "SpiderSynQuestion": "How many files are there of each type?", + "query": "SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the document type code with most number of documents?", + "SpiderSynQuestion": "What is the file type code with most number of files?", + "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the code of the document type that is most common.", + "SpiderSynQuestion": "Return the code of the file type that is most common.", + "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the document type code with fewer than 3 documents.", + "SpiderSynQuestion": "Show the file type code with fewer than 3 files.", + "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the codes corresponding to document types for which there are less than 3 documents?", + "SpiderSynQuestion": "What are the codes corresponding to file types for which there are less than 3 files?", + "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.", + "SpiderSynQuestion": "Show the statement information and the corresponding file name for the statement with information 'Private Project'.", + "query": "SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?", + "SpiderSynQuestion": "What are the information for statements with the information 'Private Project', and what are the names of the corresponding files?", + "query": "SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show all document type codes, document type names, document type descriptions.", + "SpiderSynQuestion": "Show all file type codes, file type names, file type descriptions.", + "query": "SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the codes, names, and descriptions of the different document types?", + "SpiderSynQuestion": "What are the codes, names, and descriptions of the different file types?", + "query": "SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the document type description for document type named Film?", + "SpiderSynQuestion": "What is the file type describing content for file type named Film?", + "query": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = \"Film\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the description of the document type name 'Film'.", + "SpiderSynQuestion": "Return the describing content of the file type name 'Film'.", + "query": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = \"Film\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the document type name and the document type description and creation date for all the documents?", + "SpiderSynQuestion": "What is the file type name and the file type describing content and creation date for all the files?", + "query": "SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the type name, type description, and date of creation for each document.", + "SpiderSynQuestion": "Return the type name, type description, and day of creation for each file.", + "query": "SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the number of projects.", + "SpiderSynQuestion": "Show the number of projects.", + "query": "SELECT count(*) FROM Projects" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many projects are there?", + "SpiderSynQuestion": "How many projects are there?", + "query": "SELECT count(*) FROM Projects" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "List ids and details for all projects.", + "SpiderSynQuestion": "List ids and information for all projects.", + "query": "SELECT project_id , project_details FROM Projects" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the ids and details for each project?", + "SpiderSynQuestion": "What are the ids and information for each project?", + "query": "SELECT project_id , project_details FROM Projects" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the project id and detail for the project with at least two documents?", + "SpiderSynQuestion": "What is the project id and information for the project with at least two files?", + "query": "SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the ids and details corresponding to projects for which there are more than two documents.", + "SpiderSynQuestion": "Return the ids and information corresponding to projects for which there are more than two files.", + "query": "SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the project detail for the project with document \"King Book\"?", + "SpiderSynQuestion": "What is the project information for the project with file \"King Book\"?", + "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = \"King Book\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Give the details of the project with the document name 'King Book'.", + "SpiderSynQuestion": "Give the information of the project with the file name 'King Book'.", + "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = \"King Book\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many budget types do we have?", + "SpiderSynQuestion": "How many budget types do we have?", + "query": "SELECT count(*) FROM Ref_budget_codes" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Count the number of budget codes.", + "SpiderSynQuestion": "Count the number of budget codes.", + "query": "SELECT count(*) FROM Ref_budget_codes" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "List all budget type codes and descriptions.", + "SpiderSynQuestion": "List all budget type codes and describing details.", + "query": "SELECT budget_type_code , budget_type_description FROM Ref_budget_codes" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the type codes and descriptions of each budget type?", + "SpiderSynQuestion": "What are the type codes and describing details of each budget type?", + "query": "SELECT budget_type_code , budget_type_description FROM Ref_budget_codes" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the description for the budget type with code ORG?", + "SpiderSynQuestion": "What is the describing detail for the budget type with code ORG?", + "query": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = \"ORG\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the description of the budget type that has the code ORG.", + "SpiderSynQuestion": "Return the describing detail of the budget type that has the code ORG.", + "query": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = \"ORG\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many documents have expenses?", + "SpiderSynQuestion": "How many documents have expenses?", + "query": "SELECT count(*) FROM Documents_with_expenses" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Count the number of documents with expenses.", + "SpiderSynQuestion": "Count the number of files with expenses.", + "query": "SELECT count(*) FROM Documents_with_expenses" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the document ids for the budget type code 'SF'?", + "SpiderSynQuestion": "What are the file ids for the budget type code 'SF'?", + "query": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Give the ids of documents with expenses that have the budget code 'SF'.", + "SpiderSynQuestion": "Give the ids of files with expenses that have the budget code 'SF'.", + "query": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show the budget type code and description and the corresponding document id.", + "SpiderSynQuestion": "Show the budget type code and describing detail and the corresponding file id.", + "query": "SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.", + "SpiderSynQuestion": "Return the budget type codes, budget type descriptions and file ids for files with expenses.", + "query": "SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show ids for all documents with budget types described as 'Government'.", + "SpiderSynQuestion": "Show ids for all files with budget types described as 'Government'.", + "query": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = \"Government\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Give the ids for documents that have the budget description 'Government'.", + "SpiderSynQuestion": "Give the ids for files that have the budget description 'Government'.", + "query": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = \"Government\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show budget type codes and the number of documents in each budget type.", + "SpiderSynQuestion": "Show budget type codes and the number of files in each budget type.", + "query": "SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the different budget type codes, and how many documents are there for each?", + "SpiderSynQuestion": "What are the different budget type codes, and how many files are there for each?", + "query": "SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What is the budget type code with most number of documents.", + "SpiderSynQuestion": "What is the budget type code with most number of files.", + "query": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Give the budget type code that is most common among documents with expenses.", + "SpiderSynQuestion": "Give the budget type code that is most common among files with expenses.", + "query": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the ids of documents which don't have expense budgets?", + "SpiderSynQuestion": "What are the ids of files which don't have expense budgets?", + "query": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the ids of documents that do not have expenses.", + "SpiderSynQuestion": "Return the ids of files that do not have expenses.", + "query": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Show ids for all documents in type CV without expense budgets.", + "SpiderSynQuestion": "Show ids for all files in type CV without expense budgets.", + "query": "SELECT document_id FROM Documents WHERE document_type_code = \"CV\" EXCEPT SELECT document_id FROM Documents_with_expenses" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the ids of documents with the type code CV that do not have expenses.", + "SpiderSynQuestion": "What are the ids of files with the type code CV that do not have expenses.", + "query": "SELECT document_id FROM Documents WHERE document_type_code = \"CV\" EXCEPT SELECT document_id FROM Documents_with_expenses" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the ids of documents with letter 's' in the name with any expense budgets.", + "SpiderSynQuestion": "What are the ids of files with letter 's' in the name with any expense budgets.", + "query": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Give the ids of documents that have expenses and contain the letter s in their names.", + "SpiderSynQuestion": "Give the ids of files that have expenses and contain the letter s in their names.", + "query": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "How many documents do not have any expense?", + "SpiderSynQuestion": "How many files do not have any expense?", + "query": "SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Count the number of documents that do not have expenses.", + "SpiderSynQuestion": "Count the number of files that do not have expenses.", + "query": "SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?", + "SpiderSynQuestion": "What are the day for the files with both 'GV' type and 'SF' type expenses?", + "query": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.", + "SpiderSynQuestion": "Give the day of creation for files that have both budget type codes 'GV' and 'SF'.", + "query": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "What are the account details with the largest value or with value having char '5' in it?", + "SpiderSynQuestion": "What are the account information with the largest value or with value having char '5' in it?", + "query": "SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE \"%5%\"" + }, + { + "db_id": "cre_Docs_and_Epenses", + "SpiderQuestion": "Return the account details with the greatest value, as well as those that include the character 5.", + "SpiderSynQuestion": "Return the account information with the greatest value, as well as those that include the character 5.", + "query": "SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE \"%5%\"" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the total number of scientists.", + "SpiderSynQuestion": "Find the total number of scientists.", + "query": "SELECT count(*) FROM scientists" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "How many scientists are there?", + "SpiderSynQuestion": "How many scientists are there?", + "query": "SELECT count(*) FROM scientists" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the total hours of all projects.", + "SpiderSynQuestion": "Find the total hours of all projects.", + "query": "SELECT sum(hours) FROM projects" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What is the total number of hours for all projects?", + "SpiderSynQuestion": "What is the total number of hours for all projects?", + "query": "SELECT sum(hours) FROM projects" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "How many different scientists are assigned to any project?", + "SpiderSynQuestion": "How many different scientists are assigned to any project?", + "query": "SELECT count(DISTINCT scientist) FROM assignedto" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Count the number of different scientists assigned to any project.", + "SpiderSynQuestion": "Count the number of different scientists assigned to any project.", + "query": "SELECT count(DISTINCT scientist) FROM assignedto" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the number of distinct projects.", + "SpiderSynQuestion": "Find the number of different projects.", + "query": "SELECT count(DISTINCT name) FROM projects" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "How many different projects are there?", + "SpiderSynQuestion": "How many different projects are there?", + "query": "SELECT count(DISTINCT name) FROM projects" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the average hours of all projects.", + "SpiderSynQuestion": "Find the average hours of all projects.", + "query": "SELECT avg(hours) FROM projects" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What is the average hours across all projects?", + "SpiderSynQuestion": "What is the average hours across all projects?", + "query": "SELECT avg(hours) FROM projects" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the name of project that continues for the longest time.", + "SpiderSynQuestion": "Find the name of project that continues for the longest time.", + "query": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What is the name of the project with the most hours?", + "SpiderSynQuestion": "What is the name of the project with the most hours?", + "query": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "List the name of all projects that are operated longer than the average working hours of all projects.", + "SpiderSynQuestion": "List the name of all projects that are operated longer than the average working hours of all projects.", + "query": "SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of projects that have taken longer than the average number of hours for all projects?", + "SpiderSynQuestion": "What are the names of projects that have taken longer than the average number of hours for all projects?", + "query": "SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the name and hours of project that has the most number of scientists.", + "SpiderSynQuestion": "Find the name and hours of project that has the most number of scientists.", + "query": "SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What is the name and hours for the project which has the most scientists assigned to it?", + "SpiderSynQuestion": "What is the name and hours for the project which has the most scientists assigned to it?", + "query": "SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.", + "SpiderSynQuestion": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.", + "query": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?", + "SpiderSynQuestion": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?", + "query": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.", + "SpiderSynQuestion": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.", + "query": "SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?", + "SpiderSynQuestion": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?", + "query": "SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the name of projects that require between 100 and 300 hours of work.", + "SpiderSynQuestion": "Find the name of projects that require between 100 and 300 hours of work.", + "query": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of projects that require between 100 and 300 hours?", + "SpiderSynQuestion": "What are the names of projects that require between 100 and 300 hours?", + "query": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.", + "SpiderSynQuestion": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.", + "query": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?", + "SpiderSynQuestion": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?", + "query": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "List the names of all scientists sorted in alphabetical order.", + "SpiderSynQuestion": "List the names of all scientists sorted in alphabetical order.", + "query": "SELECT name FROM scientists ORDER BY name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of all the scientists in alphabetical order?", + "SpiderSynQuestion": "What are the names of all the scientists in alphabetical order?", + "query": "SELECT name FROM scientists ORDER BY name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the number of scientists involved for each project name.", + "SpiderSynQuestion": "Find the number of scientists involved for each project name.", + "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the naems of all the projects, and how many scientists were assigned to each of them?", + "SpiderSynQuestion": "What are the naems of all the projects, and how many scientists were assigned to each of them?", + "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the number of scientists involved for the projects that require more than 300 hours.", + "SpiderSynQuestion": "Find the number of scientists involved for the projects that require more than 300 hours.", + "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?", + "SpiderSynQuestion": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?", + "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the number of projects which each scientist is working on and scientist's name.", + "SpiderSynQuestion": "Find the number of projects which each scientist is working on and scientist's name.", + "query": "SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of the scientists, and how many projects are each of them working on?", + "SpiderSynQuestion": "What are the names of the scientists, and how many projects are each of them working on?", + "query": "SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the SSN and name of scientists who are assigned to the project with the longest hours.", + "SpiderSynQuestion": "Find the SSN and name of scientists who are assigned to the project with the longest hours.", + "query": "SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the SSN and names of scientists working on the project with the most hours?", + "SpiderSynQuestion": "What are the SSN and names of scientists working on the project with the most hours?", + "query": "SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the name of scientists who are assigned to some project.", + "SpiderSynQuestion": "Find the name of scientists who are assigned to some project.", + "query": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of scientists who are assigned to any project?", + "SpiderSynQuestion": "What are the names of scientists who are assigned to any project?", + "query": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Select the project names which are not assigned yet.", + "SpiderSynQuestion": "Select the project names which are not assigned yet.", + "query": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of projects that have not been assigned?", + "SpiderSynQuestion": "What are the names of projects that have not been assigned?", + "query": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the name of scientists who are not assigned to any project.", + "SpiderSynQuestion": "Find the name of scientists who are not assigned to any project.", + "query": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of scientists who have not been assigned a project?", + "SpiderSynQuestion": "What are the names of scientists who have not been assigned a project?", + "query": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the number of scientists who are not assigned to any project.", + "SpiderSynQuestion": "Find the number of scientists who are not assigned to any project.", + "query": "SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "How many scientists do not have any projects assigned to them?", + "SpiderSynQuestion": "How many scientists do not have any projects assigned to them?", + "query": "SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find the names of scientists who are not working on the project with the highest hours.", + "SpiderSynQuestion": "Find the names of scientists who are not working on the project with the highest hours.", + "query": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of scientists who are not working on the project with the most hours?", + "SpiderSynQuestion": "What are the names of scientists who are not working on the project with the most hours?", + "query": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.", + "SpiderSynQuestion": "List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.", + "query": "SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name.", + "SpiderSynQuestion": "What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name.", + "query": "SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.", + "SpiderSynQuestion": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.", + "query": "SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)" + }, + { + "db_id": "scientist_1", + "SpiderQuestion": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?", + "SpiderSynQuestion": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?", + "query": "SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the name of the highest rated wine?", + "SpiderSynQuestion": "What is the name of the highest rated alcoholic drink?", + "query": "SELECT Name FROM WINE ORDER BY Score LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the name of the wine with the highest score.", + "SpiderSynQuestion": "Give the name of the alcoholic drink with the highest score.", + "query": "SELECT Name FROM WINE ORDER BY Score LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Which winery is the wine that has the highest score from?", + "SpiderSynQuestion": "Which wine-making establishment is the alcoholic drink that has the highest score from?", + "query": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the winery at which the wine with the highest score was made?", + "SpiderSynQuestion": "What is the wine-making establishment at which the alcoholic drink with the highest score was made?", + "query": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the names of all wines produced in 2008.", + "SpiderSynQuestion": "Find the names of all alcoholic drink produced in 2008.", + "query": "SELECT Name FROM WINE WHERE YEAR = \"2008\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of all wines produced in 2008?", + "SpiderSynQuestion": "What are the names of all alcoholic drink produced in 2008?", + "query": "SELECT Name FROM WINE WHERE YEAR = \"2008\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the grapes and appelations of all wines.", + "SpiderSynQuestion": "List the grapes and grown places of all wines.", + "query": "SELECT Grape , Appelation FROM WINE" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the grapes and appelations of each wine?", + "SpiderSynQuestion": "What are the grapes and grown places of each wine?", + "query": "SELECT Grape , Appelation FROM WINE" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the names and scores of all wines.", + "SpiderSynQuestion": "List the names and scores of all alcoholic drink.", + "query": "SELECT Name , Score FROM WINE" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names and scores of all wines?", + "SpiderSynQuestion": "What are the names and scores of all alcoholic drink?", + "query": "SELECT Name , Score FROM WINE" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the area and county of all appelations.", + "SpiderSynQuestion": "List the district and county of all grown places.", + "query": "SELECT Area , County FROM APPELLATIONS" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the areas and counties for all appelations?", + "SpiderSynQuestion": "What are the districts and counties for all grown places?", + "query": "SELECT Area , County FROM APPELLATIONS" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the prices of wines produced before the year of 2010?", + "SpiderSynQuestion": "What are the prices of alcoholic drink produced before the year of 2010?", + "query": "SELECT Price FROM WINE WHERE YEAR < 2010" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Return the prices of wines produced before 2010.", + "SpiderSynQuestion": "Return the prices of alcoholic drink produced before 2010.", + "query": "SELECT Price FROM WINE WHERE YEAR < 2010" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the names of all distinct wines that have scores higher than 90.", + "SpiderSynQuestion": "List the names of all different alcoholic drink that have scores higher than 90.", + "query": "SELECT Name FROM WINE WHERE score > 90" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines with scores higher than 90?", + "SpiderSynQuestion": "What are the names of alcoholic drink with scores higher than 90?", + "query": "SELECT Name FROM WINE WHERE score > 90" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the names of all distinct wines that are made of red color grape.", + "SpiderSynQuestion": "List the names of all different alcoholic drink that are made of red color grape.", + "query": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines made from red grapes?", + "SpiderSynQuestion": "What are the names of alcoholic drink made from red grapes?", + "query": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the names of all distinct wines that have appellations in North Coast area.", + "SpiderSynQuestion": "Find the names of all different alcoholic drink that have appellations in North Coast area.", + "query": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"North Coast\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the distinct names of wines that have appellations in the North Coast area?", + "SpiderSynQuestion": "What are the different names of alcoholic drink that have appellations in the North Coast area?", + "query": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"North Coast\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "How many wines are produced at Robert Biale winery?", + "SpiderSynQuestion": "How many alcoholic drink are produced at Robert Biale winery?", + "query": "SELECT count(*) FROM WINE WHERE Winery = \"Robert Biale\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Count the number of wines produced at Robert Biale winery.", + "SpiderSynQuestion": "Count the number of alcoholic drink produced at Robert Biale winery.", + "query": "SELECT count(*) FROM WINE WHERE Winery = \"Robert Biale\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "How many appelations are in Napa Country?", + "SpiderSynQuestion": "How many grown places are in Napa Country?", + "query": "SELECT count(*) FROM APPELLATIONS WHERE County = \"Napa\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Count the number of appelations in Napa County.", + "SpiderSynQuestion": "Count the number of grown places in Napa County.", + "query": "SELECT count(*) FROM APPELLATIONS WHERE County = \"Napa\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give me the average prices of wines that are produced by appelations in Sonoma County.", + "SpiderSynQuestion": "Give me the average prices of wines that are produced by grown places in Sonoma County.", + "query": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Sonoma\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the average price of wines produced in appelations in Sonoma County?", + "SpiderSynQuestion": "What is the average price of wines produced in grown places in Sonoma County?", + "query": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Sonoma\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names and scores of wines that are made of white color grapes?", + "SpiderSynQuestion": "What are the names and scores of wines that are made of white color grapes?", + "query": "SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the names and scores of wines made from white grapes.", + "SpiderSynQuestion": "Give the names and scores of wines made from white grapes.", + "query": "SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.", + "SpiderSynQuestion": "Find the maximum price of wins from the grown places in Central Coast area and produced before the year of 2005.", + "query": "SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"Central Coast\" AND T2.year < 2005" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?", + "SpiderSynQuestion": "What is the maximum price of wines from the grown place in the Central Coast area, which was produced before 2005?", + "query": "SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"Central Coast\" AND T2.year < 2005" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.", + "SpiderSynQuestion": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.", + "query": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\" AND T2.score > 90" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the white grape used to produce wines with scores above 90.", + "SpiderSynQuestion": "Find the white grape used to produce wines with scores above 90.", + "query": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\" AND T2.score > 90" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the wines that have prices higher than 50 and made of Red color grapes?", + "SpiderSynQuestion": "What are the wines that have prices higher than 50 and made of Red color grapes?", + "query": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\" AND T2.price > 50" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines made from red grapes and with prices above 50?", + "SpiderSynQuestion": "What are the names of wines made from red grapes and with prices above 50?", + "query": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\" AND T2.price > 50" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the wines that have prices lower than 50 and have appelations in Monterey county?", + "SpiderSynQuestion": "What are the wines that have prices lower than 50 and have grown places in Monterey county?", + "query": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Monterey\" AND T2.price < 50" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the neames of wines with prices below 50 and with appelations in Monterey county.", + "SpiderSynQuestion": "Give the neames of wines with prices below 50 and with grown places in Monterey county.", + "query": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Monterey\" AND T2.price < 50" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the numbers of wines for different grapes?", + "SpiderSynQuestion": "What are the numbers of alcoholic drink for different grapes?", + "query": "SELECT count(*) , Grape FROM WINE GROUP BY Grape" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "How many wines are there for each grape?", + "SpiderSynQuestion": "How many alcoholic drink are there for each grape?", + "query": "SELECT count(*) , Grape FROM WINE GROUP BY Grape" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the average prices of wines for different years?", + "SpiderSynQuestion": "What are the average prices of alcoholic drink for different years?", + "query": "SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the average prices of wines for each each?", + "SpiderSynQuestion": "What is the average prices of alcoholic drink for each each?", + "query": "SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.", + "SpiderSynQuestion": "Find the different names of all alcoholic drink that have prices higher than some alcoholic drink from John Anthony winery.", + "query": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = \"John Anthony\")" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.", + "SpiderSynQuestion": "What are the different names of alcoholic drink with prices higher than any alcoholic drink from John Anthony winery.", + "query": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = \"John Anthony\")" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the names of all distinct wines in alphabetical order.", + "SpiderSynQuestion": "List the names of all different alcoholic drink in alphabetical order.", + "query": "SELECT DISTINCT Name FROM WINE ORDER BY Name" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines, sorted in alphabetical order?", + "SpiderSynQuestion": "What are the names of alcoholic drink, sorted in alphabetical order?", + "query": "SELECT DISTINCT Name FROM WINE ORDER BY Name" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the names of all distinct wines ordered by price.", + "SpiderSynQuestion": "List the names of all different alcoholic drink ordered by price.", + "query": "SELECT DISTINCT Name FROM WINE ORDER BY price" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines, sorted by price ascending?", + "SpiderSynQuestion": "What are the names of alcoholic drink, sorted by price ascending?", + "query": "SELECT DISTINCT Name FROM WINE ORDER BY price" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the area of the appelation that produces the highest number of wines before the year of 2010?", + "SpiderSynQuestion": "What is the district of the grown place that produces the highest number of wines before the year of 2010?", + "query": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the area for the appelation which produced the most wines prior to 2010?", + "SpiderSynQuestion": "What is the district for the grown place which produced the most wines prior to 2010?", + "query": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the color of the grape whose wine products has the highest average price?", + "SpiderSynQuestion": "What is the colour of the grape whose wine products has the highest average price?", + "query": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the color of the grape whose wine products have the highest average price?", + "SpiderSynQuestion": "Give the colour of the grape whose wine products have the highest average price?", + "query": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.", + "SpiderSynQuestion": "Find the different names of alcoholic drink produced before the year of 2000 or after the year of 2010.", + "query": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the distinct names of wines made before 2000 or after 2010.", + "SpiderSynQuestion": "Give the different names of alcoholic drink made before 2000 or after 2010.", + "query": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the distinct winery of wines having price between 50 and 100.", + "SpiderSynQuestion": "Find the different wine-making establishment of wines having price between 50 and 100.", + "query": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the distinct wineries which produce wines costing between 50 and 100?", + "SpiderSynQuestion": "What are the different wine-making establishment which produce wines costing between 50 and 100?", + "query": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?", + "SpiderSynQuestion": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?", + "query": "SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = \"Zinfandel\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.", + "SpiderSynQuestion": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.", + "query": "SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = \"Zinfandel\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the maximum price and score of wines produced by St. Helena appelation?", + "SpiderSynQuestion": "What are the maximum price and score of alcoholic drink produced by St. Helena appelation?", + "query": "SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = \"St. Helena\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the maximum price and score for wines produced in the appelation St. Helena.", + "SpiderSynQuestion": "Give the maximum price and score for alcoholic drink produced in the appelation St. Helena.", + "query": "SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = \"St. Helena\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the maximum price and score of wines in each year?", + "SpiderSynQuestion": "What are the maximum price and score of alcoholic drink in each year?", + "query": "SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the maximum price and score of wines for each year?", + "SpiderSynQuestion": "What are the maximum price and score of alcoholic drink for each year?", + "query": "SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the average price and score of wines grouped by appelation?", + "SpiderSynQuestion": "What are the average price and score of alcoholic drink grouped by grown place?", + "query": "SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the average price and score of wines for each appelation?", + "SpiderSynQuestion": "What are the average price and score of alcoholic drink for each grown place?", + "query": "SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the wineries that have at least four wines.", + "SpiderSynQuestion": "Find the wine-making establishment that have at least four wines.", + "query": "SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Which wineries produce at least four wines?", + "SpiderSynQuestion": "Which wine-making establishment produce at least four wines?", + "query": "SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the country of all appelations who have at most three wines.", + "SpiderSynQuestion": "Find the nation of all grown places who have at most three wines.", + "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the countries for appelations with at most 3 wines?", + "SpiderSynQuestion": "What are the nations for grown places with at most 3 wines?", + "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines whose production year are before the year of all wines by Brander winery?", + "SpiderSynQuestion": "What are the names of alcoholic drink whose production year are before the year of all alcoholic drink by Brander winery?", + "query": "SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = \"Brander\")" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines produced before any wine from the Brander winery?", + "SpiderSynQuestion": "What are the names of alcoholic drink produced before any alcoholic drink from the Brander winery?", + "query": "SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = \"Brander\")" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the names of wines that are more expensive then all wines made in the year 2006?", + "SpiderSynQuestion": "What are the names of alcoholic drink that are more expensive then all alcoholic drink made in the year 2006?", + "query": "SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Give the names of wines with prices above any wine produced in 2006.", + "SpiderSynQuestion": "Give the names of alcoholic drink with prices above any alcoholic drink produced in 2006.", + "query": "SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the top 3 wineries with the greatest number of wines made of white color grapes.", + "SpiderSynQuestion": "Find the top 3 wine-making establishment with the greatest number of wines made of white color grapes.", + "query": "SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = \"White\" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Which 3 wineries produce the most wines made from white grapes?", + "SpiderSynQuestion": "Which 3 wine-making establishment produce the most wines made from white grapes?", + "query": "SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = \"White\" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.", + "SpiderSynQuestion": "List the grape, wine-making establishment and year of the wines whose price is bigger than 100 ordered by year.", + "query": "SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?", + "SpiderSynQuestion": "What are the grapes, wine-making establishment and years for wines with price higher than 100, sorted by year?", + "query": "SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.", + "SpiderSynQuestion": "List the grape, grown place and name of wines whose score is higher than 93 ordered by Name.", + "query": "SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the grapes, appelations, and wines with scores above 93, sorted by Name?", + "SpiderSynQuestion": "What are the grapes, grown places, and wines with scores above 93, sorted by Name?", + "query": "SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.", + "SpiderSynQuestion": "Find the grown places that produce wines after the year of 2008 but not in Central Coast area.", + "query": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = \"Central Coast\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What are the appelations for wines produced after 2008 but not in the Central Coast area?", + "SpiderSynQuestion": "What are the grown places for wines produced after 2008 but not in the Central Coast area?", + "query": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = \"Central Coast\"" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the average price of wines that are not produced from Sonoma county.", + "SpiderSynQuestion": "Find the average price of alcoholic drink that are not produced from Sonoma county.", + "query": "SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the average price for wines not produced in Sonoma county?", + "SpiderSynQuestion": "What is the average price for alcoholic drink not produced in Sonoma county?", + "query": "SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "Find the county where produces the most number of wines with score higher than 90.", + "SpiderSynQuestion": "Find the county where produces the most number of wines with score higher than 90.", + "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "wine_1", + "SpiderQuestion": "What is the county that produces the most wines scoring higher than 90?", + "SpiderSynQuestion": "What is the county that produces the most wines scoring higher than 90?", + "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "train_station", + "SpiderQuestion": "How many train stations are there?", + "SpiderSynQuestion": "How many train terminals are there?", + "query": "SELECT count(*) FROM station" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the name, location, and number of platforms for all stations.", + "SpiderSynQuestion": "Show the name, city, and number of platforms for all terminals.", + "query": "SELECT name , LOCATION , number_of_platforms FROM station" + }, + { + "db_id": "train_station", + "SpiderQuestion": "What are all locations of train stations?", + "SpiderSynQuestion": "What are all cities of train terminals?", + "query": "SELECT DISTINCT LOCATION FROM station" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the names and total passengers for all train stations not in London.", + "SpiderSynQuestion": "Show the names and total passengers for all train terminals not in London.", + "query": "SELECT name , total_passengers FROM station WHERE LOCATION != 'London'" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the names and main services for train stations that have the top three total number of passengers.", + "SpiderSynQuestion": "Show the names and main services for train terminals that have the top three total number of passengers.", + "query": "SELECT name , main_services FROM station ORDER BY total_passengers DESC LIMIT 3" + }, + { + "db_id": "train_station", + "SpiderQuestion": "What is the average and maximum number of total passengers for train stations in London or Glasgow?", + "SpiderSynQuestion": "What is the average and maximum number of total passengers for train terminals in London or Glasgow?", + "query": "SELECT avg(total_passengers) , max(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow'" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show all locations and the total number of platforms and passengers for all train stations in each location.", + "SpiderSynQuestion": "Show all cities and the total number of platforms and passengers for all train terminals in each city.", + "query": "SELECT LOCATION , sum(number_of_platforms) , sum(total_passengers) FROM station GROUP BY LOCATION" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.", + "SpiderSynQuestion": "Show all cities that have train terminals with at least 15 platforms and train terminals with more than 25 total passengers.", + "query": "SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show all locations which don't have a train station with at least 15 platforms.", + "SpiderSynQuestion": "Show all cities which don't have a train terminal with at least 15 platforms.", + "query": "SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the location with most number of train stations.", + "SpiderSynQuestion": "Show the city with most number of train terminals.", + "query": "SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the name, time, and service for all trains.", + "SpiderSynQuestion": "Show the name, time, and service for all trains.", + "query": "SELECT name , TIME , service FROM train" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the number of trains", + "SpiderSynQuestion": "Show the number of trains", + "query": "SELECT count(*) FROM train" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the name and service for all trains in order by time.", + "SpiderSynQuestion": "Show the name and service for all trains in order by time.", + "query": "SELECT name , service FROM train ORDER BY TIME" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the station name and number of trains in each station.", + "SpiderSynQuestion": "Show the terminal name and number of trains in each terminal.", + "query": "SELECT T2.name , count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id" + }, + { + "db_id": "train_station", + "SpiderQuestion": "show the train name and station name for each train.", + "SpiderSynQuestion": "show the train name and terminal name for each train.", + "query": "SELECT T2.name , T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show all train names and times in stations in London in descending order by train time.", + "SpiderSynQuestion": "Show all train names and times in terminals in London in descending order by train time.", + "query": "SELECT T3.name , T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T2.location = 'London' ORDER BY T3.time DESC" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the station name with greatest number of trains.", + "SpiderSynQuestion": "Show the terminal name with greatest number of trains.", + "query": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show the station name with at least two trains.", + "SpiderSynQuestion": "Show the terminal name with at least two trains.", + "query": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id HAVING count(*) >= 2" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show all locations with only 1 station.", + "SpiderSynQuestion": "Show all cities with only 1 station.", + "query": "SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*) = 1" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Show station names without any trains.", + "SpiderSynQuestion": "Show terminal names without any trains.", + "query": "SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station)" + }, + { + "db_id": "train_station", + "SpiderQuestion": "What are the names of the stations which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains?", + "SpiderSynQuestion": "What are the names of the terminals which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains?", + "query": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = \"Ananthapuri Express\" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = \"Guruvayur Express\"" + }, + { + "db_id": "train_station", + "SpiderQuestion": "Find the names of the trains that do not pass any station located in London.", + "SpiderSynQuestion": "Find the names of the trains that do not pass any terminal located in London.", + "query": "SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = \"London\")" + }, + { + "db_id": "train_station", + "SpiderQuestion": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.", + "SpiderSynQuestion": "List the names and cities of all stations ordered by their yearly entry exit and interchange amounts.", + "query": "SELECT name , LOCATION FROM station ORDER BY Annual_entry_exit , Annual_interchanges" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List all vehicle id", + "SpiderSynQuestion": "List all vehicle id", + "query": "SELECT vehicle_id FROM Vehicles;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the ids of all vehicles?", + "SpiderSynQuestion": "What are the ids of all vehicles?", + "query": "SELECT vehicle_id FROM Vehicles;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many vehicle in total?", + "SpiderSynQuestion": "How many vehicle in total?", + "query": "SELECT count(*) FROM Vehicles;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many vehicles exist?", + "SpiderSynQuestion": "How many vehicles exist?", + "query": "SELECT count(*) FROM Vehicles;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Show the detail of vehicle with id 1.", + "SpiderSynQuestion": "Show the information of vehicle with id 1.", + "query": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the details of the car with id 1?", + "SpiderSynQuestion": "What are the information of the car with id 1?", + "query": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List the first name middle name and last name of all staff.", + "SpiderSynQuestion": "List the forename middle name and family name of all staff.", + "query": "SELECT first_name , middle_name , last_name FROM Staff;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the first, middle, and last names of all staff?", + "SpiderSynQuestion": "What are the forename, middle name, and surname of all staff?", + "query": "SELECT first_name , middle_name , last_name FROM Staff;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?", + "SpiderSynQuestion": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?", + "query": "SELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the date of birth for the staff member named Janessa Sawayn?", + "SpiderSynQuestion": "What is the birthday for the staff member named Janessa Sawayn?", + "query": "SELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "When did the staff member with first name as Janessa and last name as Sawayn join the company?", + "SpiderSynQuestion": "When did the employee member with first name as Janessa and last name as Sawayn join the company?", + "query": "SELECT date_joined_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "When did the staff member named Janessa Sawayn join the company?", + "SpiderSynQuestion": "When did the employee member named Janessa Sawayn join the company?", + "query": "SELECT date_joined_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?", + "SpiderSynQuestion": "When did the employee member with first name as Janessa and last name as Sawayn leave the company?", + "query": "SELECT date_left_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "When did the staff member Janessa Sawayn leave the company?", + "SpiderSynQuestion": "When did the employee member Janessa Sawayn leave the company?", + "query": "SELECT date_left_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many staff have the first name Ludie?", + "SpiderSynQuestion": "How many employee have the forename Ludie?", + "query": "SELECT count(*) FROM Staff WHERE first_name = \"Ludie\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many employees have a first name of Ludie?", + "SpiderSynQuestion": "How many employees have a first name of Ludie?", + "query": "SELECT count(*) FROM Staff WHERE first_name = \"Ludie\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the nickname of staff with first name as Janessa and last name as Sawayn?", + "SpiderSynQuestion": "What is the monicker of employee with first name as Janessa and last name as Sawayn?", + "query": "SELECT nickname FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the nickname of the employee named Janessa Sawayn?", + "SpiderSynQuestion": "What is the monicker of the employee named Janessa Sawayn?", + "query": "SELECT nickname FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many staff in total?", + "SpiderSynQuestion": "How many employee in total?", + "query": "SELECT count(*) FROM Staff;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many employees are there?", + "SpiderSynQuestion": "How many employees are there?", + "query": "SELECT count(*) FROM Staff;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Which city does staff with first name as Janessa and last name as Sawayn live?", + "SpiderSynQuestion": "Which city does employee with first name as Janessa and last name as Sawayn live?", + "query": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "In what city does Janessa Sawayn live?", + "SpiderSynQuestion": "In what city does Janessa Sawayn live?", + "query": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?", + "SpiderSynQuestion": "Which nation and state does staff with first name as Janessa and last name as Sawayn lived?", + "query": "SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "In which country and state does Janessa Sawayn live?", + "SpiderSynQuestion": "In which nation and state does Janessa Sawayn live?", + "query": "SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?", + "SpiderSynQuestion": "How long is the total class time took by customer with first name as Rylan and last name as Goodwin?", + "query": "SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How long is the total lesson time took by the customer named Rylan Goodwin?", + "SpiderSynQuestion": "How long is the total class time took by the customer named Rylan Goodwin?", + "query": "SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?", + "SpiderSynQuestion": "What is the postal code of employee with first name as Janessa and last name as Sawayn lived?", + "query": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the zip code of the hosue of the employee named Janessa Sawayn?", + "SpiderSynQuestion": "What is the postal code of the hosue of the employee named Janessa Sawayn?", + "query": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many staff live in state Georgia?", + "SpiderSynQuestion": "How many employee live in state Georgia?", + "query": "SELECT count(*) FROM Addresses WHERE state_province_county = \"Georgia\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many employees live in Georgia?", + "SpiderSynQuestion": "How many employees live in Georgia?", + "query": "SELECT count(*) FROM Addresses WHERE state_province_county = \"Georgia\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Find out the first name and last name of staff lived in city Damianfort.", + "SpiderSynQuestion": "Find out the full name of staff lived in city Damianfort.", + "query": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = \"Damianfort\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the first and last name of all employees who live in the city Damianfort?", + "SpiderSynQuestion": "What is the forename and surname of all employees who live in the city Damianfort?", + "query": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = \"Damianfort\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Which city lives most of staffs? List the city name and number of staffs.", + "SpiderSynQuestion": "Which city lives most of employees? List the city name and number of employees.", + "query": "SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "In which city do the most employees live and how many of them live there?", + "SpiderSynQuestion": "In which city do the most employees live and how many of them live there?", + "query": "SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List the states which have between 2 to 4 staffs living there.", + "SpiderSynQuestion": "List the states which have between 2 to 4 employees living there.", + "query": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the names of the states that have 2 to 4 employees living there?", + "SpiderSynQuestion": "What are the names of the states that have 2 to 4 employees living there?", + "query": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List the first name and last name of all customers.", + "SpiderSynQuestion": "List the forename and family name of all customers.", + "query": "SELECT first_name , last_name FROM Customers;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the first and last names for all customers?", + "SpiderSynQuestion": "What are the forename and family names for all customers?", + "query": "SELECT first_name , last_name FROM Customers;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List email address and birthday of customer whose first name as Carole.", + "SpiderSynQuestion": "List email address and birthday of customer whose first name as Carole.", + "query": "SELECT email_address , date_of_birth FROM Customers WHERE first_name = \"Carole\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the email addresses and date of births for all customers who have a first name of Carole?", + "SpiderSynQuestion": "What are the email addresses and birthdays for all customers who have a first name of Carole?", + "query": "SELECT email_address , date_of_birth FROM Customers WHERE first_name = \"Carole\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List phone number and email address of customer with more than 2000 outstanding balance.", + "SpiderSynQuestion": "List telephone number and email address of client with more than 2000 outstanding balance.", + "query": "SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?", + "SpiderSynQuestion": "What are the telephone numbers and email addresses of all clients who have an outstanding balance of more than 2000?", + "query": "SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?", + "SpiderSynQuestion": "What is the status code, cellphone number and email address of client with last name as Kohler or first name as Marina?", + "query": "SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = \"Marina\" OR last_name = \"Kohler\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?", + "SpiderSynQuestion": "What is the status code, telephone number, and email address of the client whose last name is Kohler or whose first name is Marina?", + "query": "SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = \"Marina\" OR last_name = \"Kohler\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "When are the birthdays of customer who are classified as 'Good Customer' status?", + "SpiderSynQuestion": "When are the birthdays of customer who are classified as 'Good Customer' status?", + "query": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the date of birth of every customer whose status code is 'Good Customer'?", + "SpiderSynQuestion": "What is the birthday of every customer whose status code is 'Good Customer'?", + "query": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "When did customer with first name as Carole and last name as Bernhard became a customer?", + "SpiderSynQuestion": "When did client with first name as Carole and last name as Bernhard became a client?", + "query": "SELECT date_became_customer FROM Customers WHERE first_name = \"Carole\" AND last_name = \"Bernhard\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "When did Carole Bernhard first become a customer?", + "SpiderSynQuestion": "When did Carole Bernhard first become a client?", + "query": "SELECT date_became_customer FROM Customers WHERE first_name = \"Carole\" AND last_name = \"Bernhard\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many customers in total?", + "SpiderSynQuestion": "How many clients in total?", + "query": "SELECT count(*) FROM Customers;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many customers are there?", + "SpiderSynQuestion": "How many clients are there?", + "query": "SELECT count(*) FROM Customers;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List all customer status codes and the number of customers having each status code.", + "SpiderSynQuestion": "List all client status codes and the number of clients having each status code.", + "query": "SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "For each customer status code, how many customers are classified that way?", + "SpiderSynQuestion": "For each client status code, how many clients are classified that way?", + "query": "SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Which customer status code has least number of customers?", + "SpiderSynQuestion": "Which client status code has least number of clients?", + "query": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the status code with the least number of customers?", + "SpiderSynQuestion": "What is the status code with the least number of clients?", + "query": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?", + "SpiderSynQuestion": "How many classes taken by customer with first name as Rylan and last name as Goodwin were completed?", + "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lessons did the customer Ryan Goodwin complete?", + "SpiderSynQuestion": "How many classes did the customer Ryan Goodwin complete?", + "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is maximum, minimum and average amount of outstanding of customer?", + "SpiderSynQuestion": "What is maximum, minimum and average amount of outstanding of client?", + "query": "SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the maximum, minimum, and average amount of money outsanding for all customers?", + "SpiderSynQuestion": "What is the maximum, minimum, and average amount of money outsanding for all clients?", + "query": "SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.", + "SpiderSynQuestion": "List the forename and surname of customers have the amount of outstanding between 1000 and 3000.", + "query": "SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?", + "SpiderSynQuestion": "What are the full names of all customers with between 1000 and 3000 dollars outstanding?", + "query": "SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List first name and last name of customers lived in city Lockmanfurt.", + "SpiderSynQuestion": "List forename and family name of customers lived in city Lockmanfurt.", + "query": "SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the first and last names of all customers who lived in Lockmanfurt?", + "SpiderSynQuestion": "What are the forename and family names of all customers who lived in Lockmanfurt?", + "query": "SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Which country does customer with first name as Carole and last name as Bernhard lived in?", + "SpiderSynQuestion": "Which nation does client with first name as Carole and last name as Bernhard lived in?", + "query": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the country in which the customer Carole Bernhard lived?", + "SpiderSynQuestion": "What is the nation in which the client Carole Bernhard lived?", + "query": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is zip code of customer with first name as Carole and last name as Bernhard?", + "SpiderSynQuestion": "What is postal code of client with first name as Carole and last name as Bernhard?", + "query": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the zip code of the customer Carole Bernhard?", + "SpiderSynQuestion": "What is the postal code of the client Carole Bernhard?", + "query": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Which city does has most number of customers?", + "SpiderSynQuestion": "Which city does has most number of clients?", + "query": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the city with the most customers?", + "SpiderSynQuestion": "What is the city with the most clients?", + "query": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How much in total does customer with first name as Carole and last name as Bernhard paid?", + "SpiderSynQuestion": "How much in total does client with first name as Carole and last name as Bernhard paid?", + "query": "SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the total amount of moeny paid by the customer Carole Bernhard?", + "SpiderSynQuestion": "What is the total quantity of moeny paid by the client Carole Bernhard?", + "query": "SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List the number of customers that did not have any payment history.", + "SpiderSynQuestion": "List the number of clients that did not have any payment history.", + "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many customers have no payment histories?", + "SpiderSynQuestion": "How many clients have no payment histories?", + "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List first name and last name of customers that have more than 2 payments.", + "SpiderSynQuestion": "List forename and family name of customers that have more than 2 payments.", + "query": "SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the first and last names of all customers with more than 2 payments?", + "SpiderSynQuestion": "What are the full names of all customers with more than 2 payments?", + "query": "SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List all payment methods and number of payments using each payment methods.", + "SpiderSynQuestion": "List all payment types and number of payments using each payment types.", + "query": "SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "For each payment method, how many payments were made?", + "SpiderSynQuestion": "For each payment type, how many payments were made?", + "query": "SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code;" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lessons were in cancelled state?", + "SpiderSynQuestion": "How many classes were in cancelled state?", + "query": "SELECT count(*) FROM Lessons WHERE lesson_status_code = \"Cancelled\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lessons have been cancelled?", + "SpiderSynQuestion": "How many classes have been cancelled?", + "query": "SELECT count(*) FROM Lessons WHERE lesson_status_code = \"Cancelled\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.", + "SpiderSynQuestion": "List class id of all classes taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.", + "query": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\" AND nickname LIKE \"%s%\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?", + "SpiderSynQuestion": "What are the the class ids of all staff taught by Janessa Sawayn whose nickname has the letter s?", + "query": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\" AND nickname LIKE \"%s%\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lessons taught by staff whose first name has letter 'a' in it?", + "SpiderSynQuestion": "How many classes taught by staff whose first name has letter 'a' in it?", + "query": "SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?", + "SpiderSynQuestion": "How many classes were taught by a staff member whose first name has the letter 'a' in it?", + "query": "SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?", + "SpiderSynQuestion": "How long is the total class time taught by staff with first name as Janessa and last name as Sawayn?", + "query": "SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the total time for all lessons taught by Janessa Sawayn?", + "SpiderSynQuestion": "What is the total time for all classes taught by Janessa Sawayn?", + "query": "SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?", + "SpiderSynQuestion": "What is average class price taught by staff with first name as Janessa and last name as Sawayn?", + "query": "SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the average price for a lesson taught by Janessa Sawayn?", + "SpiderSynQuestion": "What is the average price for a class taught by Janessa Sawayn?", + "query": "SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lesson does customer with first name Ray took?", + "SpiderSynQuestion": "How many class does customer with first name Ray took?", + "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Ray\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "How many lessons did the customer with the first name Ray take?", + "SpiderSynQuestion": "How many classes did the customer with the first name Ray take?", + "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Ray\"" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "Which last names are both used by customers and by staff?", + "SpiderSynQuestion": "Which family names are both used by customers and by staff?", + "query": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What are the last names that are used by customers and staff?", + "SpiderSynQuestion": "What are the family names that are used by customers and staff?", + "query": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the first name of the staff who did not give any lesson?", + "SpiderSynQuestion": "What is the forename of the employee who did not give any lesson?", + "query": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the first name of all employees who do not give any lessons?", + "SpiderSynQuestion": "What is the forename of all employees who do not give any lessons?", + "query": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id" + }, + { + "db_id": "driving_school", + "SpiderQuestion": "What is the id and detail of the vehicle used in lessons for most of the times?", + "SpiderSynQuestion": "What is the id and information of the vehicle used in lessons for most of the times?", + "query": "SELECT T1.vehicle_id , T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many faculty do we have?", + "SpiderSynQuestion": "How many teachers do we have?", + "query": "SELECT count(*) FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What is the total number of faculty members?", + "SpiderSynQuestion": "What is the total number of teachers?", + "query": "SELECT count(*) FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What ranks do we have for faculty?", + "SpiderSynQuestion": "What is the job title of teacher?", + "query": "SELECT DISTINCT rank FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the list of distinct ranks for faculty.", + "SpiderSynQuestion": "Find the list of different job title of teacher.", + "query": "SELECT DISTINCT rank FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show all the distinct buildings that have faculty rooms.", + "SpiderSynQuestion": "Show all the different buildings that have teacher rooms.", + "query": "SELECT DISTINCT building FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What buildings have faculty offices?", + "SpiderSynQuestion": "What buildings have teacher offices?", + "query": "SELECT DISTINCT building FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the rank, first name, and last name for all the faculty.", + "SpiderSynQuestion": "Show the job title, forename, and family name for all the faculty.", + "query": "SELECT rank , Fname , Lname FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the rank, first name, and last name of the faculty members?", + "SpiderSynQuestion": "What are the job title, forename, and surname of the faculty members?", + "query": "SELECT rank , Fname , Lname FROM Faculty" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the first name, last name, and phone number for all female faculty members.", + "SpiderSynQuestion": "Show the forename, family name, and telephone number for all female faculty members.", + "query": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the first name, last name, and phone number of all the female faculty members?", + "SpiderSynQuestion": "What are the forename, surname, and telephone number of all the female faculty members?", + "query": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show ids for all the male faculty.", + "SpiderSynQuestion": "Show ids for all the male teacher.", + "query": "SELECT FacID FROM Faculty WHERE Sex = 'M'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the faculty ids of all the male faculty members?", + "SpiderSynQuestion": "What are the teacher ids of all the male teacher members?", + "query": "SELECT FacID FROM Faculty WHERE Sex = 'M'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many female Professors do we have?", + "SpiderSynQuestion": "How many female Professors do we have?", + "query": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Count the number of female Professors we have.", + "SpiderSynQuestion": "Count the number of female Professors we have.", + "query": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the phone, room, and building for the faculty named Jerry Prince.", + "SpiderSynQuestion": "Show the telephone, room, and building for the teacher named Jerry Prince.", + "query": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the phone, room, and building of the faculty member called Jerry Prince?", + "SpiderSynQuestion": "What are the telephone, room, and building of the teacher member called Jerry Prince?", + "query": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many Professors are in building NEB?", + "SpiderSynQuestion": "How many Professors are in building NEB?", + "query": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Count the number of Professors who have office in building NEB.", + "SpiderSynQuestion": "Count the number of Professors who have office in building NEB.", + "query": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the first name and last name for all the instructors.", + "SpiderSynQuestion": "Show the full name for all the instructors.", + "query": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the first name and last name of all the instructors?", + "SpiderSynQuestion": "What are the forename and surname of all the instructors?", + "query": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show all the buildings along with the number of faculty members the buildings have.", + "SpiderSynQuestion": "Show all the buildings along with the number of teacher members the buildings have.", + "query": "SELECT building , count(*) FROM Faculty GROUP BY building" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many faculty members does each building have? List the result with the name of the building.", + "SpiderSynQuestion": "How many teacher members does each building have? List the result with the name of the building.", + "query": "SELECT building , count(*) FROM Faculty GROUP BY building" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which building has most faculty members?", + "SpiderSynQuestion": "Which building has most teacher members?", + "query": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the building that has the largest number of faculty members.", + "SpiderSynQuestion": "Find the building that has the largest number of teacher members.", + "query": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show all the buildings that have at least 10 professors.", + "SpiderSynQuestion": "Show all the buildings that have at least 10 professors.", + "query": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "In which buildings are there at least ten professors?", + "SpiderSynQuestion": "In which buildings are there at least ten professors?", + "query": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "For each faculty rank, show the number of faculty members who have it.", + "SpiderSynQuestion": "For each job title of teacher, show the number of teacher members who have it.", + "query": "SELECT rank , count(*) FROM Faculty GROUP BY rank" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many faculty members do we have for each faculty rank?", + "SpiderSynQuestion": "How many teacher members do we have for each job title of teacher?", + "query": "SELECT rank , count(*) FROM Faculty GROUP BY rank" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show all the ranks and the number of male and female faculty for each rank.", + "SpiderSynQuestion": "Show all the job title and the number of male and female teacher for each job title.", + "query": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many faculty members do we have for each rank and gender?", + "SpiderSynQuestion": "How many teacher members do we have for each job title and gender?", + "query": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which rank has the smallest number of faculty members?", + "SpiderSynQuestion": "Which job title has the smallest number of teacher members?", + "query": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the faculty rank that has the least members.", + "SpiderSynQuestion": "Find the job title of teacher that has the least members.", + "query": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the number of male and female assistant professors.", + "SpiderSynQuestion": "Show the number of male and female assistant professors.", + "query": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many male and female assistant professors do we have?", + "SpiderSynQuestion": "How many male and female assistant professors do we have?", + "query": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the first name and last name of Linda Smith's advisor?", + "SpiderSynQuestion": "What are the forename and surname of Linda Smith's advisor?", + "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Who is the advisor of Linda Smith? Give me the first name and last name.", + "SpiderSynQuestion": "Who is the advisor of Linda Smith? Give me the full name.", + "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the ids of students whose advisors are professors.", + "SpiderSynQuestion": "Show the ids of students whose advisers are professors.", + "query": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which students have professors as their advisors? Find their student ids.", + "SpiderSynQuestion": "Which students have professors as their advisers? Find their student ids.", + "query": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show first name and last name for all the students advised by Michael Goodrich.", + "SpiderSynQuestion": "Show forename and surname for all the students advised by Michael Goodrich.", + "query": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which students are advised by Michael Goodrich? Give me their first and last names.", + "SpiderSynQuestion": "Which students are advised by Michael Goodrich? Give me their full names.", + "query": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the faculty id of each faculty member, along with the number of students he or she advises.", + "SpiderSynQuestion": "Show the teacher id of each teacher member, along with the number of students he or she advises.", + "query": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the faculty id and the number of students each faculty has?", + "SpiderSynQuestion": "What are the teacher id and the number of students each teacher has?", + "query": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show all the faculty ranks and the number of students advised by each rank.", + "SpiderSynQuestion": "Show all the job title of teacher and the number of students advised by each job title.", + "query": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many students are advised by each rank of faculty? List the rank and the number of students.", + "SpiderSynQuestion": "How many students are advised by each job title of faculty? List the job title and the number of students.", + "query": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the first and last name of the faculty who has the most students?", + "SpiderSynQuestion": "What are the forename and surname of the faculty who has the most students?", + "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Give me the the first and last name of the faculty who advises the most students.", + "SpiderSynQuestion": "Give me the the full name of the faculty who advises the most students.", + "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the ids for all the faculty members who have at least 2 students.", + "SpiderSynQuestion": "Show the ids for all the teacher members who have at least 2 students.", + "query": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which faculty members advise two ore more students? Give me their faculty ids.", + "SpiderSynQuestion": "Which teacher members advise two ore more students? Give me their teacher ids.", + "query": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show ids for the faculty members who don't advise any student.", + "SpiderSynQuestion": "Show ids for the teacher members who don't advise any student.", + "query": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the ids of the faculty members who do not advise any student.", + "SpiderSynQuestion": "What are the ids of the teacher members who do not advise any student.", + "query": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What activities do we have?", + "SpiderSynQuestion": "What activities do we have?", + "query": "SELECT activity_name FROM Activity" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "List all the activities we have.", + "SpiderSynQuestion": "List all the activities we have.", + "query": "SELECT activity_name FROM Activity" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many activities do we have?", + "SpiderSynQuestion": "How many activities do we have?", + "query": "SELECT count(*) FROM Activity" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the number of activities available.", + "SpiderSynQuestion": "Find the number of activities available.", + "query": "SELECT count(*) FROM Activity" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many faculty members participate in an activity?", + "SpiderSynQuestion": "How many teacher members participate in an activity?", + "query": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Give me the number of faculty members who participate in an activity", + "SpiderSynQuestion": "Give me the number of teacher members who participate in an activity", + "query": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the ids of the faculty who don't participate in any activity.", + "SpiderSynQuestion": "Show the ids of the teacher who don't participate in any activity.", + "query": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which faculty do not participate in any activity? Find their faculty ids.", + "SpiderSynQuestion": "Which teacher do not participate in any activity? Find their teacher ids.", + "query": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the ids of all the faculty members who participate in an activity and advise a student.", + "SpiderSynQuestion": "Show the ids of all the teacher members who participate in an activity and advise a student.", + "query": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are ids of the faculty members who not only participate in an activity but also advise a student.", + "SpiderSynQuestion": "What are ids of the teacher members who not only participate in an activity but also advise a student.", + "query": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many activities does Mark Giuliano participate in?", + "SpiderSynQuestion": "How many activities does Mark Giuliano participate in?", + "query": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the number of activities Mark Giuliano is involved in.", + "SpiderSynQuestion": "Find the number of activities Mark Giuliano is involved in.", + "query": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the names of all the activities Mark Giuliano participates in.", + "SpiderSynQuestion": "Show the names of all the activities Mark Giuliano participates in.", + "query": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the names of the activities Mark Giuliano is involved in", + "SpiderSynQuestion": "What are the names of the activities Mark Giuliano is involved in", + "query": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.", + "SpiderSynQuestion": "Show the full name of all the teacher members who participated in some activity, together with the number of activities they participated in.", + "query": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.", + "SpiderSynQuestion": "What is the forename and surname of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.", + "query": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show all the activity names and the number of faculty involved in each activity.", + "SpiderSynQuestion": "Show all the activity names and the number of teacher involved in each activity.", + "query": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.", + "SpiderSynQuestion": "How many teacher members participate in each activity? Return the activity names and the number of teacher members.", + "query": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What is the first and last name of the faculty participating in the most activities?", + "SpiderSynQuestion": "What is the full name of the faculty participating in the most activities?", + "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the first and last name of the faculty who is involved in the largest number of activities.", + "SpiderSynQuestion": "Find the forename and family name of the faculty who is involved in the largest number of activities.", + "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What is the name of the activity that has the most faculty members involved in?", + "SpiderSynQuestion": "What is the name of the activity that has the most teacher members involved in?", + "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which activity has the most faculty members participating in? Find the activity name.", + "SpiderSynQuestion": "Which activity has the most teacher members participating in? Find the activity name.", + "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the ids of the students who don't participate in any activity.", + "SpiderSynQuestion": "Show the ids of the students who don't participate in any activity.", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the ids of the students who are not involved in any activity", + "SpiderSynQuestion": "What are the ids of the students who are not involved in any activity", + "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Show the ids for all the students who participate in an activity and are under 20.", + "SpiderSynQuestion": "Show the ids for all the students who participate in an activity and are under 20.", + "query": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the ids of the students who are under 20 years old and are involved in at least one activity.", + "SpiderSynQuestion": "What are the ids of the students who are under 20 years old and are involved in at least one activity.", + "query": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What is the first and last name of the student participating in the most activities?", + "SpiderSynQuestion": "What is the forename and family name of the student participating in the most activities?", + "query": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Tell me the first and last name of the student who has the most activities.", + "SpiderSynQuestion": "Tell me the full name of the student who has the most activities.", + "query": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What is the name of the activity with the most students?", + "SpiderSynQuestion": "What is the name of the activity with the most students?", + "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the name of the activity that has the largest number of student participants.", + "SpiderSynQuestion": "Find the name of the activity that has the largest number of student participants.", + "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the first names of the faculty members who are playing Canoeing or Kayaking.", + "SpiderSynQuestion": "Find the forenames of the faculty members who are playing Canoeing or Kayaking.", + "query": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.", + "SpiderSynQuestion": "Which teacher members are playing either Canoeing or Kayaking? Tell me their forenames.", + "query": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the first names of professors who are not playing Canoeing or Kayaking.", + "SpiderSynQuestion": "Find the forenames of professors who are not playing Canoeing or Kayaking.", + "query": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?", + "SpiderSynQuestion": "What are the forenames of the professors who do not play Canoeing or Kayaking as activities?", + "query": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the first names of the faculty members who participate in Canoeing and Kayaking.", + "SpiderSynQuestion": "Find the forenames of the faculty members who participate in Canoeing and Kayaking.", + "query": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "What are the first names of the faculty members playing both Canoeing and Kayaking?", + "SpiderSynQuestion": "What are the forenames of the faculty members playing both Canoeing and Kayaking?", + "query": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Find the ids of the students who participate in Canoeing and Kayaking.", + "SpiderSynQuestion": "Find the ids of the students who participate in Canoeing and Kayaking.", + "query": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'" + }, + { + "db_id": "activity_1", + "SpiderQuestion": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.", + "SpiderSynQuestion": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.", + "query": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name of the airport in the city of Goroka.", + "SpiderSynQuestion": "Find the name of the aerodrome in the city of Goroka.", + "query": "SELECT name FROM airports WHERE city = 'Goroka'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the names of the airports in the city of Goroka?", + "SpiderSynQuestion": "What are the names of the aerodromes in the city of Goroka?", + "query": "SELECT name FROM airports WHERE city = 'Goroka'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.", + "SpiderSynQuestion": "Find the name, city, nation, and altitude (or elevation) of the aerodromes in the city of New York.", + "query": "SELECT name , city , country , elevation FROM airports WHERE city = 'New York'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name, city, country, and elevation for every airport in the city of New York?", + "SpiderSynQuestion": "What is the name, city, nation, and altitude for every aerodrome in the city of New York?", + "query": "SELECT name , city , country , elevation FROM airports WHERE city = 'New York'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many airlines are there?", + "SpiderSynQuestion": "How many airlines are there?", + "query": "SELECT count(*) FROM airlines" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the total number of airlines?", + "SpiderSynQuestion": "What is the total number of airlines?", + "query": "SELECT count(*) FROM airlines" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many airlines does Russia has?", + "SpiderSynQuestion": "How many airlines does Russia has?", + "query": "SELECT count(*) FROM airlines WHERE country = 'Russia'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the number of airlines based in Russia?", + "SpiderSynQuestion": "What is the number of airlines based in Russia?", + "query": "SELECT count(*) FROM airlines WHERE country = 'Russia'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the maximum elevation of all airports in the country of Iceland?", + "SpiderSynQuestion": "What is the maximum altitude of all aerodromes in the country of Iceland?", + "query": "SELECT max(elevation) FROM airports WHERE country = 'Iceland'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the highest elevation of an airport in the country of Iceland?", + "SpiderSynQuestion": "What is the highest altitude of an aerodrome in the country of Iceland?", + "query": "SELECT max(elevation) FROM airports WHERE country = 'Iceland'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name of the airports located in Cuba or Argentina.", + "SpiderSynQuestion": "Find the name of the aerodromes located in Cuba or Argentina.", + "query": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the names of all airports in Cuba or Argentina?", + "SpiderSynQuestion": "What are the names of all aerodromes in Cuba or Argentina?", + "query": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the country of the airlines whose name starts with 'Orbit'.", + "SpiderSynQuestion": "Find the nation of the airlines whose name starts with 'Orbit'.", + "query": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the countries of all airlines whose names start with Orbit?", + "SpiderSynQuestion": "What are the nations of all airlines whose names start with Orbit?", + "query": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name of airports whose altitude is between -50 and 50.", + "SpiderSynQuestion": "Find the name of aerodromes whose altitude is between -50 and 50.", + "query": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the names of all airports whose elevation is between -50 and 50?", + "SpiderSynQuestion": "What are the names of all aerodromes whose altitude is between -50 and 50?", + "query": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Which country is the airport that has the highest altitude located in?", + "SpiderSynQuestion": "Which nation is the aerodrome that has the highest altitude located in?", + "query": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the country of the airport with the highest elevation?", + "SpiderSynQuestion": "What is the nation of the aerodrome with the highest altitude?", + "query": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of airports whose name contain the word 'International'.", + "SpiderSynQuestion": "Find the number of aerodromes whose name contain the word 'International'.", + "query": "SELECT count(*) FROM airports WHERE name LIKE '%International%'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many airports' names have the word Interanation in them?", + "SpiderSynQuestion": "How many aerodromes' names have the word Interanation in them?", + "query": "SELECT count(*) FROM airports WHERE name LIKE '%International%'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many different cities do have some airport in the country of Greenland?", + "SpiderSynQuestion": "How many different cities do have some aerodrome in the country of Greenland?", + "query": "SELECT count(DISTINCT city) FROM airports WHERE country = 'Greenland'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "In how many cities are there airports in the country of Greenland?", + "SpiderSynQuestion": "In how many cities are there aerodromes in the country of Greenland?", + "query": "SELECT count(DISTINCT city) FROM airports WHERE country = 'Greenland'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of routes operated by American Airlines.", + "SpiderSynQuestion": "Find the number of paths operated by American Airlines.", + "query": "SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many routes does American Airlines operate?", + "SpiderSynQuestion": "How many paths does American Airlines operate?", + "query": "SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of routes whose destination airports are in Canada.", + "SpiderSynQuestion": "Find the number of routes whose terminal aerodromes are in Canada.", + "query": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many routes end in a Canadian airport?", + "SpiderSynQuestion": "How many paths end in a Canadian aerodrome?", + "query": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name, city, and country of the airport that has the lowest altitude.", + "SpiderSynQuestion": "Find the name, city, and nation of the aerodrome that has the lowest altitude.", + "query": "SELECT name , city , country FROM airports ORDER BY elevation LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name, city, and country of the airport with the lowest altitude?", + "SpiderSynQuestion": "What is the name, city, and nation of the aerodrome with the lowest altitude?", + "query": "SELECT name , city , country FROM airports ORDER BY elevation LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name, city, and country of the airport that has the highest latitude.", + "SpiderSynQuestion": "Find the name, city, and nation of the aerodrome that has the highest latitude.", + "query": "SELECT name , city , country FROM airports ORDER BY elevation DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name, city, and country of the airport with the highest elevation?", + "SpiderSynQuestion": "What is the name, city, and nation of the aerodrome with the highest elevation?", + "query": "SELECT name , city , country FROM airports ORDER BY elevation DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name and city of the airport which is the destination of the most number of routes.", + "SpiderSynQuestion": "Find the name and city of the aerodrome which is the destination of the most number of routes.", + "query": "SELECT T1.name , T1.city , T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name and city of the airport that the most routes end at?", + "SpiderSynQuestion": "What is the name and city of the aerodrome that the most routes end at?", + "query": "SELECT T1.name , T1.city , T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the names of the top 10 airlines that operate the most number of routes.", + "SpiderSynQuestion": "Find the names of the top 10 airlines that operate the most number of paths.", + "query": "SELECT T1.name , T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY count(*) DESC LIMIT 10" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "For the airline ids with the top 10 most routes operated, what are their names?", + "SpiderSynQuestion": "For the airline ids with the top 10 most routes operated, what are their names?", + "query": "SELECT T1.name , T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY count(*) DESC LIMIT 10" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name and city of the airport which is the source for the most number of flight routes.", + "SpiderSynQuestion": "Find the name and city of the aerodrome which is the source for the most number of flight routes.", + "query": "SELECT T1.name , T1.city , T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name and city of the airport from most of the routes start?", + "SpiderSynQuestion": "What is the name and city of the aerodrome from most of the routes start?", + "query": "SELECT T1.name , T1.city , T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of different airports which are the destinations of the American Airlines.", + "SpiderSynQuestion": "Find the number of different aerodromes which are the destinations of the American Airlines.", + "query": "SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the number of different different airports that are destinations for American Airlines?", + "SpiderSynQuestion": "What is the number of different different aerodromes that are destinations for American Airlines?", + "query": "SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Which countries has the most number of airlines?", + "SpiderSynQuestion": "Which nations has the most number of airlines?", + "query": "SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name of the country with the most number of home airlines?", + "SpiderSynQuestion": "What is the name of the nation with the most number of home airlines?", + "query": "SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Which countries has the most number of airlines whose active status is 'Y'?", + "SpiderSynQuestion": "Which nations has the most number of airlines whose active status is 'Y'?", + "query": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the countries with the most airlines whose active status is Y?", + "SpiderSynQuestion": "What are the nations with the most airlines whose active status is Y?", + "query": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "List all countries and their number of airlines in the descending order of number of airlines.", + "SpiderSynQuestion": "List all nations and their number of airlines in the descending order of number of airlines.", + "query": "SELECT country , count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many airlines operate out of each country in descending order?", + "SpiderSynQuestion": "How many airlines operate out of each nation in descending order?", + "query": "SELECT country , count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many airports are there per country? Order the countries by decreasing number of airports.", + "SpiderSynQuestion": "How many aerodromes are there per nation? Order the nations by decreasing number of aerodromes.", + "query": "SELECT count(*) , country FROM airports GROUP BY country ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the number of airports per country, ordered from most to least?", + "SpiderSynQuestion": "What is the number of aerodromes per nation, ordered from most to least?", + "query": "SELECT count(*) , country FROM airports GROUP BY country ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many airports are there per city in the United States? Order the cities by decreasing number of airports.", + "SpiderSynQuestion": "How many aerodromes are there per city in the United States? Order the cities by decreasing number of aerodromes.", + "query": "SELECT count(*) , city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many airports are there per city in the US ordered from most to least?", + "SpiderSynQuestion": "How many aerodromes are there per city in the US ordered from most to least?", + "query": "SELECT count(*) , city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Return the cities with more than 3 airports in the United States.", + "SpiderSynQuestion": "Return the cities with more than 3 aerodromes in the United States.", + "query": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING count(*) > 3" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the number of cities in the United States with more than 3 airports?", + "SpiderSynQuestion": "What is the number of cities in the United States with more than 3 aerodromes?", + "query": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING count(*) > 3" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many cities are there that have more than 3 airports?", + "SpiderSynQuestion": "How many cities are there that have more than 3 aerodromes?", + "query": "SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*) > 3)" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the count of cities with more than 3 airports?", + "SpiderSynQuestion": "What is the count of cities with more than 3 aerodromes?", + "query": "SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*) > 3)" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "List the cities which have more than one airport and number of airports.", + "SpiderSynQuestion": "List the cities which have more than one aerodrome and number of aerodromes.", + "query": "SELECT city , count(*) FROM airports GROUP BY city HAVING count(*) > 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the names of all cities with more than one airport and how many airports do they have?", + "SpiderSynQuestion": "What are the names of all cities with more than one aerodrome and how many aerodromes do they have?", + "query": "SELECT city , count(*) FROM airports GROUP BY city HAVING count(*) > 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "List the cities which have more than 2 airports sorted by the number of airports.", + "SpiderSynQuestion": "List the cities which have more than 2 aerodromes sorted by the number of aerodromes.", + "query": "SELECT city FROM airports GROUP BY city HAVING count(*) > 2 ORDER BY count(*)" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the cities that have more than 2 airports sorted by number of airports?", + "SpiderSynQuestion": "What are the cities that have more than 2 aerodromes sorted by number of aerodromes?", + "query": "SELECT city FROM airports GROUP BY city HAVING count(*) > 2 ORDER BY count(*)" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of routes for each source airport and the airport name.", + "SpiderSynQuestion": "Find the number of routes for each source aerodrome and the aerodrome name.", + "query": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "For each airport name, how many routes start at that airport?", + "SpiderSynQuestion": "For each aerodrome name, how many routes start at that aerodrome?", + "query": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.", + "SpiderSynQuestion": "Find the number of paths and aerodrome name for each source aerodrome, order the results by decreasing number of paths.", + "query": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "For each airport name, how many routes start at that airport, ordered from most to least?", + "SpiderSynQuestion": "For each aerodrome name, how many paths start at that aerodrome, ordered from most to least?", + "query": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the average elevation of all airports for each country.", + "SpiderSynQuestion": "Find the average altitude of all aerodromes for each nation", + "query": "SELECT avg(elevation) , country FROM airports GROUP BY country" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "For each country, what is the average elevation of that country's airports?", + "SpiderSynQuestion": "For each nation, what is the average altitude of that nation's aerodromes?", + "query": "SELECT avg(elevation) , country FROM airports GROUP BY country" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the cities which have exactly two airports.", + "SpiderSynQuestion": "Find the cities which have exactly two aerodromes.", + "query": "SELECT city FROM airports GROUP BY city HAVING count(*) = 2" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What are the cities with exactly two airports?", + "SpiderSynQuestion": "What are the cities with exactly two aerodromes?", + "query": "SELECT city FROM airports GROUP BY city HAVING count(*) = 2" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "For each country and airline name, how many routes are there?", + "SpiderSynQuestion": "For each nation and airline name, how many routes are there?", + "query": "SELECT T1.country , T1.name , count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country , T1.name" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the total number of routes for each country and airline in that country?", + "SpiderSynQuestion": "What is the total number of routes for each nation and airline in that nation?", + "query": "SELECT T1.country , T1.name , count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country , T1.name" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of routes with destination airports in Italy.", + "SpiderSynQuestion": "Find the number of routes with terminal aerodromes in Italy.", + "query": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the number of routes whose destinations are Italian airports?", + "SpiderSynQuestion": "What is the number of routes whose destinations are Italian aerodromes?", + "query": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.", + "SpiderSynQuestion": "Return the number of routes with terminal aerodrome in Italy operated by the airline with name 'American Airlines'.", + "query": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?", + "SpiderSynQuestion": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?", + "query": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of routes that have destination John F Kennedy International Airport.", + "SpiderSynQuestion": "Find the number of routes that have terminal John F Kennedy International Airport.", + "query": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the number of routes that end at John F Kennedy International Airport?", + "SpiderSynQuestion": "What is the number of routes that end at John F Kennedy International Airport?", + "query": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the number of routes from the United States to Canada.", + "SpiderSynQuestion": "Find the number of paths from the United States to Canada.", + "query": "SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "How many routes go from the United States to Canada?", + "SpiderSynQuestion": "How many paths go from the United States to Canada?", + "query": "SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the id of routes whose source and destination airports are in the United States.", + "SpiderSynQuestion": "Find the id of paths whose source and terminal aerodromes are in the United States.", + "query": "SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the id of the routes whose source and destination airports are in the United States?", + "SpiderSynQuestion": "What is the id of the paths whose source and terminal aerodromes are in the United States?", + "query": "SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the name of airline which runs the most number of routes.", + "SpiderSynQuestion": "Find the name of airline which runs the most number of routes.", + "query": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name of the airline with the most routes?", + "SpiderSynQuestion": "What is the name of the airline with the most routes?", + "query": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the busiest source airport that runs most number of routes in China.", + "SpiderSynQuestion": "Find the busiest source aerodrome that runs most number of routes in China.", + "query": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name of the airport with the most number of routes that start in China?", + "SpiderSynQuestion": "What is the name of the aerodrome with the most number of routes that start in China?", + "query": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "Find the busiest destination airport that runs most number of routes in China.", + "SpiderSynQuestion": "Find the busiest terminal aerodrome that runs most number of routes in China.", + "query": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "flight_4", + "SpiderQuestion": "What is the name of the airport that is the destination of the most number of routes that start in China?", + "SpiderSynQuestion": "What is the name of the aerodrome that is the terminal of the most number of routes that start in China?", + "query": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What is the id of the most recent order?", + "SpiderSynQuestion": "What is the id of the most recent order?", + "query": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the id of the order made most recently.", + "SpiderSynQuestion": "Find the id of the order made most recently.", + "query": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "what are the order id and customer id of the oldest order?", + "SpiderSynQuestion": "what are the order id and client id of the oldest order?", + "query": "SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the order id and customer id associated with the oldest order.", + "SpiderSynQuestion": "Find the order id and client id associated with the oldest order.", + "query": "SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the id of the order whose shipment tracking number is \"3452\".", + "SpiderSynQuestion": "Find the id of the order whose shipment tracking number is \"3452\".", + "query": "SELECT order_id FROM shipments WHERE shipment_tracking_number = \"3452\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which order's shipment tracking number is \"3452\"? Give me the id of the order.", + "SpiderSynQuestion": "Which order's shipment tracking number is \"3452\"? Give me the id of the order.", + "query": "SELECT order_id FROM shipments WHERE shipment_tracking_number = \"3452\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the ids of all the order items whose product id is 11.", + "SpiderSynQuestion": "Find the ids of all the order items whose goods id is 11.", + "query": "SELECT order_item_id FROM order_items WHERE product_id = 11" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find all the order items whose product id is 11. What are the order item ids?", + "SpiderSynQuestion": "Find all the order items whose goods id is 11. What are the order item ids?", + "query": "SELECT order_item_id FROM order_items WHERE product_id = 11" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "List the name of all the distinct customers who have orders with status \"Packing\".", + "SpiderSynQuestion": "List the name of all the different clients who have orders with status \"Packing\".", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which customers have orders with status \"Packing\"? Give me the customer names.", + "SpiderSynQuestion": "Which clients have orders with status \"Packing\"? Give me the client names.", + "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the details of all the distinct customers who have orders with status \"On Road\".", + "SpiderSynQuestion": "Find the information of all the different clients who have orders with status \"On Road\".", + "query": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are the distinct customers who have orders with status \"On Road\"? Give me the customer details?", + "SpiderSynQuestion": "What are the different clients who have orders with status \"On Road\"? Give me the client information?", + "query": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What is the name of the customer who has the most orders?", + "SpiderSynQuestion": "What is the name of the client who has the most orders?", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which customer made the most orders? Find the customer name.", + "SpiderSynQuestion": "Which client made the most orders? Find the client name.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What is the customer id of the customer who has the most orders?", + "SpiderSynQuestion": "What is the client id of the client who has the most orders?", + "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the id of the customer who made the most orders.", + "SpiderSynQuestion": "Find the id of the client who made the most orders.", + "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Give me a list of id and status of orders which belong to the customer named \"Jeramie\".", + "SpiderSynQuestion": "Give me a list of id and status of orders which belong to the client named \"Jeramie\".", + "query": "SELECT T2.order_id , T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which orders are made by the customer named \"Jeramie\"? Give me the order ids and status.", + "SpiderSynQuestion": "Which orders are made by the client named \"Jeramie\"? Give me the order ids and status.", + "query": "SELECT T2.order_id , T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the dates of orders which belong to the customer named \"Jeramie\".", + "SpiderSynQuestion": "Find the day of orders which belong to the client named \"Jeramie\".", + "query": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are the dates of the orders made by the customer named \"Jeramie\"?", + "SpiderSynQuestion": "What are the day of the orders made by the client named \"Jeramie\"?", + "query": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.", + "SpiderSynQuestion": "Give me the names of clients who have placed orders between 2009-01-01 and 2010-01-01.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= \"2009-01-01\" AND T2.date_order_placed <= \"2010-01-01\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.", + "SpiderSynQuestion": "Which clients made orders between 2009-01-01 and 2010-01-01? Find their names.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= \"2009-01-01\" AND T2.date_order_placed <= \"2010-01-01\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?", + "SpiderSynQuestion": "Give me a list of different goods ids from orders placed between 1975-01-01 and 1976-01-01?", + "query": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??", + "SpiderSynQuestion": "What are the different ids of goods ordered between 1975-01-01 and 1976-01-01??", + "query": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the names of the customers who have order status both \"On Road\" and \"Shipped\".", + "SpiderSynQuestion": "Find the names of the clients who have order status both \"On Road\" and \"Shipped\".", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer names.", + "SpiderSynQuestion": "Which clients have both \"On Road\" and \"Shipped\" as order status? List the client names.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the id of the customers who have order status both \"On Road\" and \"Shipped\".", + "SpiderSynQuestion": "Find the id of the clients who have order status both \"On Road\" and \"Shipped\".", + "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer ids.", + "SpiderSynQuestion": "Which clients have both \"On Road\" and \"Shipped\" as order status? List the client ids.", + "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "When was the order placed whose shipment tracking number is 3452? Give me the date.", + "SpiderSynQuestion": "When was the order placed whose shipment tracking number is 3452? Give me the day.", + "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "On which day was the order placed whose shipment tracking number is 3452?", + "SpiderSynQuestion": "On which day was the order placed whose shipment tracking number is 3452?", + "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What is the placement date of the order whose invoice number is 10?", + "SpiderSynQuestion": "What is the placement day of the order whose invoice number is 10?", + "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "On what day was the order with invoice number 10 placed?", + "SpiderSynQuestion": "On what day was the order with invoice number 10 placed?", + "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "List the count and id of each product in all the orders.", + "SpiderSynQuestion": "List the count and id of each goods in all the orders.", + "query": "SELECT count(*) , T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "For each product, return its id and the number of times it was ordered.", + "SpiderSynQuestion": "For each goods, return its id and the number of times it was ordered.", + "query": "SELECT count(*) , T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "List the name and count of each product in all orders.", + "SpiderSynQuestion": "List the name and count of each goods in all orders.", + "query": "SELECT T3.product_name , count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "For each product, show its name and the number of times it was ordered.", + "SpiderSynQuestion": "For each goods, show its name and the number of times it was ordered.", + "query": "SELECT T3.product_name , count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the ids of orders which are shipped after 2000-01-01.", + "SpiderSynQuestion": "Find the ids of orders which are shipped after 2000-01-01.", + "query": "SELECT order_id FROM shipments WHERE shipment_date > \"2000-01-01\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which orders have shipment after 2000-01-01? Give me the order ids.", + "SpiderSynQuestion": "Which orders have shipment after 2000-01-01? Give me the order ids.", + "query": "SELECT order_id FROM shipments WHERE shipment_date > \"2000-01-01\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the id of the order which is shipped most recently.", + "SpiderSynQuestion": "Find the id of the order which is shipped most recently.", + "query": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments)" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which order has the most recent shipment? Give me the order id.", + "SpiderSynQuestion": "Which order has the most recent shipment? Give me the order id.", + "query": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments)" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "List the names of all distinct products in alphabetical order.", + "SpiderSynQuestion": "List the names of all different goods in alphabetical order.", + "query": "SELECT DISTINCT product_name FROM products ORDER BY product_name" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Sort all the distinct products in alphabetical order.", + "SpiderSynQuestion": "Sort all the different goods in alphabetical order.", + "query": "SELECT DISTINCT product_name FROM products ORDER BY product_name" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "List the ids of all distinct orders ordered by placed date.", + "SpiderSynQuestion": "List the ids of all different orders ordered by placed day.", + "query": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are ids of the all distinct orders, sorted by placement date?", + "SpiderSynQuestion": "What are ids of the all different orders, sorted by placement day?", + "query": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What is the id of the order which has the most items?", + "SpiderSynQuestion": "What is the id of the order which has the most items?", + "query": "SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which order deals with the most items? Return the order id.", + "SpiderSynQuestion": "Which order deals with the most items? Return the order id.", + "query": "SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What is the name of the customer who has the largest number of orders?", + "SpiderSynQuestion": "What is the name of the client who has the largest number of orders?", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the name of the customer who made the most orders.", + "SpiderSynQuestion": "Find the name of the client who made the most orders.", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.", + "SpiderSynQuestion": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.", + "query": "SELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?", + "SpiderSynQuestion": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?", + "query": "SELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.", + "SpiderSynQuestion": "Find the different information of invoices which are created before 1989-09-03 or after 2007-12-25.", + "query": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?", + "SpiderSynQuestion": "What are the different information of invoices created before 1989-09-03 or after 2007-12-25?", + "query": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "For each customer who has at least two orders, find the customer name and number of orders made.", + "SpiderSynQuestion": "For each client who has at least two orders, find the client name and number of orders made.", + "query": "SELECT T2.customer_name , count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) >= 2" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which customers have made at least two orders? Give me each customer name and number of orders made.", + "SpiderSynQuestion": "Which clients have made at least two orders? Give me each client name and number of orders made.", + "query": "SELECT T2.customer_name , count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) >= 2" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Find the name of the customers who have at most two orders.", + "SpiderSynQuestion": "Find the name of the clients who have at most two orders.", + "query": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) <= 2" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are the names of the customers who have made two or less orders?", + "SpiderSynQuestion": "What are the names of the clients who have made two or less orders?", + "query": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) <= 2" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "List the names of the customers who have once bought product \"food\".", + "SpiderSynQuestion": "List the names of the clients who have once bought product \"food\".", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "What are the names of the customers who bought product \"food\" at least once?", + "SpiderSynQuestion": "What are the names of the clients who bought product \"food\" at least once?", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\").", + "SpiderSynQuestion": "List the names of clients who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\").", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1" + }, + { + "db_id": "tracking_orders", + "SpiderQuestion": "Which customers have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")?", + "SpiderSynQuestion": "Which clients have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")?", + "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1" + }, + { + "db_id": "architecture", + "SpiderQuestion": "How many architects are female?", + "SpiderSynQuestion": "count the number of female architectural designers?", + "query": "SELECT count(*) FROM architect WHERE gender = 'female'" + }, + { + "db_id": "architecture", + "SpiderQuestion": "List the name, nationality and id of all male architects ordered by their names lexicographically.", + "SpiderSynQuestion": "List the name, nation and id of all male architects ordered by their names lexicographically.", + "query": "SELECT name , nationality , id FROM architect WHERE gender = 'male' ORDER BY name" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What is the maximum length in meters for the bridges and what are the architects' names?", + "SpiderSynQuestion": "What is the maximum length in meters for the bridges and what are the architects' names?", + "query": "SELECT max(T1.length_meters) , T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What is the average length in feet of the bridges?", + "SpiderSynQuestion": "What is the average length in feet of the bridges?", + "query": "SELECT avg(length_feet) FROM bridge" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What are the names and year of construction for the mills of 'Grondzeiler' type?", + "SpiderSynQuestion": "What are the names and year of construction for the mills of 'Grondzeiler' type?", + "query": "SELECT name , built_year FROM mill WHERE TYPE = 'Grondzeiler'" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What are the distinct names and nationalities of the architects who have ever built a mill?", + "SpiderSynQuestion": "What are the different names and nations of the architects who have ever built a mill?", + "query": "SELECT DISTINCT T1.name , T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What are the names of the mills which are not located in 'Donceel'?", + "SpiderSynQuestion": "What are the names of the mills which are not located in 'Donceel'?", + "query": "SELECT name FROM mill WHERE LOCATION != 'Donceel'" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What are the distinct types of mills that are built by American or Canadian architects?", + "SpiderSynQuestion": "What are the different categories of mills that are built by American or Canadian architects?", + "query": "SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id WHERE T2.nationality = 'American' OR T2.nationality = 'Canadian'" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What are the ids and names of the architects who built at least 3 bridges ?", + "SpiderSynQuestion": "What are the ids and names of the architects who built at least 3 bridges ?", + "query": "SELECT T1.id , T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) >= 3" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What is the id, name and nationality of the architect who built most mills?", + "SpiderSynQuestion": "What is the id, name and nation of the architect who built most mills?", + "query": "SELECT T1.id , T1.name , T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What are the ids, names and genders of the architects who built two bridges or one mill?", + "SpiderSynQuestion": "What are the ids, names and sex of the architects who built two bridges or one mill?", + "query": "SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 2 UNION SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 1" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?", + "SpiderSynQuestion": "What is the position of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?", + "query": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'" + }, + { + "db_id": "architecture", + "SpiderQuestion": "Which of the mill names contains the french word 'Moulin'?", + "SpiderSynQuestion": "Which of the mill names contains the french word 'Moulin'?", + "query": "SELECT name FROM mill WHERE name LIKE '%Moulin%'" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?", + "SpiderSynQuestion": "What are the different name of the mills built by the architects who have also built a bridge longer than 80 meters?", + "query": "SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80" + }, + { + "db_id": "architecture", + "SpiderQuestion": "What is the most common mill type, and how many are there?", + "SpiderSynQuestion": "What is the most common mill category, and how many are there?", + "query": "SELECT TYPE , count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "architecture", + "SpiderQuestion": "How many architects haven't built a mill before year 1850?", + "SpiderSynQuestion": "How many architects haven't built a mill before year 1850?", + "query": "SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year < 1850 );" + }, + { + "db_id": "architecture", + "SpiderQuestion": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.", + "SpiderSynQuestion": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.", + "query": "SELECT t1.name FROM bridge AS t1 JOIN architect AS t2 ON t1.architect_id = t2.id WHERE t2.nationality = 'American' ORDER BY t1.length_feet" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "How many book clubs are there?", + "SpiderSynQuestion": "How many book clubs are there?", + "query": "SELECT count(*) FROM book_club" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Count the number of book clubs.", + "SpiderSynQuestion": "Count the number of book clubs.", + "query": "SELECT count(*) FROM book_club" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "show the titles, and authors or editors for all books made after the year 1989.", + "SpiderSynQuestion": "show the names, and writers or editors for all books made after the year 1989.", + "query": "SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are the titles and authors or editors that correspond to books made after 1989?", + "SpiderSynQuestion": "What are the names and writers or editors that correspond to books made after 1989?", + "query": "SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all distinct publishers for books.", + "SpiderSynQuestion": "Show all different publishers for books.", + "query": "SELECT DISTINCT publisher FROM book_club" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are all the different book publishers?", + "SpiderSynQuestion": "What are all the different book publishers?", + "query": "SELECT DISTINCT publisher FROM book_club" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show the years, book titles, and publishers for all books, in descending order by year.", + "SpiderSynQuestion": "Show the years, book names, and publishers for all books, in descending order by year.", + "query": "SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are the years, titles, and publishers for all books, ordered by year descending?", + "SpiderSynQuestion": "What are the years, names, and publishers for all books, ordered by year descending?", + "query": "SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all publishers and the number of books for each publisher.", + "SpiderSynQuestion": "Show all publishers and the number of books for each publisher.", + "query": "SELECT publisher , count(*) FROM book_club GROUP BY publisher" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "How many books are there for each publisher?", + "SpiderSynQuestion": "How many books are there for each publisher?", + "query": "SELECT publisher , count(*) FROM book_club GROUP BY publisher" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What is the publisher with most number of books?", + "SpiderSynQuestion": "What is the publisher with most number of books?", + "query": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Return the publisher that has published the most books.", + "SpiderSynQuestion": "Return the publisher that has published the most books.", + "query": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all book categories and the number of books in each category.", + "SpiderSynQuestion": "Show all book types and the number of books in each type.", + "query": "SELECT category , count(*) FROM book_club GROUP BY category" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "How many books fall into each category?", + "SpiderSynQuestion": "How many books fall into each type?", + "query": "SELECT category , count(*) FROM book_club GROUP BY category" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "List categories that have at least two books after year 1989.", + "SpiderSynQuestion": "List types that have at least two books after year 1989.", + "query": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What categories have two or more corresponding books that were made after 1989?", + "SpiderSynQuestion": "What types have two or more corresponding books that were made after 1989?", + "query": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show publishers with a book published in 1989 and a book in 1990.", + "SpiderSynQuestion": "Show publishers with a book published in 1989 and a book in 1990.", + "query": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are the publishers who have published a book in both 1989 and 1990?", + "SpiderSynQuestion": "What are the publishers who have published a book in both 1989 and 1990?", + "query": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all publishers which do not have a book in 1989.", + "SpiderSynQuestion": "Show all publishers which do not have a book in 1989.", + "query": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Which publishers did not publish a book in 1989?", + "SpiderSynQuestion": "Which publishers did not publish a book in 1989?", + "query": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all movie titles, years, and directors, ordered by budget.", + "SpiderSynQuestion": "Show all film names, years, and directors, ordered by budget.", + "query": "SELECT title , YEAR , director FROM movie ORDER BY budget_million" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are the titles, years, and directors of all movies, ordered by budget in millions?", + "SpiderSynQuestion": "What are the names, years, and directors of all films, ordered by budget in millions?", + "query": "SELECT title , YEAR , director FROM movie ORDER BY budget_million" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "How many movie directors are there?", + "SpiderSynQuestion": "How many film directors are there?", + "query": "SELECT COUNT (DISTINCT director) FROM movie" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Count the number of different directors.", + "SpiderSynQuestion": "Count the number of different directors.", + "query": "SELECT COUNT (DISTINCT director) FROM movie" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?", + "SpiderSynQuestion": "What is the name and director for the film with highest worldwide gross in the year 2000 or before?", + "query": "SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.", + "SpiderSynQuestion": "Return the name and director of the film released in the year 2000 or earlier that had the highest worldwide gross.", + "query": "SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all director names who have a movie in both year 1999 and 2000.", + "SpiderSynQuestion": "Show all director names who have a film in both year 1999 and 2000.", + "query": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Which directors had a movie both in the year 1999 and 2000?", + "SpiderSynQuestion": "Which directors had a film both in the year 1999 and 2000?", + "query": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all director names who have a movie in the year 1999 or 2000.", + "SpiderSynQuestion": "Show all director names who have a film in the year 1999 or 2000.", + "query": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Which directors had a movie in either 1999 or 2000?", + "SpiderSynQuestion": "Which directors had a film in either 1999 or 2000?", + "query": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What is the average, maximum, and minimum budget for all movies before 2000.", + "SpiderSynQuestion": "What is the average, maximum, and minimum expenditure estimate for all films before 2000.", + "query": "SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.", + "SpiderSynQuestion": "Return the average, maximum, and minimum expenditure estimate in millions for films made before the year 2000.", + "query": "SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "List all company names with a book published by Alyson.", + "SpiderSynQuestion": "List all enterprise names with a book published by Alyson.", + "query": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are all the company names that have a book published by Alyson?", + "SpiderSynQuestion": "What are all the enterprise names that have a book published by Alyson?", + "query": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show the movie titles and book titles for all companies in China.", + "SpiderSynQuestion": "Show the film names and book names for all enterprise in China.", + "query": "SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are the titles of movies and books corresponding to companies incorporated in China?", + "SpiderSynQuestion": "What are the names of films and books corresponding to companies incorporated in China?", + "query": "SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "Show all company names with a movie directed in year 1999.", + "SpiderSynQuestion": "Show all enterprise names with a film directed in year 1999.", + "query": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999" + }, + { + "db_id": "culture_company", + "SpiderQuestion": "What are all company names that have a corresponding movie directed in the year 1999?", + "SpiderSynQuestion": "What are all enterprise names that have a corresponding film directed in the year 1999?", + "query": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999" + } +] \ No newline at end of file